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
|
|
@ -8,6 +8,7 @@ metadata:
|
|||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: {{ .Values.controller.component }}
|
||||
{{- include "argo-rollouts.selectorLabels" . | nindent 6 }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
|
|
@ -19,6 +20,7 @@ spec:
|
|||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-rollouts.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: {{ .Values.controller.component }}
|
||||
{{- range $key, $value := .Values.podLabels }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ kind: Service
|
|||
metadata:
|
||||
name: {{ include "argo-rollouts.fullname" . }}-metrics
|
||||
labels:
|
||||
app.kubernetes.io/component: server
|
||||
app.kubernetes.io/component: {{ .Values.controller.component }}
|
||||
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAnnotations }}
|
||||
annotations:
|
||||
|
|
@ -17,5 +17,6 @@ spec:
|
|||
port: 8090
|
||||
targetPort: 8090
|
||||
selector:
|
||||
{{- include "argo-rollouts.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: {{ .Values.controller.component }}
|
||||
{{- include "argo-rollouts.selectorLabels" . | nindent 4 }}
|
||||
{{- 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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue