Skip to content

Instantly share code, notes, and snippets.

View brk3's full-sized avatar
😮‍💨

Paul Bourke brk3

😮‍💨
View GitHub Profile
@brk3
brk3 / main.go
Created April 25, 2023 12:34
Azure AKS AAD auth
package main
import (
"context"
"fmt"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@brk3
brk3 / main.tf
Last active March 9, 2023 11:15
Terraform nested looping and grouping
terraform {}
variable "windows_web_apps" {
default = {
app1 = {
# ...
dynamic_app_settings = {
AZURE_CLIENT_ID = {
managed_identities = {
id_a = {
@brk3
brk3 / gist:8ff2975edf52e0728a39b7ec32cd88ba
Last active October 20, 2022 10:25
azure datalake acl example
terraform {
}
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "example" {
name = "pbourke2010"
location = "West Europe"
@brk3
brk3 / gist:250de4b0e11aa97665fe37a40a1d6be1
Created July 15, 2022 09:01
cuelang map definitions
// https://cuelang.org/play/?id=62lD4w9v-PB#cue@export@cue
#foo: {
mymap: [string]: string
}
#bar: [key=string]: {
[string]: string
}
// ls ~/.azure (actionA)
12:49PM INF actions.rover.az_login._exec | #4 1.217 1284e1793e8a70814b49593ea768bf3188739fb6 /root/.azure/az.json
12:49PM INF actions.rover.az_login._exec | #4 1.217 1284e1793e8a70814b49593ea768bf3188739fb6 /root/.azure/az.sess
12:49PM INF actions.rover.az_login._exec | #4 1.217 19cc8046f2089009b514f1c16ef736ae33202996 /root/.azure/azureProfile.json
12:49PM INF actions.rover.az_login._exec | #4 1.217 3afb9057ea19556045983ce229ffcb57d416352d /root/.azure/clouds.config
12:49PM INF actions.rover.az_login._exec | #4 1.217 e49d148911b5b64515fdab1a60eaafa0eb24ea0d /root/.azure/commandIndex.json
12:49PM INF actions.rover.az_login._exec | #4 1.217 sha1sum: /root/.azure/commands: Is a directory
12:49PM INF actions.rover.az_login._exec | #4 1.217 83b781dfce7aae80e237c76bd559dce7fa4bbb2d /root/.azure/config
12:49PM INF actions.rover.az_login._exec | #4 1.217 sha1sum: /root/.azure/logs: Is a directory
package main [41/1408]
import (
"dagger.io/dagger"
"dagger.io/dagger/core"
"universe.dagger.io/docker"
)
dagger.#Plan & {
actions: {
package test
import (
"dagger.io/dagger"
"dagger.io/dagger/core"
"universe.dagger.io/docker"
)
dagger.#Plan & {
actions: {
package hello
import (
"dagger.io/dagger"
"dagger.io/dagger/core"
"universe.dagger.io/docker"
)
dagger.#Plan & {
client: env: GITHUB_PAT: dagger.#Secret
package main
import (
"fmt"
"io/ioutil"
"go.starlark.net/starlark"
)
func main() {
kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
kubectl apply -f install/kubernetes/istio-demo.yaml
kubectl apply -f <(istioctl kube-inject -f samples/bookinfo/platform/kube/bookinfo.yaml)
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
sleep 10
export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}')
export INGRESS_HOST=$(kubectl get po -l istio=ingressgateway -n istio-system -o 'jsonpath={.items[0].status.hostIP}')
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
kubectl apply -f samples/bookinfo/networking/virtual-service-all-v1.yaml