Skip to content

Instantly share code, notes, and snippets.

View ThorstenHans's full-sized avatar

Thorsten Hans ThorstenHans

View GitHub Profile
@ThorstenHans
ThorstenHans / Cago.toml
Created October 16, 2023 12:20
Basic Auth with Spin
[package]
name = "spin-rust-basic-auth"
authors = ["Thorsten Hans <thorsten.hans@gmail.com>"]
description = ""
version = "0.1.0"
edition = "2021"
[lib]
crate-type = [ "cdylib" ]
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
@ThorstenHans
ThorstenHans / sample-app.yml
Created September 9, 2021 10:51
Sample NGINX Pod exposed via Ingress rule
apiVersion: v1
kind: Pod
metadata:
name: webserver
labels:
app: nginx
name: sample
spec:
containers:
- name: main
@ThorstenHans
ThorstenHans / index.json
Created December 17, 2020 12:30
Azure Cognitive Search - Index Definiton
{
"name": "blog-index",
"fields": [
{
"name": "id",
"type": "Edm.String",
"facetable": false,
"filterable": false,
"key": true,
"retrievable": true,
@ThorstenHans
ThorstenHans / cloudSettings
Last active August 17, 2020 19:14
VSCode Settings
{"lastUpload":"2020-08-17T19:14:19.084Z","extensionVersion":"v3.4.3"}
@ThorstenHans
ThorstenHans / aad_identity_binding.yaml
Created November 29, 2018 18:22
aad_identity_binding
apiVersion: "aadpodidentity.k8s.io/v1"
kind: AzureIdentityBinding
metadata:
name: demo_aad_identity_binding
spec:
AzureIdentity: demo_aks_pod_id
Selector: myapp
@ThorstenHans
ThorstenHans / aad_identity.yaml
Created November 29, 2018 17:55
AzureIdentity.yaml
apiVersion: "aadpodidentity.k8s.io/v1"
kind: AzureIdentity
metadata:
name: demo_aks_pod_id
spec:
type: 0
ResourceID: /subscriptions/<subid>/resourcegroups/demo-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/demo_pod_identity
ClientID: 00000000-0000-0000-0000-000000000000
@ThorstenHans
ThorstenHans / az-create-identity-result.json
Created November 29, 2018 17:33
Create Azure Identity Result
{
"clientId": "00000000-0000-0000-0000-000000000000",
"clientSecretUrl": "https://control-westeurope.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/demo-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/demo_pod_identity/credentials?tid=00000000-0000-0000-0000-000000000000&oid=00000000-0000-0000-0000-000000000000&aid=00000000-0000-0000-0000-000000000000",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/demo-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/demo_pod_identity",
"name": "demo_pod_identity",
"principalId": "00000000-0000-0000-0000-000000000000",
"resourceGroup": "demo-resource-group",
"tenantId": "00000000-0000-0000-0000-000000000000",
"type": "Microsoft.ManagedIdentity/userAssignedIdentities"
}
@ThorstenHans
ThorstenHans / pod.yaml
Last active March 22, 2018 11:59
k8s sample resources
apiVersion: v1
kind: Pod
metadata:
name: demo-nginx
labels:
app: demo
artefact: api
spec:
containers:
- name: webapp
@ThorstenHans
ThorstenHans / nginx.conf
Created February 18, 2018 19:09
0815 nginx config
server {
listen 80;
sendfile on;
default_type application/octet-stream;
gzip on;