Skip to content

Instantly share code, notes, and snippets.

View aramase's full-sized avatar
:octocat:

Anish Ramasekar aramase

:octocat:
View GitHub Profile
package main
import (
"encoding/json"
"flag"
"net/http"
"github.com/Microsoft/hcnproxy/pkg/client"
msg "github.com/Microsoft/hcnproxy/pkg/types"
v1 "github.com/Microsoft/hcsshim"
@aramase
aramase / csi-driver-psp.yml
Created August 3, 2020 18:00
Sample PSP for secrets-store-csi-driver and azure provider
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: allow-csi-driver
spec:
seLinux:
rule: RunAsAny
volumes:
- csi
- hostPath
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: allow-hostpath
spec:
seLinux:
rule: RunAsAny
volumes:
- hostPath
fsGroup:
starting build "57369abd-7011-4f8c-a459-b1598fb91bac"
FETCHSOURCE
Fetching storage object: gs://k8s-staging-csi-secrets-store-gcb/source/1591133102.8-1e9ce7579d724f888f55c2b61f93b98d.tgz#1591133102963015
Copying gs://k8s-staging-csi-secrets-store-gcb/source/1591133102.8-1e9ce7579d724f888f55c2b61f93b98d.tgz#1591133102963015...
/ [0 files][ 0.0 B/ 23.2 MiB]
/ [1 files][ 23.2 MiB/ 23.2 MiB]
-
Operation completed over 1 objects/23.2 MiB.
BUILD

SecretProviderClassPodStatus

The SecretProviderClassPodStatus is created with the pod as owner.

➜ kubectl get secretproviderclasspodstatus
NAME                                         AGE
nginx-secrets-store-inline-0-default-azure   81s
nginx-secrets-store-inline-1-default-azure   81s
---
apiVersion: "aadpodidentity.k8s.io/v1"
kind: AzureIdentity
metadata:
name: azid0
namespace: default
spec:
type: 0
resourceID: /subscriptions/<sub id>/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<identity name>
clientID: <MSI client ID>
apiVersion: v1
kind: ServiceAccount
metadata:
name: aad-pod-id-nmi-service-account
namespace: default
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: azureidentitybindings.aadpodidentity.k8s.io
{
"apiVersion": "vlabs",
"properties": {
"featureFlags": {
"enableIPv6DualStack": true
},
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.17",
"kubernetesConfig": {
@aramase
aramase / single-stack-ipv6.json
Last active September 1, 2020 19:35
API model for creating single stack IPv6 cluster on azure
{
"apiVersion": "vlabs",
"properties": {
"featureFlags": {
"enableIPv6Only": true
},
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.18",
"kubernetesConfig": {
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using Microsoft.Azure.KeyVault;
using Microsoft.Azure.Services.AppAuthentication;
using Newtonsoft.Json.Linq;
namespace aramase.test