-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
8794538
commit 3053af0
Showing
12 changed files
with
228 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ | |
.project | ||
.idea/ | ||
*.tmproj | ||
ci/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dashboard: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
17 changes: 17 additions & 0 deletions
17
charts/argo-rollouts/templates/dashboard/clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters