Skip to content

Commit c1fee0f

Browse files
patjlmclaude
andcommitted
feat: add optional in-cluster dashboard deployment
Add dashboard.enabled values toggle that deploys the dashboard UI as an in-cluster Deployment + Service. Users add their own Ingress/Gateway on top. Follows the existing apiserver template pattern. Ref: argoproj-labs/gitops-promoter#1645 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 87c0f50 commit c1fee0f

8 files changed

Lines changed: 246 additions & 1 deletion

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,27 @@ kubectl get promotionstrategydetails -A
9494

9595
See the upstream [Dashboard aggregation API docs](https://github.com/argoproj-labs/gitops-promoter/blob/main/docs/advanced-usage/dashboard-apiserver.md) for details.
9696

97+
## In-cluster dashboard UI
98+
99+
The chart can optionally deploy the GitOps Promoter **dashboard web UI** as an in-cluster
100+
Deployment + Service, so teams can access a shared, always-available dashboard through their
101+
own Ingress/Gateway without requiring every user to have local CLI + kubeconfig access.
102+
It is **disabled by default** and requires the apiserver (above) to be enabled.
103+
104+
Enable it with:
105+
106+
```yaml
107+
apiserver:
108+
enabled: true
109+
certs:
110+
mode: cert-manager # or insecure / manual
111+
dashboard:
112+
enabled: true
113+
```
114+
115+
The dashboard Service listens on port 80 (targeting the container's port 8080). Add your own
116+
Ingress, Gateway API HTTPRoute, or other routing and authentication resources on top.
117+
97118
## Known Limitations
98119
99120
### kube-rbac-proxy image and resources are not configurable

chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: gitops-promoter
33
description: A Helm chart to install GitOps Promoter, a GitOps-native environment promotion tool.
44
type: application
5-
version: 0.12.1
5+
version: 0.12.2
66
appVersion: 0.32.0
77
keywords:
88
- kubernetes
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{/*
2+
Resolves the dashboard image, defaulting to the manager image when
3+
dashboard.image overrides are not set (the dashboard and controller share one image).
4+
*/}}
5+
{{- define "promoter.dashboard.image" -}}
6+
{{- $img := .Values.dashboard.image | default dict -}}
7+
{{- $repo := $img.repository | default .Values.manager.image.repository -}}
8+
{{- $tag := $img.tag | default .Values.manager.image.tag | default .Chart.AppVersion -}}
9+
{{- if contains "@" $repo -}}
10+
{{- $repo -}}
11+
{{- else -}}
12+
{{- printf "%s:%s" $repo $tag -}}
13+
{{- end -}}
14+
{{- end -}}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{{- if .Values.dashboard.enabled }}
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }}
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
app.kubernetes.io/name: deployment
9+
app.kubernetes.io/component: dashboard
10+
app.kubernetes.io/part-of: promoter
11+
app.kubernetes.io/managed-by: {{ .Release.Service }}
12+
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
13+
spec:
14+
replicas: {{ .Values.dashboard.replicas }}
15+
selector:
16+
matchLabels:
17+
app.kubernetes.io/component: dashboard
18+
template:
19+
metadata:
20+
labels:
21+
app.kubernetes.io/component: dashboard
22+
spec:
23+
securityContext:
24+
{{- toYaml .Values.dashboard.podSecurityContext | nindent 8 }}
25+
containers:
26+
- name: dashboard
27+
image: {{ include "promoter.dashboard.image" . }}
28+
imagePullPolicy: {{ (.Values.dashboard.image).pullPolicy | default .Values.manager.image.pullPolicy }}
29+
command:
30+
- /usr/bin/tini
31+
- "--"
32+
- /gitops-promoter
33+
- dashboard
34+
args:
35+
- --port={{ .Values.dashboard.port }}
36+
ports:
37+
- name: http
38+
containerPort: {{ .Values.dashboard.port }}
39+
protocol: TCP
40+
securityContext:
41+
{{- toYaml .Values.dashboard.securityContext | nindent 12 }}
42+
livenessProbe:
43+
httpGet:
44+
path: /healthz
45+
port: http
46+
initialDelaySeconds: 15
47+
periodSeconds: 20
48+
readinessProbe:
49+
httpGet:
50+
path: /healthz
51+
port: http
52+
initialDelaySeconds: 5
53+
periodSeconds: 10
54+
resources:
55+
{{- toYaml .Values.dashboard.resources | nindent 12 }}
56+
serviceAccountName: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }}
57+
terminationGracePeriodSeconds: 10
58+
{{- with .Values.dashboard.nodeSelector }}
59+
nodeSelector:
60+
{{- toYaml . | nindent 8 }}
61+
{{- end }}
62+
{{- with .Values.dashboard.tolerations }}
63+
tolerations:
64+
{{- toYaml . | nindent 8 }}
65+
{{- end }}
66+
{{- with .Values.dashboard.affinity }}
67+
affinity:
68+
{{- toYaml . | nindent 8 }}
69+
{{- end }}
70+
{{- end }}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{{- if .Values.dashboard.enabled }}
2+
---
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRole
5+
metadata:
6+
name: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }}
7+
labels:
8+
app.kubernetes.io/component: dashboard
9+
app.kubernetes.io/part-of: promoter
10+
app.kubernetes.io/managed-by: {{ .Release.Service }}
11+
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
12+
rules:
13+
- apiGroups:
14+
- view.promoter.argoproj.io
15+
resources:
16+
- promotionstrategydetails
17+
verbs:
18+
- get
19+
- list
20+
- watch
21+
- apiGroups:
22+
- promoter.argoproj.io
23+
resources:
24+
- promotionstrategies
25+
verbs:
26+
- get
27+
- list
28+
---
29+
apiVersion: rbac.authorization.k8s.io/v1
30+
kind: ClusterRoleBinding
31+
metadata:
32+
name: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }}
33+
labels:
34+
app.kubernetes.io/component: dashboard
35+
app.kubernetes.io/part-of: promoter
36+
app.kubernetes.io/managed-by: {{ .Release.Service }}
37+
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
38+
roleRef:
39+
apiGroup: rbac.authorization.k8s.io
40+
kind: ClusterRole
41+
name: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }}
42+
subjects:
43+
- kind: ServiceAccount
44+
name: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }}
45+
namespace: {{ .Release.Namespace }}
46+
{{- end }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- if .Values.dashboard.enabled }}
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }}
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
app.kubernetes.io/name: service
9+
app.kubernetes.io/component: dashboard
10+
app.kubernetes.io/part-of: promoter
11+
app.kubernetes.io/managed-by: {{ .Release.Service }}
12+
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
13+
spec:
14+
selector:
15+
app.kubernetes.io/component: dashboard
16+
ports:
17+
- name: http
18+
port: 80
19+
targetPort: http
20+
protocol: TCP
21+
{{- end }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if .Values.dashboard.enabled }}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }}
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
app.kubernetes.io/name: serviceaccount
9+
app.kubernetes.io/component: dashboard
10+
app.kubernetes.io/part-of: promoter
11+
app.kubernetes.io/managed-by: {{ .Release.Service }}
12+
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
13+
{{- end }}

