Skip to content

Commit 6eac98f

Browse files
committed
Update charts with latest changes
1 parent 3f90c2c commit 6eac98f

File tree

8 files changed

+69
-17
lines changed

8 files changed

+69
-17
lines changed

wiz-admission-controller/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type: application
55
# This is the chart version. This version number should be incremented each time you make changes
66
# to the chart and its templates, including the app version.
77
# Versions are expected to follow Semantic Versioning (https://semver.org/)
8-
version: 3.10.6
8+
version: 3.10.7-preview
99

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

wiz-admission-controller/templates/_helpers.tpl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,44 @@ false
552552
- name: WIZ_CLUSTER_NAME
553553
value: {{ coalesce .Values.global.clusterDisplayName .Values.clusterDisplayName | quote }}
554554
{{- end }}
555+
{{- if .Values.prometheus.enabled }}
556+
# Prometheus metrics configuration
557+
- name: WIZ_METRICS_ENABLED
558+
value: {{ .Values.prometheus.enabled | quote }}
559+
- name: WIZ_METRICS_PORT
560+
value: {{ .Values.prometheus.metricsPort | quote }}
561+
- name: WIZ_DISABLE_TLS_METRICS
562+
value: {{ .Values.prometheus.diableTLS | quote }}
563+
{{- end }}
555564
{{- end -}}
556565

557566
{{- define "wiz-admission-controller.image" -}}
558567
{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ coalesce .Values.global.image.repository .Values.image.repository }}:{{ include "wiz-admission-controller.appVersion" . }}
559568
{{- end -}}
569+
570+
{{/*
571+
Common service ports configuration
572+
*/}}
573+
{{- define "wiz-admission-controller.service.ports" -}}
574+
- port: {{ .Values.service.port }}
575+
targetPort: {{ .Values.service.targetPort }}
576+
protocol: TCP
577+
name: webhook
578+
{{- if .Values.prometheus.enabled }}
579+
- port: {{ .Values.prometheus.metricsPort }}
580+
targetPort: metrics
581+
protocol: TCP
582+
name: metrics
583+
{{- end }}
584+
{{- end -}}
585+
586+
{{/*
587+
Common container ports configuration
588+
*/}}
589+
{{- define "wiz-admission-controller.container.ports" -}}
590+
- containerPort: {{ .Values.service.targetPort }}
591+
{{- if .Values.prometheus.enabled }}
592+
- name: metrics
593+
containerPort: {{ .Values.prometheus.metricsPort }}
594+
{{- end }}
595+
{{- end -}}

wiz-admission-controller/templates/deploymentauditlogs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
image: {{ include "wiz-admission-controller.image" . }}
6969
imagePullPolicy: {{ .Values.image.pullPolicy }}
7070
ports:
71-
- containerPort: {{ .Values.service.targetPort }}
71+
{{- include "wiz-admission-controller.container.ports" . | nindent 10 }}
7272
readinessProbe:
7373
httpGet:
7474
path: /ready

wiz-admission-controller/templates/deploymentdebug.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
image: {{ include "wiz-admission-controller.image" . }}
6969
imagePullPolicy: {{ .Values.image.pullPolicy }}
7070
ports:
71-
- containerPort: {{ .Values.service.targetPort }}
71+
{{- include "wiz-admission-controller.container.ports" . | nindent 10 }}
7272
readinessProbe:
7373
httpGet:
7474
path: /ready

wiz-admission-controller/templates/deploymentenforcement.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
image: {{ include "wiz-admission-controller.image" . }}
6969
imagePullPolicy: {{ .Values.image.pullPolicy }}
7070
ports:
71-
- containerPort: {{ .Values.service.targetPort }}
71+
{{- include "wiz-admission-controller.container.ports" . | nindent 10 }}
7272
readinessProbe:
7373
httpGet:
7474
path: /ready

