Add preinstall hook to rancher chart

This commit is contained in:
wbsong111
2024-12-12 09:31:48 +09:00
parent b298188ca3
commit 38438d89e1
7 changed files with 99 additions and 4 deletions
@@ -0,0 +1,19 @@
{{- if .Values.preinstallHook }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ .Values.ingress.tls.secretName }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-weight": "1" # Certificate 생성 후 실행되도록 우선순위 설정
"helm.sh/hook-delete-policy": before-hook-creation
spec:
secretName: {{ .Values.ingress.tls.secretName }}
duration: 8750h
renewBefore: 720h
issuerRef:
name: selfsigned-issuer
kind: ClusterIssuer
dnsNames:
- {{ .Values.hostname }}
{{- end }}