Skip to content
Closed
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
30 changes: 22 additions & 8 deletions charts/nginx-gateway-fabric/templates/certs-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ metadata:
labels:
{{- include "nginx-gateway.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install
{{- with .Values.certGenerator.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the helm docs, this is supposed to be the default behavior

automountServiceAccountToken: false
{{- if or .Values.nginxGateway.serviceAccount.imagePullSecret .Values.nginxGateway.serviceAccount.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -29,7 +33,11 @@ metadata:
labels:
{{- include "nginx-gateway.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install
{{- with .Values.certGenerator.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
rules:
- apiGroups:
- ""
Expand All @@ -48,7 +56,11 @@ metadata:
labels:
{{- include "nginx-gateway.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install
{{- with .Values.certGenerator.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand All @@ -67,7 +79,8 @@ metadata:
{{- include "nginx-gateway.labels" . | nindent 4 }}
annotations:
"helm.sh/hook-weight": "-1"
"helm.sh/hook": pre-install
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
allowPrivilegeEscalation: false
allowHostDirVolumePlugin: false
allowHostIPC: false
Expand Down Expand Up @@ -110,16 +123,17 @@ metadata:
labels:
{{- include "nginx-gateway.labels" . | nindent 4 }}
annotations:
{{- with .Values.certGenerator.annotations -}}
{{ toYaml . | nindent 4 }}
{{- with .Values.certGenerator.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded
spec:
template:
metadata:
annotations:
{{- with .Values.certGenerator.annotations -}}
{{ toYaml . | nindent 8 }}
{{- with .Values.certGenerator.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
automountServiceAccountToken: true
Expand Down
Loading