Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

policy-controller: fix empty values #835

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/policy-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sources:
type: application

name: policy-controller
version: 0.7.0
version: 0.7.1
appVersion: 0.8.2

maintainers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ spec:
value: "{{ $value }}"
{{- end }}
{{- end }}
{{- if or (semverCompare ">= 1.8-0" .Chart.AppVersion) .Values.webhook.extraArgs }}
args:
{{- if semverCompare ">= 1.8-0" .Chart.AppVersion }}
- -webhook-name={{ required "A valid cosign.webhookName is required" .Values.cosign.webhookName }}
Expand All @@ -79,6 +80,7 @@ spec:
{{- range $key, $value := .Values.webhook.extraArgs }}
- -{{ $key }}={{ $value }}
{{- end }}
{{- end }}
ports:
- containerPort: 8443
name: https
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- with .Values.annotations }}
annotations:
{{- if .Values.annotations }}
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
spec:
{{- if .Values.webhook.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.webhook.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.webhook.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.webhook.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "policy-controller.selectorLabels" . | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
apiVersion: v1
kind: Secret
metadata:
{{- if or .Values.webhook.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.webhook.service.annotations }}
{{ toYaml .Values.webhook.service.annotations | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- toYaml .Values.commonAnnotations | nindent 4 }}
{{- end }}
{{- end }}
labels:
{{- include "policy-controller.labels" . | nindent 4 }}
control-plane: {{ template "policy-controller.fullname" . }}-webhook
name: webhook-certs
namespace: {{ .Release.Namespace }}
# The data is populated at install time.
# The data is populated at install time.
12 changes: 6 additions & 6 deletions charts/policy-controller/templates/webhook/service_webhook.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v1
kind: Service
metadata:
{{- with .Values.webhook.service.annotations }}
annotations:
{{- if .Values.webhook.service.annotations }}
{{ toYaml .Values.webhook.service.annotations | nindent 4 }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "policy-controller.labels" . | nindent 4 }}
control-plane: {{ template "policy-controller.fullname" . }}-webhook
Expand All @@ -27,10 +27,10 @@ spec:
apiVersion: v1
kind: Service
metadata:
{{- with .Values.webhook.service.annotations }}
annotations:
{{- if .Values.webhook.service.annotations }}
{{ toYaml .Values.webhook.service.annotations | nindent 4 }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "policy-controller.labels" . | nindent 4 }}
control-plane: {{ template "policy-controller.fullname" . }}-webhook
Expand Down