Skip to content

Commit

Permalink
fix(helm-chart): introduce cert volumes to metrics and lifecycle oper…
Browse files Browse the repository at this point in the history
…ators (#3247)

Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Mar 12, 2024
1 parent 2222e77 commit b7744dd
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/scripts/.helm-tests/default/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11543,6 +11543,9 @@ spec:
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: keptn-certs
mountPath: /tmp/webhook/certs/
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -11560,6 +11563,10 @@ spec:
runAsNonRoot: true
serviceAccountName: lifecycle-operator
terminationGracePeriodSeconds: 10
volumes:
- name: keptn-certs
secret:
secretName: keptn-certs
---
# Source: keptn/charts/lifecycleOperator/templates/deployment.yaml
apiVersion: apps/v1
Expand Down Expand Up @@ -11736,6 +11743,8 @@ spec:
volumeMounts:
- mountPath: /tmp/metrics-adapter/serving-certs
name: adapter-certs-dir
- name: keptn-certs
mountPath: /tmp/webhook/certs/
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -11756,6 +11765,9 @@ spec:
volumes:
- emptyDir: {}
name: adapter-certs-dir
- name: keptn-certs
secret:
secretName: keptn-certs
---
# Source: keptn/charts/metricsOperator/templates/v1beta1.custom.metrics.k8s.io.yaml
apiVersion: apiregistration.k8s.io/v1
Expand Down
7 changes: 7 additions & 0 deletions .github/scripts/.helm-tests/lifecycle-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8953,6 +8953,9 @@ spec:
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: keptn-certs
mountPath: /tmp/webhook/certs/
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -8970,6 +8973,10 @@ spec:
runAsNonRoot: true
serviceAccountName: lifecycle-operator
terminationGracePeriodSeconds: 10
volumes:
- name: keptn-certs
secret:
secretName: keptn-certs
---
# Source: keptn/charts/lifecycleOperator/templates/deployment.yaml
apiVersion: apps/v1
Expand Down
7 changes: 7 additions & 0 deletions .github/scripts/.helm-tests/lifecycle-with-certs/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9267,6 +9267,9 @@ spec:
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: keptn-certs
mountPath: /tmp/webhook/certs/
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -9284,6 +9287,10 @@ spec:
runAsNonRoot: true
serviceAccountName: lifecycle-operator
terminationGracePeriodSeconds: 10
volumes:
- name: keptn-certs
secret:
secretName: keptn-certs
---
# Source: keptn/charts/lifecycleOperator/templates/deployment.yaml
apiVersion: apps/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2437,6 +2437,8 @@ spec:
volumeMounts:
- mountPath: /tmp/metrics-adapter/serving-certs
name: adapter-certs-dir
- name: keptn-certs
mountPath: /tmp/webhook/certs/
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -2457,6 +2459,9 @@ spec:
volumes:
- emptyDir: {}
name: adapter-certs-dir
- name: keptn-certs
secret:
secretName: keptn-certs
---
# Source: keptn/charts/metricsOperator/templates/metrics-validating-webhook-configuration.yaml
apiVersion: admissionregistration.k8s.io/v1
Expand Down
5 changes: 5 additions & 0 deletions .github/scripts/.helm-tests/metrics-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2460,6 +2460,8 @@ spec:
volumeMounts:
- mountPath: /tmp/metrics-adapter/serving-certs
name: adapter-certs-dir
- name: keptn-certs
mountPath: /tmp/webhook/certs/
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -2480,6 +2482,9 @@ spec:
volumes:
- emptyDir: {}
name: adapter-certs-dir
- name: keptn-certs
secret:
secretName: keptn-certs
---
# Source: keptn/charts/metricsOperator/templates/v1beta1.custom.metrics.k8s.io.yaml
apiVersion: apiregistration.k8s.io/v1
Expand Down
5 changes: 5 additions & 0 deletions .github/scripts/.helm-tests/metrics-with-certs/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2685,6 +2685,8 @@ spec:
volumeMounts:
- mountPath: /tmp/metrics-adapter/serving-certs
name: adapter-certs-dir
- name: keptn-certs
mountPath: /tmp/webhook/certs/
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -2705,6 +2707,9 @@ spec:
volumes:
- emptyDir: {}
name: adapter-certs-dir
- name: keptn-certs
secret:
secretName: keptn-certs
---
# Source: keptn/charts/metricsOperator/templates/v1beta1.custom.metrics.k8s.io.yaml
apiVersion: apiregistration.k8s.io/v1
Expand Down
7 changes: 7 additions & 0 deletions lifecycle-operator/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ spec:
}}
seccompProfile: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleOperator.containerSecurityContext.seccompProfile
"context" $) | nindent 12 }}
volumeMounts:
- name: keptn-certs
mountPath: /tmp/webhook/certs/
{{- if .Values.lifecycleOperator.livenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleOperator.livenessProbe "context" $) | nindent 10 }}
{{- else }}
Expand All @@ -160,6 +163,10 @@ spec:
runAsNonRoot: true
serviceAccountName: lifecycle-operator
terminationGracePeriodSeconds: 10
volumes:
- name: keptn-certs
secret:
secretName: keptn-certs
{{- if .Values.lifecycleOperator.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleOperator.topologySpreadConstraints "context" $) | nindent 8 }}
{{- end }}
Expand Down
7 changes: 7 additions & 0 deletions lifecycle-operator/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ spec:
capabilities:
drop:
- "ALL"
volumeMounts:
- name: keptn-certs
mountPath: /tmp/webhook/certs/
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -119,3 +122,7 @@ spec:
memory: 64Mi
serviceAccountName: lifecycle-operator
terminationGracePeriodSeconds: 10
volumes:
- name: keptn-certs
secret:
secretName: keptn-certs
5 changes: 5 additions & 0 deletions metrics-operator/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ spec:
volumeMounts:
- mountPath: /tmp/metrics-adapter/serving-certs
name: adapter-certs-dir
- name: keptn-certs
mountPath: /tmp/webhook/certs/
{{- if .Values.livenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.livenessProbe "context" $) | nindent 10 }}
{{- else }}
Expand Down Expand Up @@ -122,6 +124,9 @@ spec:
volumes:
- emptyDir: {}
name: adapter-certs-dir
- name: keptn-certs
secret:
secretName: keptn-certs
{{- if .Values.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions metrics-operator/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
volumes:
- emptyDir: {}
name: adapter-certs-dir
- name: keptn-certs
secret:
secretName: keptn-certs
containers:
- command:
- /manager
Expand Down Expand Up @@ -116,5 +119,7 @@ spec:
volumeMounts:
- name: adapter-certs-dir
mountPath: /tmp/metrics-adapter/serving-certs
- name: keptn-certs
mountPath: /tmp/webhook/certs/
serviceAccountName: metrics-operator
terminationGracePeriodSeconds: 10

0 comments on commit b7744dd

Please sign in to comment.