From e4d94ad91eca84df43185cea38b07736d20a9521 Mon Sep 17 00:00:00 2001 From: MrWetsnow <509887+DanTulovsky@users.noreply.github.com> Date: Thu, 9 Dec 2021 10:12:58 -0500 Subject: [PATCH] feat(argo-rollouts): Allow setting the type for the dashboard service (#973) * feat: Allow setting the type for the dashboard service. (We have a requirement to run it as NodePort). Default to what it is if not set. Signed-off-by: Dan Tulovsky * Bump Chart version. Signed-off-by: Dan Tulovsky * Add serviceType into values.yaml Signed-off-by: Dan Tulovsky * Address review comments: Remove old changes annotation. Rename serviceType to service.type. Signed-off-by: Dan Tulovsky * Bump Chart version. Signed-off-by: Dan Tulovsky * Fix typo Signed-off-by: Dan Tulovsky * FIx indentation (lint error) Signed-off-by: Dan Tulovsky * Update README Signed-off-by: Dan Tulovsky * Update charts/argo-rollouts/README.md Co-authored-by: Marco Kilchhofer Signed-off-by: Dan Tulovsky * Apply suggestions from code review Signed-off-by: Marco Kilchhofer * fix changelog Signed-off-by: Marco Kilchhofer * docs: Add warning about exposing the Dashboard via Service type Signed-off-by: Marco Kilchhofer Co-authored-by: Marco Kilchhofer --- charts/argo-rollouts/Chart.yaml | 4 ++-- charts/argo-rollouts/README.md | 6 ++++++ charts/argo-rollouts/templates/dashboard/service.yaml | 1 + charts/argo-rollouts/values.yaml | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index 1e0976fd..707b627a 100644 --- a/charts/argo-rollouts/Chart.yaml +++ b/charts/argo-rollouts/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "v1.1.0" description: A Helm chart for Argo Rollouts name: argo-rollouts -version: 2.5.0 +version: 2.6.0 icon: https://argoproj.github.io/argo-rollouts/assets/logo.png home: https://github.com/argoproj/argo-helm maintainers: @@ -11,4 +11,4 @@ maintainers: - name: jessesuen annotations: artifacthub.io/changes: | - - "[Added]: Updated ClusterRole with new rules" + - "[Added]: Ability to set the type of Service on the dashboard Service" diff --git a/charts/argo-rollouts/README.md b/charts/argo-rollouts/README.md index 624cc2a6..19876ee7 100644 --- a/charts/argo-rollouts/README.md +++ b/charts/argo-rollouts/README.md @@ -24,10 +24,15 @@ To install the chart with the release name `my-release`: $ helm repo add argo https://argoproj.github.io/argo-helm $ helm install my-release argo/argo-rollouts ``` +### UI Dashboard If dashboard is installed by `--set dashboard.enabled=true`, checkout the argo-rollouts dashboard by `kubectl port-forward service/argo-rollouts-dashboard 31000:3100` and pointing the browser to `localhost:31000` +| :warning: WARNING when the Service type is set to LoadBalancer or NodePort | +|:---------------------------------------------------------------------------| +| The chart provides an option to change the service type (`dashboard.service.type`). Dashboard was never intended to be exposed as an administrative console -- it started out as a local view available via CLI. It should be protected by something (e.g. network access or even better an oauth proxy). | + ## Chart Values | Key | Type | Default | Description | @@ -67,6 +72,7 @@ If dashboard is installed by `--set dashboard.enabled=true`, checkout the argo-r | dashboard.image.tag | string | `""` | Overrides the image tag (default is the chart appVersion) | | dashboard.extraArgs | list | `[]` | Additional arguments for the dashboard. A list of flags. | | dashboard.resources | object | `{}` | Resource limits and requests for the dashboard pods. | +| dashboard.service.type | string | `ClusterIP` | Sets the type of the Service | | dashboard.tolerations | list | `[]` | [Tolerations for use with node taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | | dashboard.affinity | object | `{}` | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | | dashboard.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/user-guide/node-selection/) | diff --git a/charts/argo-rollouts/templates/dashboard/service.yaml b/charts/argo-rollouts/templates/dashboard/service.yaml index d2bd432b..b8605c58 100644 --- a/charts/argo-rollouts/templates/dashboard/service.yaml +++ b/charts/argo-rollouts/templates/dashboard/service.yaml @@ -11,6 +11,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + type: {{ .Values.dashboard.service.type }} ports: - name: dashboard protocol: TCP diff --git a/charts/argo-rollouts/values.yaml b/charts/argo-rollouts/values.yaml index caef4d0d..a598ad05 100644 --- a/charts/argo-rollouts/values.yaml +++ b/charts/argo-rollouts/values.yaml @@ -125,6 +125,8 @@ dashboard: podSecurityContext: runAsNonRoot: true containerSecurityContext: {} + service: + type: ClusterIP serviceAccount: create: true annotations: {}