export AWS_PROFILE=xxx
export AWS_REGION=xxx
export KUBECONFIG=xxx
kubectl config use-context xxx
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
#!/usr/bin/env bash | |
VERSION="$1" | |
VERSION="${VERSION#[vV]}" | |
VERSION_MAJOR="${VERSION%%\.*}" | |
VERSION_MINOR="${VERSION#*.}" | |
VERSION_MINOR="${VERSION_MINOR%.*}" | |
VERSION_PATCH="${VERSION##*.}" | |
echo "Version: ${VERSION}" |
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
kind: Ingress | |
metadata: | |
name: kubeapi | |
namespace: default | |
annotations: | |
nginx.ingress.kubernetes.io/secure-backends: "true" | |
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" | |
spec: | |
rules: | |
- host: "api.devops.example.com" |
server:
config:
# https://github.com/argoproj/argo-cd/blob/master/docs/user-guide/config-management-plugins.md#plugins
configManagementPlugins: |
- name: vault
init:
command: ["/bin/sh", "-c"]
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
# $1: vault namespace | |
# $2: Vault Token Reviewer Service Account | |
vault_namespace=${1:-"vault"} | |
token_reviewer_sa=${2:-"vault"} | |
if [ -z "${VAULT_TOKEN}" ] || [ -z "${VAULT_ADDR}" ]; then | |
echo "ERROR: VAULT_TOKEN and VAULT_ADDR env vars are required" | |
exit 404 | |
fi | |
cat <<EOF | kubectl apply -f - |
This gist is about a collection of lectures about how to write a good README
This gist is about a collection of lectures about how to write a good README
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
read_vault_data() | |
{ | |
vault read -field=value $VAULT_SECRET_PATH/config > config.yaml | |
} | |
write_vault_data() | |
{ | |
vault write $VAULT_SECRET_PATH/config value=@config.yaml | |
} |