From f518712c33d923f05f0d6978bbce3612d879b59e Mon Sep 17 00:00:00 2001 From: Maciej Lasyk Date: Wed, 5 Jan 2022 13:31:55 +0100 Subject: [PATCH] feat(argo-rollouts): Support LoadBalancer settings for dashboard Service (#1074) * feat(argo-rollouts): +LB service.type for dashboard svc Signed-off-by: Maciej Lasyk * Apply changes from code review Signed-off-by: Marco Kilchhofer Co-authored-by: Marco Kilchhofer --- charts/argo-rollouts/Chart.yaml | 5 +++-- charts/argo-rollouts/README.md | 3 +++ charts/argo-rollouts/templates/dashboard/service.yaml | 11 +++++++++++ charts/argo-rollouts/values.yaml | 6 ++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index 12d9a3eb..e389a4f5 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.7.0 +version: 2.8.0 icon: https://argoproj.github.io/argo-rollouts/assets/logo.png home: https://github.com/argoproj/argo-helm maintainers: @@ -11,4 +11,5 @@ maintainers: - name: jessesuen annotations: artifacthub.io/changes: | - - "[Added]: Support high availability (HA) mode for controller with multiple replicas" + - "[Added]: Ability to specify LoadBalancer settings for dashboard svc" + - "[Added]: Ability to specify external IPs for dashboard svc" diff --git a/charts/argo-rollouts/README.md b/charts/argo-rollouts/README.md index 19876ee7..77fccde7 100644 --- a/charts/argo-rollouts/README.md +++ b/charts/argo-rollouts/README.md @@ -72,6 +72,9 @@ 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.externalIPs | list | `[]` | Dashboard service external IPs | +| dashboard.service.loadBalancerIP | string | `""` | LoadBalancer will get created with the IP specified in this field | +| dashboard.service.loadBalancerSourceRanges | list | `[]` | Source IP ranges to allow access to service from | | 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/) | diff --git a/charts/argo-rollouts/templates/dashboard/service.yaml b/charts/argo-rollouts/templates/dashboard/service.yaml index b8605c58..4e3d7a65 100644 --- a/charts/argo-rollouts/templates/dashboard/service.yaml +++ b/charts/argo-rollouts/templates/dashboard/service.yaml @@ -11,6 +11,17 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- with .Values.dashboard.service.externalIPs }} + externalIPs: {{- toYaml . | nindent 4 }} + {{- end }} + {{- if eq .Values.dashboard.service.type "LoadBalancer" }} + {{- with .Values.dashboard.service.loadBalancerIP }} + loadBalancerIP: {{ . | quote }} + {{- end }} + {{- with .Values.dashboard.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} type: {{ .Values.dashboard.service.type }} ports: - name: dashboard diff --git a/charts/argo-rollouts/values.yaml b/charts/argo-rollouts/values.yaml index 8988bbdb..08148d85 100644 --- a/charts/argo-rollouts/values.yaml +++ b/charts/argo-rollouts/values.yaml @@ -128,6 +128,12 @@ dashboard: containerSecurityContext: {} service: type: ClusterIP + # -- LoadBalancer will get created with the IP specified in this field + loadBalancerIP: "" + # -- Source IP ranges to allow access to service from + loadBalancerSourceRanges: [] + # -- Dashboard service external IPs + externalIPs: [] serviceAccount: create: true annotations: {}