wiz-admission-controller/templates/deploymentsensor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
image: {{ include "wiz-admission-controller.image" . }}
6969
imagePullPolicy: {{ .Values.image.pullPolicy }}
7070
ports:
71-
- containerPort: {{ .Values.service.targetPort }}
71+
{{- include "wiz-admission-controller.container.ports" . | nindent 12 }}
7272
readinessProbe:
7373
httpGet:
7474
path: /ready

wiz-admission-controller/templates/service.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ metadata:
1010
spec:
1111
type: {{ .Values.service.type }}
1212
ports:
13-
- port: {{ .Values.service.port }}
14-
targetPort: {{ .Values.service.targetPort }}
15-
protocol: TCP
13+
{{- include "wiz-admission-controller.service.ports" . | nindent 4 }}
1614
selector:
1715
{{- include "wiz-admission-controller.selectorLabels" . | nindent 4 }}
1816
{{- include "wiz-admission-controller-enforcement.selectorLabels" . | nindent 4 }}
@@ -29,9 +27,7 @@ metadata:
2927
spec:
3028
type: {{ .Values.service.type }}
3129
ports:
32-
- port: {{ .Values.service.port }}
33-
targetPort: {{ .Values.service.targetPort }}
34-
protocol: TCP
30+
{{- include "wiz-admission-controller.service.ports" . | nindent 4 }}
3531
selector:
3632
{{- include "wiz-admission-controller.selectorLabels" . | nindent 4 }}
3733
{{- include "wiz-kubernetes-audit-log-collector.selectorLabels" . | nindent 4 }}
@@ -48,9 +44,7 @@ metadata:
4844
spec:
4945
type: {{ .Values.service.type }}
5046
ports:
51-
- port: {{ .Values.service.port }}
52-
targetPort: {{ .Values.service.targetPort }}
53-
protocol: TCP
47+
{{- include "wiz-admission-controller.service.ports" . | nindent 4 }}
5448
selector:
5549
{{- include "wiz-admission-controller.selectorLabels" . | nindent 4 }}
5650
{{- include "wiz-sensor-webhook.selectorLabels" . | nindent 4 }}
@@ -67,9 +61,7 @@ metadata:
6761
spec:
6862
type: {{ .Values.service.type }}
6963
ports:
70-
- port: {{ .Values.service.port }}
71-
targetPort: {{ .Values.service.targetPort }}
72-
protocol: TCP
64+
{{- include "wiz-admission-controller.service.ports" . | nindent 4 }}
7365
selector:
7466
{{- include "wiz-admission-controller.selectorLabels" . | nindent 4 }}
7567
{{- include "wiz-debug-webhook.selectorLabels" . | nindent 4 }}

wiz-admission-controller/values.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,3 +747,27 @@ global:
747747
#
748748
# lowPrivilegePodSecurityPolicy: {}
749749
# lowPrivilegeSecurityPolicy: {}
750+
751+
# Prometheus allows to scrape targets in two different ways:
752+
# 1. Annotations-based Service Discovery
753+
# Where Prometheus discovers endpoints via Services enumeration via the Kubernetes API Server.
754+
# To enable it with Wiz, you may need to also add the following annotations, e.g.
755+
# podAnnotations:
756+
# prometheus.io/scrape: "true"
757+
# prometheus.io/port: "9090"
758+
# prometheus.io/path: "/metrics"
759+
#
760+
# 2. ServiceMonitor-based Service Discovery
761+
# Applicable if you are using the Prometheus Operator and the ServiceMonitor custom resource (CR).
762+
# To enable it with Wiz, use the following selectors:
763+
# selector:
764+
# matchLabels:
765+
# app.kubernetes.io/instance: <Helm release name> # e.g. wiz-kubernetes-integration
766+
# namespaceSelector:
767+
# matchNames:
768+
# - wiz
769+
#
770+
prometheus:
771+
enabled: false # Enable the /metrics endpoint.
772+
metricsPort: 9090
773+
diableTLS: true # When TLS enabled uses the same TLS certificates that are used for all other webhooks.

0 commit comments

Comments
 (0)