Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CCO-363: Adding azure identidy webhook
- Loading branch information
Showing
20 changed files
with
919 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: | ||
- /usr/bin/azure-workload-identity-webhook | ||
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: 6443 | ||
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 |
32 changes: 32 additions & 0 deletions
32
bindata/v4.1.0/azure-pod-identity-webhook/mutatingwebhook.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: pod-identity-webhook | ||
annotations: | ||
service.beta.openshift.io/inject-cabundle: "true" | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1 | ||
- v1beta1 | ||
clientConfig: | ||
service: | ||
name: pod-identity-webhook | ||
namespace: openshift-cloud-credential-operator | ||
path: /mutate-v1-pod | ||
failurePolicy: Fail | ||
matchPolicy: Equivalent | ||
name: pod-identity-webhook.azure.mutate.io | ||
objectSelector: | ||
matchLabels: | ||
azure.workload.identity/use: "true" | ||
reinvocationPolicy: IfNeeded | ||
rules: | ||
- apiGroups: | ||
- "" | ||
apiVersions: | ||
- v1 | ||
operations: | ||
- CREATE | ||
resources: | ||
- pods | ||
sideEffects: None |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,6 @@ metadata: | |
spec: | ||
ports: | ||
- port: 443 | ||
targetPort: 6443 | ||
targetPort: 9443 | ||
selector: | ||
app: pod-identity-webhook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.