Skip to content

Commit

Permalink
Draft: Adding azure identidy webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
tsorya committed Jul 11, 2023
1 parent acfee1f commit 375d962
Show file tree
Hide file tree
Showing 16 changed files with 512 additions and 214 deletions.
28 changes: 0 additions & 28 deletions bindata/v4.1.0/aws-pod-identity-webhook/mutatingwebhook.yaml

This file was deleted.

99 changes: 99 additions & 0 deletions bindata/v4.1.0/azure-pod-identity-webhook/deployment.yaml
@@ -0,0 +1,99 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
azure-workload-identity.io/system: "true"
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
spec:
replicas: 2
selector:
matchLabels:
app: pod-identity-webhook
template:
metadata:
labels:
app: pod-identity-webhook
spec:
containers:
- args:
- --log-level=info
- --disable-cert-rotation=true
command:
- /manager
env:
- name: AZURE_TENANT_ID
valueFrom:
secretKeyRef:
name: azure-credentials
key: azure_tenant_id
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
image: ${IMAGE}
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 15
periodSeconds: 20
name: pod-identity-webhook
ports:
- containerPort: 9443
name: webhook-server
protocol: TCP
- containerPort: 8095
name: metrics
protocol: TCP
- containerPort: 9440
name: healthz
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
port: healthz
initialDelaySeconds: 5
periodSeconds: 5
resources:
limits:
cpu: 100m
memory: 30Mi
requests:
cpu: 100m
memory: 20Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: [ "ALL" ]
volumeMounts:
- mountPath: /certs
name: webhook-certs
readOnly: true
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 120
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 120
priorityClassName: system-cluster-critical
serviceAccountName: pod-identity-webhook
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
volumes:
- name: webhook-certs
secret:
secretName: pod-identity-webhook
File renamed without changes.
28 changes: 28 additions & 0 deletions bindata/v4.1.0/common/mutatingwebhook.yaml
@@ -0,0 +1,28 @@
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: pod-identity-webhook
annotations:
service.beta.openshift.io/inject-cabundle: "true"
webhooks:
- name: pod-identity-webhook.mutate.io
admissionReviewVersions:
- v1beta1
failurePolicy: Ignore
sideEffects: None
clientConfig:
service:
name: pod-identity-webhook
namespace: openshift-cloud-credential-operator
path: "/mutate"
namespaceSelector:
matchExpressions:
- key: openshift.io/run-level
operator: NotIn
values:
- "0"
rules:
- operations: [ "CREATE" ]
apiGroups: [""]
apiVersions: ["v1"]
resources: ["pods"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 375d962

Please sign in to comment.