Skip to content

Instantly share code, notes, and snippets.

View whitneygriffith's full-sized avatar

Whitney Griffith whitneygriffith

View GitHub Profile
@whitneygriffith
whitneygriffith / istio-aks.sh
Created December 13, 2022 18:34
Collecting Istio Metrics for TCP Services in AKS
random=$RANDOM
# Create AKS Cluster
az aks create -g "osm-rg-$random" -n "osm-aks-$random" --enable-managed-identity --node-count 1 --enable-addons monitoring --enable-msi-auth-for-monitoring --generate-ssh-keys --attach-acr "osmacr$random"
# Connect to AKS Cluster in Local Environment
az aks get-credentials --resource-group "osm-rg-$random" --name "osm-aks-$random"
# Install istio 1.15
istioctl install --set profile=demo -y

random=$RANDOM

subscriptionId=[Your Azure Subscription]

admin=azureuser

Azure

Do these on local environment

@whitneygriffith
whitneygriffith / commands.sh
Last active July 21, 2022 23:08
Hacks for programming kubernetes on mac
# Edit k8s objects in code with kube editor
export EDITOR='open -a "Visual Studio Code" --wait'
# Assuming code is in PATH
export KUBE_EDITOR='code --wait'
kubectl edit ...
#Basic Deployment Declaration with Liveness Probe
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
labels:
app: my-nginx
tier: frontend
spec:
selector:
# Set up local environment variables for each Windows machine
# Service Principal Active Directory Authentication
[Environment]::SetEnvironmentVariable("ARM_SUBSCRIPTION_ID", "")
[Environment]::SetEnvironmentVariable("ARM_TENANT_ID", "")
[Environment]::SetEnvironmentVariable("ARM_CLIENT_ID", "")
[Environment]::SetEnvironmentVariable("ARM_CLIENT_SECRET", "")
[Environment]::SetEnvironmentVariable("ARM_ACCESS_KEY", "")
Write-Host "Environment variables have been set";
export const PHONE_REGEX = /\+\d{7,16}/;
export const PIN_REGEX = /\d{4}/;
export const SECURITY_CODE_REGEX = /\d{6}/;

Keybase proof

I hereby claim:

  • I am whitneygriffith on github.
  • I am impactwhit (https://keybase.io/impactwhit) on keybase.
  • I have a public key ASBr3fjFyanwNH4J6fseCBSLZlhTwpjGIR2MgwKgktjP7Qo

To claim this, I am signing this object: