Skip to content

Commit

Permalink
fix(helm): skip redoc when redoc.enabled is set to false
Browse files Browse the repository at this point in the history
The flyte chart includes four templates: minio, postgres, redis, and redoc.
A property following the pattern `<template_name>.enabled` does exist in
the `values.yaml` file. It is used to enabled/disable the template.

Setting `redoc.enabled` to `false` does not disable the `redoc` deployment
and service. This changeset fixes that problem by following the same
approach with the other templates: wrapping the resoruces under the
`templates/redoc` with an `if` statetement evaluating `Values.redoc.enabled`.

closes 4006

Signed-off-by: cmontemuino <[email protected]>
  • Loading branch information
cmontemuino committed Sep 4, 2023
1 parent 44f5f42 commit 2ff8a7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/flyte/templates/redoc/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.redoc.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -42,4 +43,5 @@ spec:
{{- with .Values.redoc.tolerations }}
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- end }}

3 changes: 3 additions & 0 deletions charts/flyte/templates/redoc/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.redoc.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -17,3 +18,5 @@ spec:
port: 87
targetPort: 8087
selector: {{ include "redoc.selectorLabels" . | nindent 4 }}
{{- end }}

0 comments on commit 2ff8a7d

Please sign in to comment.