From 90ba18a8c1900f419486a5043d04618f40079b2f Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Fri, 14 Oct 2022 17:16:20 +0200 Subject: [PATCH] charts: honor redoc.enabled=false also use correct nodeSelector and fix doc Signed-off-by: Felix Ruess --- charts/flyte-deps/README.md | 18 +++++++-------- .../templates/redoc/deployment.yaml | 2 +- .../flyte-deps/templates/redoc/service.yaml | 2 ++ charts/flyte-deps/values.yaml | 18 +++++++-------- charts/flyte/README.md | 18 +++++++-------- charts/flyte/templates/redoc/deployment.yaml | 5 +++-- charts/flyte/templates/redoc/service.yaml | 2 ++ charts/flyte/values.yaml | 18 +++++++-------- .../flyte_sandbox_deps_helm_generated.yaml | 22 ------------------- 9 files changed, 44 insertions(+), 61 deletions(-) diff --git a/charts/flyte-deps/README.md b/charts/flyte-deps/README.md index 014e19c251..9127d8098e 100644 --- a/charts/flyte-deps/README.md +++ b/charts/flyte-deps/README.md @@ -103,19 +103,19 @@ helm upgrade -f values.yaml flyte . | postgres.service | object | `{"annotations":{},"type":"NodePort"}` | Service settings for Postgres | | postgres.tolerations | list | `[]` | tolerations for Postgres deployment | | redis.enabled | bool | `false` | - enable or disable Redis Statefulset installation | -| redoc.affinity | object | `{}` | affinity for Minio deployment | -| redoc.enabled | bool | `false` | - enable or disable Minio deployment installation | +| redoc.affinity | object | `{}` | affinity for redoc deployment | +| redoc.enabled | bool | `false` | - enable or disable redoc deployment installation | | redoc.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | -| redoc.image.repository | string | `"docker.io/redocly/redoc"` | Docker image for Minio deployment | +| redoc.image.repository | string | `"docker.io/redocly/redoc"` | Docker image for redoc deployment | | redoc.image.tag | string | `"latest"` | Docker image tag | -| redoc.nodeSelector | object | `{}` | nodeSelector for Minio deployment | -| redoc.podAnnotations | object | `{}` | Annotations for Minio pods | -| redoc.replicaCount | int | `1` | Replicas count for Minio deployment | -| redoc.resources | object | `{"limits":{"cpu":"200m","memory":"512Mi"},"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources requests and limits for Minio deployment | +| redoc.nodeSelector | object | `{}` | nodeSelector for redoc deployment | +| redoc.podAnnotations | object | `{}` | Annotations for redoc pods | +| redoc.replicaCount | int | `1` | Replicas count for redoc deployment | +| redoc.resources | object | `{"limits":{"cpu":"200m","memory":"512Mi"},"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources requests and limits for redoc deployment | | redoc.resources.limits | object | `{"cpu":"200m","memory":"512Mi"}` | Limits are the maximum set of resources needed for this pod | | redoc.resources.requests | object | `{"cpu":"10m","memory":"128Mi"}` | Requests are the minimum set of resources needed for this pod | -| redoc.service | object | `{"type":"ClusterIP"}` | Service settings for Minio | -| redoc.tolerations | list | `[]` | tolerations for Minio deployment | +| redoc.service | object | `{"type":"ClusterIP"}` | Service settings for redoc | +| redoc.tolerations | list | `[]` | tolerations for redoc deployment | | sparkoperator | object | `{"enabled":false}` | Optional: Spark Plugin using the Spark Operator | | sparkoperator.enabled | bool | `false` | - enable or disable Sparkoperator deployment installation | | webhook.enabled | bool | `true` | | diff --git a/charts/flyte-deps/templates/redoc/deployment.yaml b/charts/flyte-deps/templates/redoc/deployment.yaml index a2cd199f95..db96f4e2e6 100644 --- a/charts/flyte-deps/templates/redoc/deployment.yaml +++ b/charts/flyte-deps/templates/redoc/deployment.yaml @@ -34,7 +34,7 @@ spec: ports: - containerPort: 8087 resources: {{ toYaml .Values.redoc.resources | nindent 10 }} - {{- with .Values.minio.nodeSelector }} + {{- with .Values.redoc.nodeSelector }} nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} {{- with .Values.redoc.affinity }} diff --git a/charts/flyte-deps/templates/redoc/service.yaml b/charts/flyte-deps/templates/redoc/service.yaml index 9f9eace073..6924557ccd 100644 --- a/charts/flyte-deps/templates/redoc/service.yaml +++ b/charts/flyte-deps/templates/redoc/service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.redoc.enabled }} apiVersion: v1 kind: Service metadata: @@ -17,3 +18,4 @@ spec: port: 87 targetPort: 8087 selector: {{ include "redoc.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/flyte-deps/values.yaml b/charts/flyte-deps/values.yaml index 58aef81360..af6114bc7d 100755 --- a/charts/flyte-deps/values.yaml +++ b/charts/flyte-deps/values.yaml @@ -87,18 +87,18 @@ minio: affinity: {} redoc: - # --- enable or disable Minio deployment installation + # --- enable or disable redoc deployment installation enabled: false - # -- Replicas count for Minio deployment + # -- Replicas count for redoc deployment replicaCount: 1 image: - # -- Docker image for Minio deployment + # -- Docker image for redoc deployment repository: docker.io/redocly/redoc # -- Docker image tag tag: latest # -- Docker image pull policy pullPolicy: IfNotPresent - # -- Default resources requests and limits for Minio deployment + # -- Default resources requests and limits for redoc deployment resources: # -- Requests are the minimum set of resources needed for this pod requests: @@ -108,16 +108,16 @@ redoc: limits: cpu: 200m memory: 512Mi - # -- Service settings for Minio + # -- Service settings for redoc service: type: ClusterIP - # -- Annotations for Minio pods + # -- Annotations for redoc pods podAnnotations: {} - # -- nodeSelector for Minio deployment + # -- nodeSelector for redoc deployment nodeSelector: {} - # -- tolerations for Minio deployment + # -- tolerations for redoc deployment tolerations: [] - # -- affinity for Minio deployment + # -- affinity for redoc deployment affinity: {} # diff --git a/charts/flyte/README.md b/charts/flyte/README.md index 30c060babb..6a14f31f02 100644 --- a/charts/flyte/README.md +++ b/charts/flyte/README.md @@ -235,18 +235,18 @@ helm upgrade -f values-sandbox.yaml flyte . | postgres.tolerations | list | `[]` | tolerations for Postgres deployment | | redis | object | `{"enabled":false}` | --------------------------------------------- REDIS SETTINGS | | redis.enabled | bool | `false` | - enable or disable Redis Statefulset installation | -| redoc.affinity | object | `{}` | affinity for Minio deployment | -| redoc.enabled | bool | `true` | - enable or disable Minio deployment installation | +| redoc.affinity | object | `{}` | affinity for redoc deployment | +| redoc.enabled | bool | `true` | - enable or disable redoc deployment installation | | redoc.image.pullPolicy | string | `"IfNotPresent"` | Docker image pull policy | -| redoc.image.repository | string | `"docker.io/redocly/redoc"` | Docker image for Minio deployment | +| redoc.image.repository | string | `"docker.io/redocly/redoc"` | Docker image for redoc deployment | | redoc.image.tag | string | `"latest"` | Docker image tag | -| redoc.nodeSelector | object | `{}` | nodeSelector for Minio deployment | -| redoc.podAnnotations | object | `{}` | Annotations for Minio pods | -| redoc.replicaCount | int | `1` | Replicas count for Minio deployment | -| redoc.resources | object | `{"limits":{"cpu":"200m","memory":"512Mi"},"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources requests and limits for Minio deployment | +| redoc.nodeSelector | object | `{}` | nodeSelector for redoc deployment | +| redoc.podAnnotations | object | `{}` | Annotations for redoc pods | +| redoc.replicaCount | int | `1` | Replicas count for redoc deployment | +| redoc.resources | object | `{"limits":{"cpu":"200m","memory":"512Mi"},"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources requests and limits for redoc deployment | | redoc.resources.limits | object | `{"cpu":"200m","memory":"512Mi"}` | Limits are the maximum set of resources needed for this pod | | redoc.resources.requests | object | `{"cpu":"10m","memory":"128Mi"}` | Requests are the minimum set of resources needed for this pod | -| redoc.service | object | `{"type":"ClusterIP"}` | Service settings for Minio | -| redoc.tolerations | list | `[]` | tolerations for Minio deployment | +| redoc.service | object | `{"type":"ClusterIP"}` | Service settings for redoc | +| redoc.tolerations | list | `[]` | tolerations for redoc deployment | | sparkoperator | object | `{"enabled":false}` | Optional: Spark Plugin using the Spark Operator | | sparkoperator.enabled | bool | `false` | - enable or disable Sparkoperator deployment installation | diff --git a/charts/flyte/templates/redoc/deployment.yaml b/charts/flyte/templates/redoc/deployment.yaml index f194672ccf..808c9c42f8 100644 --- a/charts/flyte/templates/redoc/deployment.yaml +++ b/charts/flyte/templates/redoc/deployment.yaml @@ -1,3 +1,4 @@ +{{- if .Values.redoc.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -33,7 +34,7 @@ spec: ports: - containerPort: 8087 resources: {{ toYaml .Values.redoc.resources | nindent 10 }} - {{- with .Values.minio.nodeSelector }} + {{- with .Values.redoc.nodeSelector }} nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} {{- with .Values.redoc.affinity }} @@ -42,4 +43,4 @@ spec: {{- with .Values.redoc.tolerations }} tolerations: {{ tpl (toYaml .) $ | nindent 8 }} {{- end }} - +{{- end }} diff --git a/charts/flyte/templates/redoc/service.yaml b/charts/flyte/templates/redoc/service.yaml index 9f9eace073..6924557ccd 100644 --- a/charts/flyte/templates/redoc/service.yaml +++ b/charts/flyte/templates/redoc/service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.redoc.enabled }} apiVersion: v1 kind: Service metadata: @@ -17,3 +18,4 @@ spec: port: 87 targetPort: 8087 selector: {{ include "redoc.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/flyte/values.yaml b/charts/flyte/values.yaml index 8a28735828..366ae06797 100755 --- a/charts/flyte/values.yaml +++ b/charts/flyte/values.yaml @@ -751,18 +751,18 @@ minio: affinity: {} redoc: - # --- enable or disable Minio deployment installation + # --- enable or disable redoc deployment installation enabled: true - # -- Replicas count for Minio deployment + # -- Replicas count for redoc deployment replicaCount: 1 image: - # -- Docker image for Minio deployment + # -- Docker image for redoc deployment repository: docker.io/redocly/redoc # -- Docker image tag tag: latest # -- Docker image pull policy pullPolicy: IfNotPresent - # -- Default resources requests and limits for Minio deployment + # -- Default resources requests and limits for redoc deployment resources: # -- Requests are the minimum set of resources needed for this pod requests: @@ -772,16 +772,16 @@ redoc: limits: cpu: 200m memory: 512Mi - # -- Service settings for Minio + # -- Service settings for redoc service: type: ClusterIP - # -- Annotations for Minio pods + # -- Annotations for redoc pods podAnnotations: {} - # -- nodeSelector for Minio deployment + # -- nodeSelector for redoc deployment nodeSelector: {} - # -- tolerations for Minio deployment + # -- tolerations for redoc deployment tolerations: [] - # -- affinity for Minio deployment + # -- affinity for redoc deployment affinity: {} # diff --git a/deployment/sandbox/flyte_sandbox_deps_helm_generated.yaml b/deployment/sandbox/flyte_sandbox_deps_helm_generated.yaml index c5a42c3f6b..b34afed5a5 100644 --- a/deployment/sandbox/flyte_sandbox_deps_helm_generated.yaml +++ b/deployment/sandbox/flyte_sandbox_deps_helm_generated.yaml @@ -527,28 +527,6 @@ spec: app.kubernetes.io/name: postgres app.kubernetes.io/instance: flyte --- -# Source: flyte-deps/templates/redoc/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: redoc - namespace: flyte - labels: - app.kubernetes.io/name: redoc - app.kubernetes.io/instance: flyte - helm.sh/chart: flyte-deps-v0.1.10 - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - ports: - - name: redoc - protocol: TCP - port: 87 - targetPort: 8087 - selector: - app.kubernetes.io/name: redoc - app.kubernetes.io/instance: flyte ---- # Source: flyte-deps/templates/webhook/service.yaml apiVersion: v1 kind: Service