Skip to content

Instantly share code, notes, and snippets.

Zachary Loeber zloeber

View GitHub Profile
@zloeber
zloeber / gist:d01a6dde6bce82b216b6631d2ed0d612
Created Apr 6, 2020
Kubernetes Terraform App Deployment Brief Example
View gist:d01a6dde6bce82b216b6631d2ed0d612
resource kubernetes_namespace deployment {
metadata {
name = var.namespace
}
}
// Example Secrets to expose as env vars in deployment
resource kubernetes_secret appsecrets {
metadata {
name = "appsecrets"
View minikube-up.sh
#!/bin/bash
# Work around script to get minikube running on Ubuntu 19.10
# - Updates local firewall settings (ufw)
# - Whacks your local ./.kube and ./.minikube folders!
# - Runs sudo commands to get things running but does not require sudo to run thereafter
export MINIKUBE_WANTUPDATENOTIFICATION=false
export MINIKUBE_WANTREPORTERRORPROMPT=false
export MINIKUBE_HOME=$HOME
export CHANGE_MINIKUBE_NONE_USER=true
View gist:f9667986bbfa264eae7c2df902a29def
name: ado-var-group-sync
trigger:
batch: true
branches:
include:
- master
paths:
include:
- config/*
View gist:d1920706d1663946033f43e703d4d5a9
## ado-variable-group.yml
# Use az cli to update or create an ADO variable group like a crazy person
# sourceFile is a generic .env file with entries in VAR=VALUE format.
parameters:
sourceFile: ''
groupName: ''
overwrite: 'true'
adoProject: ''
adoOrg: ''
View gist:bc3e48aa20001c81b718fdcfc4f58ce5
# Login
az login --service-principal \
--username "${SPNAPPID}" \
--password "${SPNSECRET}" \
--tenant "${TENANTID}"
# Add the cli extension
az extension add --name azure-devops
# Profit!
View gist:80453b3ce0630ab5851e492eb463d52a
count(kured_reboot_required) BY (instance) * ON (instance) GROUP_LEFT (node) kured_reboot_required > 0
View kured-helmfile.yml
helmDefaults:
tillerless: true
tillerNamespace: platform
atomic: true
verify: false
wait: false
timeout: 600
recreatePods: false
force: true
View gist:e90da169dec0ec0c96fffd457ef5b33a
#!/bin/bash
SC_NAME=${SC_NAME:-"Service Connection Name"}
KEYVAULTNAME=${KEYVAULTNAME:-"keyvault"}
AZ_SUBSCRIPTION=${AZ_SUBSCRIPTION:-"Azure Subscription"}
AZ_SUBSCRIPTION_ID=${AZ_SUBSCRIPTION_ID:-"Azure Subscription ID"}
ADO_ORG=${ADO_ORG:-"https://dev.azure.com/myorgname"}
ADO_PROJECT=${ADO_PROJECT:-"MyProject"}
SECRET_TEMPLATE=${SECRET_TEMPLATE:-"./secret-var-group.tpl"}
echo "STAGE: ${STAGE}"
You can’t perform that action at this time.