chart/values.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,66 @@ controllerConfiguration:
241241
webhook:
242242
enable: true
243243

244+
## Dashboard web UI deployment.
245+
## Deploys the dashboard as an in-cluster Deployment + Service so teams can access
246+
## it through their own Ingress/Gateway without requiring local CLI + kubeconfig.
247+
## Requires the apiserver (below) to be enabled for the dashboard to function.
248+
##
249+
dashboard:
250+
## Enable the in-cluster dashboard UI (Deployment + Service + RBAC).
251+
enabled: false
252+
253+
## Replica count for the dashboard Deployment.
254+
replicas: 1
255+
256+
## Image override. Defaults to the manager image (the dashboard and controller share a
257+
## single image). Set repository/tag/pullPolicy to override.
258+
image: {}
259+
# repository: quay.io/argoprojlabs/gitops-promoter
260+
# tag: ""
261+
# pullPolicy: IfNotPresent
262+
263+
## Port the dashboard listens on inside the container.
264+
port: 8080
265+
266+
## Resource limits and requests
267+
##
268+
resources:
269+
limits:
270+
cpu: 250m
271+
memory: 128Mi
272+
requests:
273+
cpu: 50m
274+
memory: 64Mi
275+
276+
## Pod-level security settings
277+
##
278+
podSecurityContext:
279+
runAsNonRoot: true
280+
seccompProfile:
281+
type: RuntimeDefault
282+
283+
## Container-level security settings
284+
##
285+
securityContext:
286+
allowPrivilegeEscalation: false
287+
readOnlyRootFilesystem: true
288+
capabilities:
289+
drop:
290+
- ALL
291+
292+
## Dashboard pod's node selector
293+
##
294+
nodeSelector: {}
295+
296+
## Dashboard pod's tolerations
297+
##
298+
tolerations: []
299+
300+
## Dashboard pod's affinity
301+
##
302+
affinity: {}
303+
244304
## Dashboard aggregation apiserver (extension API server backing the GitOps Promoter UI).
245305
## Serves the read-only view.promoter.argoproj.io/v1alpha1 PromotionStrategyDetails API
246306
## through the Kubernetes aggregation layer. Opt-in; requires a gitops-promoter version

0 commit comments

Comments
 (0)