feat(argo-rollouts): add dashboard (#798)
* feat(argo-rollouts): add dashboard deployment and service credit: the implemention is inspired by the work from Andrii Perenesenko <andrii.perenesenko@gmail.com>. Signed-off-by: Hui Kang <hui.kang@salesforce.com> * Apply suggestions from code review Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Add components to selectlabels Signed-off-by: Hui Kang <hui.kang@salesforce.com> * Bump major version and add upgrading note Signed-off-by: Hui Kang <hui.kang@salesforce.com> * fix: Documentation on dashboard values, change annotations Signed-off-by: Hui Kang <hui.kang@salesforce.com> * feat: Enable dashboard during chart testing Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Hui Kang <hui.kang@salesforce.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
parent
879453808c
commit
3053af0500
12 changed files with 228 additions and 5 deletions
|
@ -19,3 +19,4 @@
|
||||||
.project
|
.project
|
||||||
.idea/
|
.idea/
|
||||||
*.tmproj
|
*.tmproj
|
||||||
|
ci/
|
||||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
appVersion: "v1.0.2"
|
appVersion: "v1.0.2"
|
||||||
description: A Helm chart for Argo Rollouts
|
description: A Helm chart for Argo Rollouts
|
||||||
name: argo-rollouts
|
name: argo-rollouts
|
||||||
version: 1.0.4
|
version: 2.0.0
|
||||||
icon: https://argoproj.github.io/argo-rollouts/assets/logo.png
|
icon: https://argoproj.github.io/argo-rollouts/assets/logo.png
|
||||||
home: https://github.com/argoproj/argo-helm
|
home: https://github.com/argoproj/argo-helm
|
||||||
maintainers:
|
maintainers:
|
||||||
|
@ -11,5 +11,4 @@ maintainers:
|
||||||
- name: jessesuen
|
- name: jessesuen
|
||||||
annotations:
|
annotations:
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- "[Fixed]: Add missing liveness and readiness probes"
|
- "[Added]: Dashboard manifests"
|
||||||
- "[Changed]: Fix icon url"
|
|
||||||
|
|
|
@ -25,6 +25,9 @@ $ helm repo add argo https://argoproj.github.io/argo-helm
|
||||||
$ helm install my-release argo/argo-rollouts
|
$ helm install my-release argo/argo-rollouts
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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`
|
||||||
|
|
||||||
## Chart Values
|
## Chart Values
|
||||||
|
|
||||||
| Key | Type | Default | Description |
|
| Key | Type | Default | Description |
|
||||||
|
@ -53,9 +56,30 @@ $ helm install my-release argo/argo-rollouts
|
||||||
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
|
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
|
||||||
| podSecurityContext | object | `{"runAsNonRoot": true}` | Security Context to set on pod level |
|
| podSecurityContext | object | `{"runAsNonRoot": true}` | Security Context to set on pod level |
|
||||||
| containerSecurityContext | object | `{}` | Security Context to set on container level |
|
| containerSecurityContext | object | `{}` | Security Context to set on container level |
|
||||||
|
| dashboard.enabled | bool | `false` | Deploy dashboard server |
|
||||||
|
| dashboard.component | string | `"rollouts-dashboard"` | Value of label `app.kubernetes.io/component` |
|
||||||
|
| dashboard.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
|
||||||
|
| dashboard.image.registry | string | `quay.io` | Registry to use |
|
||||||
|
| dashboard.image.repository | string | `"argoproj/kubectl-argo-rollouts"` | Repository to use |
|
||||||
|
| dashboard.image.tag | string | `""` | Overrides the image tag (default is the chart appVersion) |
|
||||||
|
| dashboard.resources | object | `{}` | Resource limits and requests for the dashboard pods. |
|
||||||
|
| 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/) |
|
||||||
|
| dashboard.podSecurityContext | object | `{"runAsNonRoot": true}` | Security Context to set on pod level |
|
||||||
|
| dashboard.containerSecurityContext | object | `{}` | Security Context to set on container level |
|
||||||
|
| dashboard.serviceAccount.create | bool | `true` | Specifies whether a dashboard service account should be created |
|
||||||
|
| dashboard.serviceAccount.annotations | object | `{}` | Annotations to add to the dashboard service account |
|
||||||
|
| dashboard.serviceAccount.name | string | `""` | The name of the dashboard service account to use. If not set and create is true, a name is generated using the fullname template |
|
||||||
|
|
||||||
## Upgrading
|
## Upgrading
|
||||||
|
|
||||||
|
### To 2.0.0
|
||||||
|
|
||||||
|
* The argo-rollouts dashboard is added to the template and can be enabled by setting `dashboard.enabled=true`.
|
||||||
|
* There is a breaking change where the selector label `app.kubernetes.io/component: {{ .Values.controller.component }}` is added to rollout's deployment and service in order to distinguish between the controller and the dashboard component.
|
||||||
|
To upgrade an existing installation, please **add the `--force` parameter** to the `helm upgrade` command or **delete the Deployment and Service resource** before you upgrade. This is necessary because Deployment's label selector is immutable.
|
||||||
|
|
||||||
### To 1.0.0
|
### To 1.0.0
|
||||||
|
|
||||||
* This is a breaking change which only supports Helm v3.0.0+ now. If you still use Helm v2, please consider upgrading because v2 is EOL since November 2020.
|
* This is a breaking change which only supports Helm v3.0.0+ now. If you still use Helm v2, please consider upgrading because v2 is EOL since November 2020.
|
||||||
|
|
2
charts/argo-rollouts/ci/test-values.yaml
Normal file
2
charts/argo-rollouts/ci/test-values.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
dashboard:
|
||||||
|
enabled: true
|
|
@ -8,6 +8,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: {{ .Values.controller.component }}
|
||||||
{{- include "argo-rollouts.selectorLabels" . | nindent 6 }}
|
{{- include "argo-rollouts.selectorLabels" . | nindent 6 }}
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
|
@ -19,6 +20,7 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-rollouts.selectorLabels" . | nindent 8 }}
|
{{- include "argo-rollouts.selectorLabels" . | nindent 8 }}
|
||||||
|
app.kubernetes.io/component: {{ .Values.controller.component }}
|
||||||
{{- range $key, $value := .Values.podLabels }}
|
{{- range $key, $value := .Values.podLabels }}
|
||||||
{{ $key }}: {{ $value | quote }}
|
{{ $key }}: {{ $value | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -4,7 +4,7 @@ kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "argo-rollouts.fullname" . }}-metrics
|
name: {{ include "argo-rollouts.fullname" . }}-metrics
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/component: server
|
app.kubernetes.io/component: {{ .Values.controller.component }}
|
||||||
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
||||||
{{- with .Values.serviceAnnotations }}
|
{{- with .Values.serviceAnnotations }}
|
||||||
annotations:
|
annotations:
|
||||||
|
@ -17,5 +17,6 @@ spec:
|
||||||
port: 8090
|
port: 8090
|
||||||
targetPort: 8090
|
targetPort: 8090
|
||||||
selector:
|
selector:
|
||||||
{{- include "argo-rollouts.selectorLabels" . | nindent 6 }}
|
app.kubernetes.io/component: {{ .Values.controller.component }}
|
||||||
|
{{- include "argo-rollouts.selectorLabels" . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
58
charts/argo-rollouts/templates/dashboard/clusterrole.yaml
Normal file
58
charts/argo-rollouts/templates/dashboard/clusterrole.yaml
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
{{- if and .Values.dashboard.enabled .Values.clusterInstall }}
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: {{ include "argo-rollouts.fullname" . }}-dashboard
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
||||||
|
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- argoproj.io
|
||||||
|
resources:
|
||||||
|
- rollouts
|
||||||
|
- rollouts/status
|
||||||
|
- rollouts/finalizers
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- apiGroups:
|
||||||
|
- argoproj.io
|
||||||
|
resources:
|
||||||
|
- analysisruns
|
||||||
|
- analysisruns/finalizers
|
||||||
|
- experiments
|
||||||
|
- experiments/finalizers
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- argoproj.io
|
||||||
|
resources:
|
||||||
|
- analysistemplates
|
||||||
|
- clusteranalysistemplates
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- replicasets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{{- if and .Values.dashboard.enabled .Values.clusterInstall }}
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "argo-rollouts.fullname" . }}-dashboard
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
||||||
|
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: {{ include "argo-rollouts.fullname" . }}-dashboard
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "argo-rollouts.serviceAccountName" . }}-dashboard
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
{{- end }}
|
59
charts/argo-rollouts/templates/dashboard/deployment.yaml
Normal file
59
charts/argo-rollouts/templates/dashboard/deployment.yaml
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
{{- if .Values.dashboard.enabled -}}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "argo-rollouts.fullname" . }}-dashboard
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
||||||
|
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "argo-rollouts.selectorLabels" . | nindent 6 }}
|
||||||
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "argo-rollouts.selectorLabels" . | nindent 8 }}
|
||||||
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
||||||
|
{{- range $key, $value := .Values.podLabels }}
|
||||||
|
{{ $key }}: {{ $value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "argo-rollouts.serviceAccountName" . }}-dashboard
|
||||||
|
containers:
|
||||||
|
- image: "{{ .Values.dashboard.image.registry }}/{{ .Values.dashboard.image.repository }}:{{ default .Chart.AppVersion .Values.dashboard.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.dashboard.image.pullPolicy }}
|
||||||
|
name: argo-rollouts-dashboard
|
||||||
|
ports:
|
||||||
|
- containerPort: 3100
|
||||||
|
name: dashboard
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.dashboard.containerSecurityContext | nindent 10 }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.dashboard.resources | nindent 10 }}
|
||||||
|
{{- if .Values.dashboard.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml .Values.dashboard.nodeSelector | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.dashboard.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.dashboard.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml .Values.dashboard.tolerations | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.dashboard.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml .Values.dashboard.affinity | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
13
charts/argo-rollouts/templates/dashboard/sa.yaml
Normal file
13
charts/argo-rollouts/templates/dashboard/sa.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{{- if and .Values.dashboard.enabled .Values.dashboard.serviceAccount.create }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "argo-rollouts.serviceAccountName" . }}-dashboard
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
||||||
|
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.dashboard.serviceAccount.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
22
charts/argo-rollouts/templates/dashboard/service.yaml
Normal file
22
charts/argo-rollouts/templates/dashboard/service.yaml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{{- if .Values.dashboard.enabled -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "argo-rollouts.fullname" . }}-dashboard
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
||||||
|
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.serviceAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: dashboard
|
||||||
|
protocol: TCP
|
||||||
|
port: 3100
|
||||||
|
targetPort: 3100
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: {{ .Values.dashboard.component }}
|
||||||
|
{{- include "argo-rollouts.selectorLabels" . | nindent 4 }}
|
||||||
|
{{- end }}
|
|
@ -94,3 +94,28 @@ podLabels: {}
|
||||||
# Secrets with credentials to pull images from a private registry
|
# Secrets with credentials to pull images from a private registry
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
# - name: argo-pull-secret
|
# - name: argo-pull-secret
|
||||||
|
|
||||||
|
dashboard:
|
||||||
|
enabled: false
|
||||||
|
component: rollouts-dashboard
|
||||||
|
## Node selectors and tolerations for server scheduling to nodes with taints
|
||||||
|
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
|
||||||
|
##
|
||||||
|
nodeSelector: {}
|
||||||
|
tolerations: []
|
||||||
|
affinity: {}
|
||||||
|
image:
|
||||||
|
registry: quay.io
|
||||||
|
repository: argoproj/kubectl-argo-rollouts
|
||||||
|
tag: ""
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
resources: {}
|
||||||
|
podSecurityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
containerSecurityContext: {}
|
||||||
|
serviceAccount:
|
||||||
|
create: true
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: ""
|
||||||
|
|
Loading…
Reference in a new issue