This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# define this in one file | |
.anchors: | |
install_vault: | |
- | | |
wget -q https://releases.hashicorp.com/vault/1.11.0/vault_1.11.0_linux_amd64.zip \ | |
&& unzip -q vault_1.11.0_linux_amd64.zip \ | |
&& mv -f vault /bin/vault \ | |
&& rm -f vault_1.11.0_linux_amd64.zip; | |
# now use the reference anchor in separate file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include: | |
- remote: 'http://cicd.example.com/1.x/stages.yml' | |
- remote: 'http://cicd.example.com/1.x/build.yml' | |
- remote: 'http://cicd.example.com/1.x/deploy.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clog 'this is a colorful log'; | |
clog () { echo -e "\033[0;35m PIPELOG ${1} \033[0m"; }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# purge NAMESPACE PREFIX SECONDS | |
purge () { | |
kubectl get pod -o json -n $1 | jq -r --arg prefix "$2" --argjson timestamp $3 '.items[] | select(.metadata.name | startswith($prefix)) | select (.metadata.creationTimestamp | sub("\\..*";"Z") | sub("\\s";"T") | fromdate < now - $timestamp).metadata.name' | xargs -r -L1 kubectl delete pod -n $1 --grace-period=0 --force ; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cycle NAMESPACE | |
cycle () { | |
kubectl get deploy -n "$1" | cut -d' ' -f1 | tail +2 | while read line; do kubectl rollout restart deploy $line -n "$1"; done; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k8gb: | |
dnsZone: "staging.example.com" | |
edgeDNSZone: "example.com" | |
edgeDNSServers: ["169.254.169.253"] | |
# the following two fields change based on which cluster you are installing on | |
clusterGeoTag: "cluster-1" | |
extGslbClustersGeoTags: "cluster-2,cluster-3" | |
route53: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
helm upgrade k8gb k8gb \ | |
--version 0.9.0 \ | |
--repo https://www.k8gb.io \ | |
--install --namespace gslb \ | |
--values ./values.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: externaldns.k8s.io/v1alpha1 | |
kind: DNSEndpoint | |
metadata: | |
name: test | |
namespace: default | |
labels: | |
k8gb.absa.oss/dnstype: local | |
spec: | |
endpoints: | |
- dnsName: test.staging.example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
helm repo add bitnami https://charts.bitnami.com/bitnami | |
helm upgrade pivotal bitnami/rabbitmq-cluster-operator \ | |
--install --set useCertManager=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: cert-manager.io/v1 | |
kind: Certificate | |
metadata: | |
name: rabbit-cert | |
spec: | |
dnsNames: | |
- 'rabbit.default.svc.cluster.local' | |
- '*.rabbit-nodes.default.svc.cluster.local' | |
issuerRef: | |
kind: ClusterIssuer |