Skip to content

Instantly share code, notes, and snippets.

View welshstew's full-sized avatar
😎
henlo world

Stuart Winchester welshstew

😎
henlo world
View GitHub Profile
@welshstew
welshstew / check.sh
Last active January 14, 2022 16:18
Supporting yamls for Jaeger
GATEWAY_URL=$( \
oc get route istio-ingressgateway -n istio-system \
-o template --template '{{ "http://" }}{{ .spec.host }}')
curl ${GATEWAY_URL}/trace
JAEGER_URL=$( \
oc get route jaeger -n istio-system \
-o template --template '{{ "https://" }}{{ .spec.host }}')

Helm Stuff

Show artifacthub

helm search repo quarkus
helm show chart redhat-charts/quarkus
helm show readme redhat-charts/quarkus
helm pull redhat-charts/quarkus --untar
helm install redhat-charts/quarkus --generate-name
@welshstew
welshstew / openssl-get-cert-as-pem.sh
Created December 8, 2021 13:17
openssl-get-cert-as-pem
openssl s_client -connect www.google.com:443 2>/dev/null </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
sudo cp *.pem /etc/pki/ca-trust/source/anchors
sudo update-ca-trust
@welshstew
welshstew / knative-tutorial-svc.yaml
Created July 12, 2021 15:22
knative tutorial service
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: knative-crud-api
namespace: serverless-demo
spec:
template:
spec:
containerConcurrency: 0
containers:
@welshstew
welshstew / dockerhub-openshift-secret.sh
Created July 12, 2021 13:55
Create secret for dockerhub things to be used in Openshift
oc create secret docker-registry docker-hub \
--docker-server=docker.io \
--docker-username=youhoo \
--docker-password=yoursecret
oc secrets link default docker-hub --for=pull,mount
oc secrets link builder docker-hub --for=pull,mount
@welshstew
welshstew / deployment.yaml
Created June 18, 2021 14:09
nominatim-openshift - note you need `oc adm policy add-scc-to-user anyuid system:serviceaccount:$NAMESPACE:default`
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nominatim
name: nominatim
namespace: nominatim
spec:
replicas: 1
selector:
@welshstew
welshstew / conductor-server-deployment.yaml
Last active March 8, 2021 16:15
get conductor working on openshift with kompose
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yaml
kompose.version: 1.22.0 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: conductor-server
name: conductor-server
@welshstew
welshstew / url.txt
Created December 11, 2020 13:35
Fuse Archetype Catalogs Location
https://maven.repository.redhat.com/ga/io/fabric8/archetypes/archetypes-catalog/
@welshstew
welshstew / generate-htpasswd-file.sh
Last active January 6, 2021 11:00
Sealed Secrets on Openshift - using the operatorhub helm installed controller
htpasswd -c htpasswd admin
cat userpasswords.csv | while read line; do
USERNAME=$(echo $line | awk -F ',' '{print $1}');
PASSWORD=$(echo $line | awk -F ',' '{print $2}');
echo $PASSWORD | htpasswd -i ./htpasswd $USERNAME;
done;