-
Notifications
You must be signed in to change notification settings - Fork 1
Add stackit-pod-identity-webhook image and configuration #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f3333d2
1c3d5d7
0f65310
5d86145
21751f2
e300dff
50efe80
8afe654
7a2cac1
3e37fbe
1100329
06e0445
11686a5
70ad3fa
c62fc7a
4e3829f
aa730ee
938895f
060b49b
ffb97e1
ac00fa9
04bc7b8
47223b8
90c5039
c9a9308
1f66f50
598a711
f4513a8
dba7256
377d40d
8750445
a5bac03
f8e7258
24755b5
2477a93
0cd5a91
bf6fac6
ccbd263
12b8b62
127036c
584bfbd
7b102ea
45185b2
4af394c
0854e31
a516094
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| apiVersion: v1 | ||
| name: pod-identity-webhook | ||
| version: 0.1.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: stackit-pod-identity-webhook | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| high-availability-config.resources.gardener.cloud/type: server | ||
| spec: | ||
| replicas: {{ .Values.replicaCount }} | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| workload-identity.stackit.cloud/skip-pod-identity-webhook: "true" | ||
| gardener.cloud/role: controlplane | ||
| spec: | ||
| topologySpreadConstraints: | ||
| - maxSkew: 1 | ||
| topologyKey: "topology.kubernetes.io/zone" | ||
| whenUnsatisfiable: DoNotSchedule | ||
| labelSelector: | ||
| matchLabels: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| - maxSkew: 1 | ||
| topologyKey: "kubernetes.io/hostname" | ||
| whenUnsatisfiable: ScheduleAnyway | ||
| labelSelector: | ||
| matchLabels: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| automountServiceAccountToken: false | ||
| podSecurityContext: | ||
| runAsNonRoot: true | ||
| runAsUser: 1239 | ||
| runAsGroup: 1239 | ||
| fsGroup: 1239 | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| readOnlyRootFilesystem: true | ||
| priorityClassName: gardener-system-200 | ||
| containers: | ||
| - name: stackit-pod-identity-webhook | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| readOnlyRootFilesystem: true | ||
| image: {{ index .Values.images "stackit-pod-identity-webhook" }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add an example value for |
||
| args: | ||
| - --cert-dir=/etc/webhook/certs | ||
| - --port={{ .Values.webhook.port }} | ||
| env: | ||
| - name: KUBECONFIG | ||
| value: /var/run/secrets/gardener.cloud/shoot/generic-kubeconfig/kubeconfig | ||
| ports: | ||
| - name: https | ||
| containerPort: {{ .Values.webhook.port }} | ||
| protocol: TCP | ||
| - name: metrics | ||
| containerPort: 8080 | ||
| protocol: TCP | ||
| - name: health | ||
| containerPort: 8081 | ||
| protocol: TCP | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /healthz | ||
| port: health | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /readyz | ||
| port: health | ||
| resources: | ||
| limits: | ||
| memory: 128Mi | ||
| requests: | ||
| cpu: 50m | ||
| memory: 64Mi | ||
| volumeMounts: | ||
| - name: certs | ||
| mountPath: /etc/webhook/certs | ||
| readOnly: true | ||
| - mountPath: /var/run/secrets/gardener.cloud/shoot/generic-kubeconfig | ||
| name: kubeconfig | ||
| readOnly: true | ||
| volumes: | ||
| - name: certs | ||
| secret: | ||
| secretName: {{ .Values.webhook.tlsSecretName }} | ||
| - name: kubeconfig | ||
| projected: | ||
| defaultMode: 420 | ||
| sources: | ||
| - secret: | ||
| items: | ||
| - key: kubeconfig | ||
| path: kubeconfig | ||
| name: {{ .Values.global.genericTokenKubeconfigSecretName }} | ||
| optional: false | ||
| - secret: | ||
| items: | ||
| - key: token | ||
| path: token | ||
| name: shoot-access-pod-identity-webhook | ||
| optional: false | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| apiVersion: policy/v1 | ||
| kind: PodDisruptionBudget | ||
| metadata: | ||
| name: stackit-pod-identity-webhook | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| spec: | ||
| maxUnavailable: 1 | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| unhealthyPodEvictionPolicy: AlwaysAllow |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we make this service topology-aware? ref https://github.com/gardener/gardener/blob/master/docs/development/component-checklist.md#high-availability--stability |
||
| metadata: | ||
| name: stackit-pod-identity-webhook | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| endpoint-slice-hints.resources.gardener.cloud/consider: "true" | ||
| annotations: | ||
| networking.resources.gardener.cloud/from-all-webhook-targets-allowed-ports: '[{"protocol":"TCP","port":{{ .Values.webhook.port }}}]' | ||
| service.kubernetes.io/topology-mode: auto | ||
| spec: | ||
| type: ClusterIP | ||
| ports: | ||
| - port: 443 | ||
| targetPort: {{ .Values.webhook.port }} | ||
| protocol: TCP | ||
| name: https | ||
| selector: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| trafficDistribution: PreferClose | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| apiVersion: autoscaling.k8s.io/v1 | ||
| kind: VerticalPodAutoscaler | ||
| metadata: | ||
| name: stackit-pod-identity-webhook | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| targetRef: | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| name: stackit-pod-identity-webhook | ||
| updatePolicy: | ||
| updateMode: Auto | ||
| resourcePolicy: | ||
| containerPolicies: | ||
| - containerName: stackit-pod-identity-webhook | ||
| minAllowed: | ||
| memory: 80M | ||
| maxAllowed: | ||
| cpu: {{ .Values.vpa.resourcePolicy.maxAllowed.cpu }} | ||
| memory: {{ .Values.vpa.resourcePolicy.maxAllowed.memory }} | ||
| controlledValues: RequestsOnly |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| replicaCount: 2 | ||
|
|
||
| images: | ||
| stackit-pod-identity-webhook: image-repository:image-tag | ||
|
|
||
| webhook: | ||
| port: 9443 | ||
| # The secret name containing tls.crt and tls.key for the webhook server | ||
| tlsSecretName: "stackit-pod-identity-webhook-certs" | ||
|
|
||
| vpa: | ||
| resourcePolicy: | ||
| maxAllowed: | ||
| cpu: 1 | ||
| memory: 512Mi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| apiVersion: v1 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you still need to include this chart in the |
||
| name: pod-identity-webhook | ||
| version: 0.1.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| apiVersion: admissionregistration.k8s.io/v1 | ||
| kind: MutatingWebhookConfiguration | ||
| metadata: | ||
| name: stackit-pod-identity-webhook | ||
| labels: | ||
| app.kubernetes.io/name: stackit-pod-identity-webhook | ||
| webhooks: | ||
| - name: stackit-pod-identity-webhook.stackit.cloud | ||
| clientConfig: | ||
| url: {{ .Values.webhook.url | quote }} | ||
| caBundle: {{ .Values.webhook.caBundle | quote }} | ||
| rules: | ||
| - operations: ["CREATE"] | ||
| apiGroups: [""] | ||
| apiVersions: ["v1"] | ||
| resources: ["pods"] | ||
| admissionReviewVersions: ["v1"] | ||
| sideEffects: None | ||
| failurePolicy: Fail | ||
| namespaceSelector: | ||
| matchExpressions: | ||
| - key: app.kubernetes.io/name | ||
| operator: NotIn | ||
| values: ["gardener-extension-provider-stackit"] | ||
| - key: kubernetes.io/metadata.name | ||
| operator: NotIn | ||
| values: ["kube-system", "garden"] | ||
| - key: workload-identity.stackit.cloud/skip-pod-identity-webhook | ||
| operator: DoesNotExist | ||
| objectSelector: | ||
| matchExpressions: | ||
| - key: workload-identity.stackit.cloud/skip-pod-identity-webhook | ||
| operator: DoesNotExist |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| webhook: | ||
| caBundle: "" # will be set by valuesprovider | ||
| controlPlaneNamespace: "" # will be set by valuesprovider |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,3 +135,6 @@ images: | |
| - name: stackit-alb-controller-manager | ||
| repository: reg3.infra.ske.eu01.stackit.cloud/temp/alb-controller-manager | ||
| tag: "1245" | ||
| - name: stackit-pod-identity-webhook | ||
| repository: reg3.infra.ske.eu01.stackit.cloud/stackitcloud/stackit-pod-identity-webhook | ||
| tag: "726f2f0@sha256:fca1f67cd7e6a515e795a34ae45d0c239379d051e494dc202033f6987b41b154" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the record (as discussed in chat): the |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you still need to include this chart in the
requirements.yamlin theseed-controlplanechart