Skip to content

Commit fb37eb6

Browse files
committed
Even more super awesome fixes
1 parent 526e550 commit fb37eb6

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

wiz-admission-controller/templates/_helpers.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ If release name contains chart name it will be used as a full name.
4242

4343
{{- define "wiz-hpa-enforcer.name" -}}
4444
{{- $name := printf "%s-hpa" (include "wiz-admission-controller.fullname" .) }}
45-
{{- default $name .Values.hpa.enforcerNameOverride | trunc 63 | trimSuffix "-" }}
45+
{{- printf "%s" $name | trunc 63 | trimSuffix "-" }}
4646
{{- end }}
4747

4848
{{- define "wiz-hpa-audit-logs.name" -}}
49-
{{- $name := "wiz-hpa-audit-logs" }}
50-
{{- default $name .Values.hpa.auditLogsNameOverride | trunc 63 | trimSuffix "-" }}
49+
{{- $name := printf "%s-hpa" (include "wiz-kubernetes-audit-log-collector.name" .) }}
50+
{{- printf "%s" $name | trunc 63 | trimSuffix "-" }}
5151
{{- end }}
5252

5353
{{/*

wiz-admission-controller/templates/hpa.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ spec:
3232
type: Utilization
3333
averageUtilization: {{ .Values.hpa.targetMemoryUtilizationPercentage }}
3434
{{- end }}
35-
{{- if hasKey .Values.hpa "customMetrics" }}
36-
{{- toYaml .Values.hpa.customMetrics | nindent 4 }}
35+
{{- with .Values.hpa.customMetrics }}
36+
{{- toYaml . | nindent 4 }}
3737
{{- end }}
3838
{{- if hasKey .Values.hpa "behavior" }}
3939
behavior:
@@ -73,8 +73,8 @@ spec:
7373
type: Utilization
7474
averageUtilization: {{ .Values.hpa.targetMemoryUtilizationPercentage }}
7575
{{- end }}
76-
{{- if hasKey .Values.hpa "customMetrics" }}
77-
{{- toYaml .Values.hpa.customMetrics | nindent 4 }}
76+
{{- with .Values.hpa.customMetrics }}
77+
{{- toYaml . | nindent 4 }}
7878
{{- end }}
7979
{{- if hasKey .Values.hpa "behavior" }}
8080
behavior:

wiz-admission-controller/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,6 @@ probes: # Probes config for the container
431431
# Horizontal Pod Autoscaling support.
432432
hpa:
433433
enabled: false
434-
enforcerNameOverride: "" # Override the HPA name for the Wiz Admission Controller deployment.
435-
auditLogsNameOverride: "" # Override the HPA name for the Wiz Audit Log Collector deployment.
436434
minReplicas: 2
437435
maxReplicas: 5
438436
enableCPU: true

0 commit comments

Comments
 (0)