Skip to content

Commit 08745c2

Browse files
committed
Simplified custom requests and limits
1 parent c565d1d commit 08745c2

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

wiz-admission-controller/Chart.yaml

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

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

wiz-admission-controller/templates/deploymentauditlogs.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
name: {{ include "wiz-kubernetes-audit-log-collector.name" . }}
66
namespace: {{ .Release.Namespace | quote }}
77
labels:
8-
{{- include "wiz-hpa.labels" . | nindent 4 }}
8+
{{- include "wiz-kubernetes-audit-log-collector.labels" . | nindent 4 }}
99
spec:
1010
replicas: {{ .Values.kubernetesAuditLogsWebhook.replicaCount }}
1111
selector:
@@ -184,7 +184,11 @@ spec:
184184
value: "true"
185185
{{- end }}
186186
resources:
187+
{{- if hasKey .Values "resources" }}
187188
{{- toYaml .Values.resources | nindent 12 }}
189+
{{- else }}
190+
{}
191+
{{- end }}
188192
volumeMounts:
189193
- mountPath: /var/server-certs
190194
name: server-certs

wiz-admission-controller/templates/deploymentenforcement.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,20 @@ spec:
213213
value: "true"
214214
{{- end }}
215215
resources:
216-
{{- if .Values.hpa.enabled }}
217-
{{- if hasKey .Values.hpa "customResources" }}
218-
{{- toYaml .Values.hpa.customResources | nindent 12 }}
216+
{{- if not .Values.hpa.enabled }}
217+
{{- if hasKey .Values "resources" }}
218+
{{- toYaml .Values.resources | nindent 12 }}
219219
{{- else }}
220-
{{- toYaml .Values.hpa.defaultResources | nindent 12 }}
220+
{}
221221
{{- end }}
222222
{{- else }}
223+
{{- if hasKey .Values "resources" }}
223224
{{- toYaml .Values.resources | nindent 12 }}
225+
{{- else }}
226+
requests:
227+
cpu: 500m
228+
memory: 300Mi
229+
{{- end }}
224230
{{- end }}
225231
volumeMounts:
226232
- mountPath: /var/cache

wiz-admission-controller/values.yaml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,9 @@ tlsCertificate:
390390
tlsCertificate: ""
391391
tlsKey: ""
392392

393-
resources: {}
393+
# Remove the comment below to provide custom requests and limits to the Wiz pods.
394+
#
395+
# resources: {}
394396
# The recommended values should vary depending on the load in each cluster, the number of replicas, and more.
395397
# To make sure we cover most cases, the following is a suggestion for environments with a high load, we recommend adjusting it based on your needs.
396398
# requests:
@@ -437,21 +439,6 @@ hpa:
437439
targetMemoryUtilizationPercentage: 50
438440
customMetrics: []
439441

440-
# When using HPA, Wiz Helm Charts process the requests and limits
441-
# for the Wiz Admission Controller deployment in the following order:
442-
# customResources -> defaultResources
443-
#
444-
# Populating the following `customResources` in your user-supplied values.yaml
445-
# allows you to customize and override the `defaultResources`.
446-
#
447-
# customResources: {}
448-
449-
defaultResources:
450-
requests:
451-
cpu: 500m
452-
memory: 300Mi
453-
454-
455442
# Global values to override chart values.
456443
global:
457444
nameOverride: "" # Override the release’s name.

0 commit comments

Comments
 (0)