Skip to content

Commit 18d88db

Browse files
committed
Update charts with latest changes
1 parent c4e3aae commit 18d88db

File tree

5 files changed

+50
-10
lines changed

5 files changed

+50
-10
lines changed

wiz-outpost-common/templates/_controlplane-tls.tpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ Parameters (passed as a dict):
66
- cn: common name for the certificate
77
- dnsBase: base DNS name for SAN entries (may differ from cn)
88
- labelTemplate: name of the chart's labels template to include
9+
- secretName: (optional) name of the Secret to create; defaults to controlPlaneTLS.serverSecretName
910
*/}}
1011
{{- define "wiz.controlplane-server-cert" -}}
1112
{{- if .root.Values.controlPlaneTLS.enabled }}
13+
{{- $secretName := .secretName | default .root.Values.controlPlaneTLS.serverSecretName }}
1214
{{- $caSecret := lookup "v1" "Secret" .root.Release.Namespace .root.Values.controlPlaneTLS.caSecretName }}
1315
{{- if $caSecret }}
1416
{{- $ca := buildCustomCert (index $caSecret.data "ca.crt") (index $caSecret.data "ca.key") }}
1517
{{- $caHash := index $caSecret.data "ca.crt" | b64dec | sha256sum }}
16-
{{- $existingCert := lookup "v1" "Secret" .root.Release.Namespace .root.Values.controlPlaneTLS.serverSecretName }}
18+
{{- $existingCert := lookup "v1" "Secret" .root.Release.Namespace $secretName }}
1719
{{- $regenerate := true }}
1820
{{- $cert := dict }}
1921

@@ -35,7 +37,7 @@ Parameters (passed as a dict):
3537
apiVersion: v1
3638
kind: Secret
3739
metadata:
38-
name: {{ .root.Values.controlPlaneTLS.serverSecretName }}
40+
name: {{ $secretName }}
3941
labels:
4042
{{- include .labelTemplate .root | nindent 4 }}
4143
annotations:

wiz-outpost-configuration/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 2026.02.18
18+
version: 2026.02.22
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

wiz-outpost-configuration/templates/outpostController.clusterRole.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,4 @@ rules:
1111
- apiGroups: [""]
1212
resources: ["nodes"]
1313
verbs: ["get", "list", "watch"]
14-
# Flux CRs - for crsOnly mode (GitRepository, Kustomization in flux-system namespace)
15-
- apiGroups: ["source.toolkit.fluxcd.io"]
16-
resources: ["gitrepositories"]
17-
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
18-
- apiGroups: ["kustomize.toolkit.fluxcd.io"]
19-
resources: ["kustomizations"]
20-
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
2114
{{- end }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{{- if and .Values.outpostController.enabled .Values.outpostController.reducedPermissions }}
2+
{{- $nsPrefix := (index (splitList "-" .Release.Namespace) 0) }}
3+
{{- $autoFluxNamespace := ternary "flux-system" (printf "%s-flux-system" $nsPrefix) (eq .Release.Namespace "default") }}
4+
{{- $fluxNamespace := default $autoFluxNamespace .Values.outpostController.wizFluxNamespace }}
5+
apiVersion: rbac.authorization.k8s.io/v1
6+
kind: Role
7+
metadata:
8+
name: {{ include "wiz-outpost-configuration.fullname" . }}-outpost-controller-flux
9+
namespace: {{ $fluxNamespace }}
10+
labels:
11+
{{- include "wiz-outpost-configuration.labels" . | nindent 4 }}
12+
app.kubernetes.io/component: outpost-controller
13+
rules:
14+
- apiGroups: [""]
15+
resources: ["secrets", "configmaps"]
16+
verbs: ["get", "list", "watch", "create", "update", "delete"]
17+
- apiGroups: ["source.toolkit.fluxcd.io"]
18+
resources: ["gitrepositories"]
19+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
20+
- apiGroups: ["kustomize.toolkit.fluxcd.io"]
21+
resources: ["kustomizations"]
22+
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
23+
---
24+
apiVersion: rbac.authorization.k8s.io/v1
25+
kind: RoleBinding
26+
metadata:
27+
name: {{ include "wiz-outpost-configuration.fullname" . }}-outpost-controller-flux
28+
namespace: {{ $fluxNamespace }}
29+
labels:
30+
{{- include "wiz-outpost-configuration.labels" . | nindent 4 }}
31+
app.kubernetes.io/component: outpost-controller
32+
roleRef:
33+
apiGroup: rbac.authorization.k8s.io
34+
kind: Role
35+
name: {{ include "wiz-outpost-configuration.fullname" . }}-outpost-controller-flux
36+
subjects:
37+
- kind: ServiceAccount
38+
name: {{ .Values.outpostController.serviceAccountName }}
39+
namespace: {{ .Release.Namespace }}
40+
{{- end }}
41+

wiz-outpost-configuration/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ outpostController:
102102
# Only use this when the outpost-controller will only install git-proxy (FluxCRsOnly mode).
103103
# Requires the namespace to be pre-created.
104104
reducedPermissions: false
105+
# Flux namespace for RBAC (secrets, configmaps, gitrepositories, kustomizations).
106+
# When set, creates Role and RoleBinding in this namespace.
107+
# If empty, auto-derives from release namespace prefix (e.g., wiz-default -> wiz-flux-system).
108+
wizFluxNamespace: wiz-flux-system
105109
image:
106110
repository: public-registry.wiz.io
107111
name: wiz-outpost-controller

0 commit comments

Comments
 (0)