Skip to content

Commit

Permalink
Flyte core webhook pod settings should be separate (#5490)
Browse files Browse the repository at this point in the history
Signed-off-by: ddl-ebrown <[email protected]>
  • Loading branch information
ddl-ebrown authored Jun 25, 2024
1 parent f715341 commit 5ab247f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
4 changes: 4 additions & 0 deletions charts/flyte-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"` | |
Expand Down
14 changes: 7 additions & 7 deletions charts/flyte-core/templates/propeller/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
---
Expand Down
8 changes: 8 additions & 0 deletions charts/flyte-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ab247f

Please sign in to comment.