From 6ae7f0d2d584a96c669822f807c46bfa4cca5fa4 Mon Sep 17 00:00:00 2001 From: "Ethan Brown (Domino)" <111539728+ddl-ebrown@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:56:15 -0700 Subject: [PATCH] Flyte core webhook pod settings should be separate (#5490) Signed-off-by: ddl-ebrown Signed-off-by: Vladyslav Libov --- charts/flyte-core/README.md | 4 ++++ charts/flyte-core/templates/propeller/webhook.yaml | 14 +++++++------- charts/flyte-core/values.yaml | 8 ++++++++ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/charts/flyte-core/README.md b/charts/flyte-core/README.md index 3703707660..99d92c0d41 100644 --- a/charts/flyte-core/README.md +++ b/charts/flyte-core/README.md @@ -317,6 +317,10 @@ helm install gateway bitnami/contour -n flyte | webhook.autoscaling.metrics[1].type | string | `"Resource"` | | | webhook.autoscaling.minReplicas | int | `1` | | | webhook.enabled | bool | `true` | enable or disable secrets webhook | +| webhook.nodeSelector | object | `{}` | nodeSelector for webhook deployment | +| webhook.podAnnotations | object | `{}` | Annotations for webhook pods | +| webhook.podEnv | object | `{}` | Additional webhook container environment variables | +| webhook.podLabels | object | `{}` | Labels for webhook pods | | webhook.priorityClassName | string | `""` | Sets priorityClassName for webhook pod | | webhook.prometheus.enabled | bool | `false` | | | webhook.prometheus.path | string | `"/metrics"` | | diff --git a/charts/flyte-core/templates/propeller/webhook.yaml b/charts/flyte-core/templates/propeller/webhook.yaml index 89757eff7c..4cc05796c5 100644 --- a/charts/flyte-core/templates/propeller/webhook.yaml +++ b/charts/flyte-core/templates/propeller/webhook.yaml @@ -26,12 +26,12 @@ spec: app: {{ template "flyte-pod-webhook.name" . }} app.kubernetes.io/name: {{ template "flyte-pod-webhook.name" . }} app.kubernetes.io/version: {{ .Values.flytepropeller.image.tag }} - {{- with .Values.flytepropeller.podLabels }} + {{- with .Values.webhook.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} annotations: configChecksum: {{ include (print .Template.BasePath "/propeller/configmap.yaml") . | sha256sum | trunc 63 | quote }} - {{- with .Values.flytepropeller.podAnnotations }} + {{- with .Values.webhook.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} prometheus.io/path: {{ .Values.webhook.prometheus.path | quote }} @@ -68,8 +68,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - {{- if .Values.flytepropeller.podEnv -}} - {{- with .Values.flytepropeller.podEnv -}} + {{- if .Values.webhook.podEnv -}} + {{- with .Values.webhook.podEnv -}} {{- toYaml . | nindent 10 }} {{- end }} {{- end }} @@ -100,8 +100,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - {{- if .Values.flytepropeller.podEnv -}} - {{- with .Values.flytepropeller.podEnv -}} + {{- if .Values.webhook.podEnv -}} + {{- with .Values.webhook.podEnv -}} {{- toYaml . | nindent 12 }} {{- end }} {{- end }} @@ -133,7 +133,7 @@ spec: - name: webhook-certs secret: secretName: flyte-pod-webhook - {{- with .Values.flytepropeller.nodeSelector }} + {{- with .Values.webhook.nodeSelector }} nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} --- diff --git a/charts/flyte-core/values.yaml b/charts/flyte-core/values.yaml index 3f2932ad4b..6fe64a614c 100755 --- a/charts/flyte-core/values.yaml +++ b/charts/flyte-core/values.yaml @@ -498,6 +498,14 @@ webhook: annotations: projectcontour.io/upstream-protocol.h2c: grpc type: ClusterIP + # -- Annotations for webhook pods + podAnnotations: {} + # -- Additional webhook container environment variables + podEnv: {} + # -- Labels for webhook pods + podLabels: {} + # -- nodeSelector for webhook deployment + nodeSelector: {} # -- Sets securityContext for webhook pod(s). securityContext: fsGroup: 65534