From 97d2bf95d3ca5c9a665c5bb0b1d90086f32611e2 Mon Sep 17 00:00:00 2001 From: "Alessandro (Ale) Segala" <43508+ItalyPaleAle@users.noreply.github.com> Date: Tue, 27 Sep 2022 13:31:02 -0700 Subject: [PATCH] Add option to Helm chart to skip deploying Dapr dashboard (#5263) See #4724 Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Artur Souza --- .github/workflows/dapr-perf.yml | 2 +- .github/workflows/dapr-test.yml | 2 +- charts/dapr/README.md | 17 +++++++++-------- .../templates/dapr_dashboard_deployment.yaml | 2 ++ .../dapr_dashboard_poddisruptionbudget.yaml | 2 ++ .../templates/dapr_dashboard_service.yaml | 2 ++ charts/dapr/charts/dapr_dashboard/values.yaml | 1 + 7 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dapr-perf.yml b/.github/workflows/dapr-perf.yml index 88d7590aec2..f2dad7e098c 100644 --- a/.github/workflows/dapr-perf.yml +++ b/.github/workflows/dapr-perf.yml @@ -350,7 +350,7 @@ jobs: - name: Deploy dapr to AKS cluster if: env.TEST_PREFIX != '' env: - ADDITIONAL_HELM_SET: "dapr_operator.logLevel=debug,dapr_operator.watchInterval=20s" + ADDITIONAL_HELM_SET: "dapr_operator.logLevel=debug,dapr_operator.watchInterval=20s,dapr_dashboard.enabled=false" run: make docker-deploy-k8s - name: Deploy test components if: env.TEST_PREFIX != '' diff --git a/.github/workflows/dapr-test.yml b/.github/workflows/dapr-test.yml index fbf12142b86..787fdeed6bd 100644 --- a/.github/workflows/dapr-test.yml +++ b/.github/workflows/dapr-test.yml @@ -514,7 +514,7 @@ jobs: - name: Deploy dapr to AKS cluster if: env.TEST_PREFIX != '' env: - ADDITIONAL_HELM_SET: "dapr_operator.logLevel=debug,dapr_operator.watchInterval=20s" + ADDITIONAL_HELM_SET: "dapr_operator.logLevel=debug,dapr_operator.watchInterval=20s,dapr_dashboard.enabled=false" run: make docker-deploy-k8s - name: Deploy test components if: env.TEST_PREFIX != '' diff --git a/charts/dapr/README.md b/charts/dapr/README.md index 19a11a30134..8d52906a126 100644 --- a/charts/dapr/README.md +++ b/charts/dapr/README.md @@ -83,7 +83,7 @@ The Helm chart has the follow configuration options that can be supplied: | `global.ha.enabled` | Highly Availability mode enabled for control plane | `false` | | `global.ha.replicaCount` | Number of replicas of control plane services in Highly Availability mode | `3` | | `global.ha.disruption.minimumAvailable` | Minimum amount of available instances for control plane. This can either be effective count or %. | `` | -| `global.ha.disruption.maximumUnavailable` | Maximum amount of instances that are allowed to be unavailable for control plane. This can either be effective count or %. | `25%` | +| `global.ha.disruption.maximumUnavailable` | Maximum amount of instances that are allowed to be unavailable for control plane. This can either be effective count or %. | `25%` | | `global.prometheus.enabled` | Prometheus metrics enablement for control plane services | `true` | | `global.prometheus.port` | Prometheus scrape http endpoint port | `9090` | | `global.mtls.enabled` | Mutual TLS enablement | `true` | @@ -93,18 +93,19 @@ The Helm chart has the follow configuration options that can be supplied: | `global.daprControlPlaneOs` | Operating System for Dapr control plane | `linux` | | `global.daprControlPlaneArch` | CPU Architecture for Dapr control plane | `amd64` | | `global.nodeSelector` | Pods will be scheduled onto a node node whose labels match the nodeSelector | `{}` | -| `global.tolerations` | Pods will be allowed to schedule onto a node whose taints match the tolerations | `{}` | +| `global.tolerations` | Pods will be allowed to schedule onto a node whose taints match the tolerations | `{}` | | `global.labels` | Custom pod levels | `{}` | ### Dapr Dashboard options: | Parameter | Description | Default | |-------------------------------------------|-------------------------------------------------------------------------|-------------------------| -| `dapr_dashboard.replicaCount` | Number of replicas | `1` | -| `dapr_dashboard.logLevel` | service Log level | `info` | -| `dapr_dashboard.image.registry` | docker registry | `docker.io/daprio` | -| `dapr_dashboard.image.imagePullSecrets` | docker images pull secrets for docker registry | `docker.io/daprio` | -| `dapr_dashboard.image.name` | docker image name | `dashboard` | -| `dapr_dashboard.image.tag` | docker image tag | `"0.6.0"` | +| `dapr_dashboard.enabled` | Enable the Dapr dashboard | `true` | +| `dapr_dashboard.replicaCount` | Number of replicas | `1` | +| `dapr_dashboard.logLevel` | service Log level | `info` | +| `dapr_dashboard.image.registry` | docker registry | `docker.io/daprio` | +| `dapr_dashboard.image.imagePullSecrets` | docker images pull secrets for docker registry | `docker.io/daprio` | +| `dapr_dashboard.image.name` | docker image name | `dashboard` | +| `dapr_dashboard.image.tag` | docker image tag | `"0.6.0"` | | `dapr_dashboard.serviceType` | Type of [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to use for the Dapr Dashboard service | `ClusterIP` | | `dapr_dashboard.runAsNonRoot` | Boolean value for `securityContext.runAsNonRoot`. You may have to set this to `false` when running in Minikube | `true` | | `dapr_dashboard.resources` | Value of `resources` attribute. Can be used to set memory/cpu resources/limits. See the section "Resource configuration" above. Defaults to empty | `{}` | diff --git a/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_deployment.yaml b/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_deployment.yaml index c1e3e8dac23..91b66729d95 100644 --- a/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_deployment.yaml +++ b/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_deployment.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.enabled true }} apiVersion: apps/v1 kind: Deployment metadata: @@ -78,3 +79,4 @@ spec: tolerations: {{ toYaml .Values.global.tolerations | indent 8 }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_poddisruptionbudget.yaml b/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_poddisruptionbudget.yaml index 6e86378de46..c032ddf9c75 100644 --- a/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_poddisruptionbudget.yaml +++ b/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_poddisruptionbudget.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.enabled true }} {{- if eq .Values.global.ha.enabled true }} {{- if .Capabilities.APIVersions.Has "policy/v1" }} apiVersion: policy/v1 @@ -28,3 +29,4 @@ spec: {{- toYaml . | nindent 6 }} {{- end }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_service.yaml b/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_service.yaml index cb6122dd13f..3f5484d8b1d 100644 --- a/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_service.yaml +++ b/charts/dapr/charts/dapr_dashboard/templates/dapr_dashboard_service.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.enabled true }} kind: Service apiVersion: v1 metadata: @@ -14,3 +15,4 @@ spec: port: {{ .Values.ports.port }} targetPort: {{ .Values.ports.targetPort }} type: {{ .Values.serviceType }} +{{- end }} \ No newline at end of file diff --git a/charts/dapr/charts/dapr_dashboard/values.yaml b/charts/dapr/charts/dapr_dashboard/values.yaml index 67af2f04ea4..f6555a074b8 100644 --- a/charts/dapr/charts/dapr_dashboard/values.yaml +++ b/charts/dapr/charts/dapr_dashboard/values.yaml @@ -1,3 +1,4 @@ +enabled: true replicaCount: 1 logLevel: info