Skip to content

Commit

Permalink
fix helm context
Browse files Browse the repository at this point in the history
  • Loading branch information
tropnikovvl committed Nov 30, 2023
1 parent 0a39860 commit 117acc8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $tls := fromYaml ( include "pvc-autoresizer.webhookCerts" . ) }}
{{- if .Values.webhook.pvcMutatingWebhook.enabled }}
---
apiVersion: admissionregistration.k8s.io/v1
Expand All @@ -17,7 +18,6 @@ webhooks:
{{- if .Values.webhook.caBundle }}
caBundle: {{ .Values.webhook.caBundle }}
{{- else if .Values.webhook.certificate.generate }}
{{- $tls := fromYaml ( include "pvc-autoresizer.webhookCerts" . ) }}
caBundle: {{ $tls.caCert }}
{{- end }}
service:
Expand All @@ -37,3 +37,19 @@ webhooks:
- persistentvolumeclaims
sideEffects: None
{{- end }}

{{- if .Values.webhook.certificate.generate }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ template "pvc-autoresizer.fullname" . }}-controller
namespace: {{ .Release.Namespace }}
labels:
{{- include "pvc-autoresizer.labels" . | nindent 4 }}
type: kubernetes.io/tls
data:
ca.crt: {{ $tls.caCert }}
tls.crt: {{ $tls.clientCert }}
tls.key: {{ $tls.clientKey }}
{{- end }}
15 changes: 0 additions & 15 deletions charts/pvc-autoresizer/templates/controller/secret.yaml

This file was deleted.

0 comments on commit 117acc8

Please sign in to comment.