Skip to content

Commit 5cc285d

Browse files
committed
flux-operator: Add Flux Status web UI settings
Signed-off-by: Stefan Prodan <[email protected]>
1 parent d367457 commit 5cc285d

File tree

7 files changed

+81
-0
lines changed

7 files changed

+81
-0
lines changed

charts/flux-operator/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ ControlPlane [enterprise distribution](https://control-plane.io/enterprise-for-f
99
The operator automates the patching for hotfixes and CVEs affecting the Flux controllers container images
1010
and enables the configuration of multi-tenancy lockdown on Kubernetes and OpenShift clusters.
1111

12+
The operator comes with the Flux Status Page web UI exposed on port `9080` that allows users to visualize the
13+
status of the Flux installation and monitor the GitOps delivery pipeline in real-time.
14+
1215
## Prerequisites
1316

1417
- Kubernetes 1.22+
@@ -61,6 +64,9 @@ see the Flux Operator [documentation](https://fluxcd.control-plane.io/operator/)
6164
| serviceAccount | object | `{"automount":true,"create":true,"name":""}` | Pod service account settings. The name of the service account defaults to the release name. |
6265
| serviceMonitor | object | `{"create":false,"interval":"60s","labels":{},"scrapeTimeout":"30s"}` | Prometheus Operator scraping settings. |
6366
| tolerations | list | `[]` | Pod tolerations settings. |
67+
| web.enabled | bool | `true` | Enable the Flux Status Page web server on port 8080. |
68+
| web.networkPolicy | object | `{"create":true}` | Create a NetworkPolicy to allow access to the Flux Status Page web interface. |
69+
| web.serverOnly | bool | `false` | Run the Flux Status Page web server as a standalone deployment (requires a dedicated Helm release). |
6470

6571
## Source Code
6672

charts/flux-operator/helmdocs.gotmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ ControlPlane [enterprise distribution](https://control-plane.io/enterprise-for-f
88
The operator automates the patching for hotfixes and CVEs affecting the Flux controllers container images
99
and enables the configuration of multi-tenancy lockdown on Kubernetes and OpenShift clusters.
1010

11+
The operator comes with the Flux Status Page web UI exposed on port `9080` that allows users to visualize the
12+
status of the Flux installation and monitor the GitOps delivery pipeline in real-time.
13+
1114
## Prerequisites
1215

1316
- Kubernetes 1.22+

charts/flux-operator/templates/deployment.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ spec:
5656
{{- if .Values.multitenancy.enabledForWorkloadIdentity }}
5757
- --default-workload-identity-service-account={{ .Values.multitenancy.defaultWorkloadIdentityServiceAccount }}
5858
{{- end }}
59+
{{- if .Values.web.serverOnly }}
60+
- --web-server-only=true
61+
{{- end }}
5962
{{- range .Values.extraArgs }}
6063
- {{ . }}
6164
{{- end }}
@@ -66,6 +69,8 @@ spec:
6669
fieldPath: metadata.namespace
6770
- name: REPORTING_INTERVAL
6871
value: {{ .Values.reporting.interval }}
72+
- name: WEB_SERVER_PORT
73+
value: "{{ ternary "9080" "0" .Values.web.enabled }}"
6974
{{- with .Values.marketplace.type }}
7075
- name: MARKETPLACE_TYPE
7176
value: {{ . }}
@@ -92,6 +97,11 @@ spec:
9297
- name: http
9398
containerPort: 8081
9499
protocol: TCP
100+
{{- if .Values.web.enabled }}
101+
- name: http-web
102+
containerPort: 9080
103+
protocol: TCP
104+
{{- end }}
95105
livenessProbe:
96106
{{- toYaml .Values.livenessProbe | nindent 12 }}
97107
readinessProbe:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{- if .Values.web.networkPolicy.create }}
2+
apiVersion: networking.k8s.io/v1
3+
kind: NetworkPolicy
4+
metadata:
5+
name: {{ include "flux-operator.fullname" . }}-web
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "flux-operator.labels" . | nindent 4 }}
9+
{{- with .Values.commonLabels }}
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
{{- with .Values.commonAnnotations }}
13+
annotations:
14+
{{- toYaml . | nindent 4 }}
15+
{{- end }}
16+
spec:
17+
policyTypes:
18+
- Ingress
19+
podSelector:
20+
matchLabels:
21+
{{- include "flux-operator.selectorLabels" . | nindent 6 }}
22+
ingress:
23+
- from:
24+
- namespaceSelector: {}
25+
ports:
26+
- protocol: TCP
27+
port: 9080
28+
{{- end }}

charts/flux-operator/templates/service.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,11 @@ spec:
1818
targetPort: http-metrics
1919
protocol: TCP
2020
name: http
21+
{{- if .Values.web.enabled }}
22+
- port: 9080
23+
targetPort: http-web
24+
protocol: TCP
25+
name: http-web
26+
{{- end }}
2127
selector:
2228
{{- include "flux-operator.selectorLabels" . | nindent 4 }}

charts/flux-operator/values.schema.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,25 @@
425425
"items": {
426426
"type": "object"
427427
}
428+
},
429+
"web": {
430+
"type": "object",
431+
"properties": {
432+
"enabled": {
433+
"type": "boolean"
434+
},
435+
"networkPolicy": {
436+
"type": "object",
437+
"properties": {
438+
"create": {
439+
"type": "boolean"
440+
}
441+
}
442+
},
443+
"serverOnly": {
444+
"type": "boolean"
445+
}
446+
}
428447
}
429448
}
430449
}

charts/flux-operator/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ multitenancy:
1414
reporting:
1515
interval: 5m # @schema required: true
1616

17+
web:
18+
# -- Enable the Flux Status Page web server on port 8080.
19+
enabled: true
20+
# -- Create a NetworkPolicy to allow access to the Flux Status Page web interface.
21+
networkPolicy:
22+
create: true
23+
# -- Run the Flux Status Page web server as a standalone deployment (requires a dedicated Helm release).
24+
serverOnly: false
25+
1726
# -- Install and upgrade the custom resource definitions.
1827
installCRDs: true # @schema default: true
1928

0 commit comments

Comments
 (0)