kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --history-max 30
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: argoproj.io/v1alpha1 | |
kind: Application | |
metadata: | |
name: mysql-operator | |
namespace: argocd | |
spec: | |
destination: | |
namespace: mysql-operator | |
server: https://kubernetes.default.svc | |
project: default |
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
#!/bin/bash | |
# Export all ArgoCD applications stripping out all Kubernetes internal fields | |
# Requires yq | |
# Written by Jolene Engo <[email protected]> | |
NAMESPACE="argocd" | |
for app in `kubectl -n ${NAMESPACE} get applications -o name --no-headers -o custom-columns=":metadata.name"`; do | |
kubectl -n ${NAMESPACE} get application $app -o yaml | yq eval 'del(.metadata.managedFields,.status,.metadata.creationTimestamp,.metadata.generation,.metadata.resourceVersion,.metadata.selfLink,.metadata.uid)' - > $app.yaml |
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
#!/bin/bash | |
# Written by Jolene Engo <[email protected]> | |
# This is a script that you can use with your MFA token to get an STS token from AWS. | |
# Example way to run: source sts.sh <token> | |
# You MUST source this file or the environment varibles will not be set | |
export AWS_ACCESS_KEY_ID= | |
export AWS_DEFAULT_REGION= | |
export AWS_SECRET_ACCESS_KEY= |
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
# This manifest written by Jolene Engo <[email protected]> | |
kind: Application | |
metadata: | |
name: postgres-operator | |
namespace: argocd | |
spec: | |
destination: | |
namespace: postgres-operator | |
server: https://kubernetes.default.svc | |
project: infrastructure |
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
# This manifest written by Jolene Engo <[email protected]> | |
apiVersion: argoproj.io/v1alpha1 | |
kind: Application | |
metadata: | |
name: cert-manager | |
namespace: argocd | |
spec: | |
destination: | |
namespace: cert-manager | |
server: https://kubernetes.default.svc |
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
for f in $(kubectl get pv --no-headers -o custom-columns=NAME:.metadata.name); \ | |
do kubectl patch pv $f -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'; 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
#!/bin/bash | |
# Written by Jolene Engo <[email protected]> | |
# This script is useful for syncing files to an S3 bucket with a delay | |
# Great for situations where a remote process is grabbing files after upload | |
# and you don't want to overwhelm the remote system | |
# The delay will slow the syncing | |
# If the file already exists, it will be skippped. This allows a resume | |
# that s3cmd wouldn't normally support for put |
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
export FILE=DJI_0027.MOV | |
docker run -v `pwd`:/workspace jrottenberg/ffmpeg -i /workspace/$FILE -vcodec prores_ks -threads 4 -profile:v 3 -vcodec copy /workspace/prores422-$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
export HOSTNAME=localhost | |
export NAMESPACE=default | |
export SECRET_NAME=test-ssl-secret | |
openssl req -x509 -nodes -days 365 -sha256 -newkey rsa:2048 -keyout /tmp/tls.key -out /tmp/tls.crt -subj "/CN=${HOSTNAME}/" | |
kubectl --namespace ${NAMESPACE} create secret tls ${SECRET_NAME} --key /tmp/tls.key --cert /tmp/tls.crt |
NewerOlder