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

Add user-defined pre-delete hook annotation and labels for job #832

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ metadata:
labels:
app.kubernetes.io/component: controller-manager
{{- include "vso.chart.labels" . | nindent 4 }}
{{- if .Values.controller.preDeleteHook.labels }}
{{- toYaml .Values.controller.labels | nindent 4 }}
{{- end }}
annotations:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
Expand All @@ -178,6 +181,9 @@ metadata:
{{- if .Values.controller.annotations }}
{{- toYaml .Values.controller.annotations | nindent 4 }}
{{- end }}
{{- if .Values.controller.preDeleteHook.annotations }}
{{- toYaml .Values.controller.annotations | nindent 4 }}
{{- end }}
spec:
backoffLimit: 5
template:
Expand Down
8 changes: 8 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ controller:
# This value defines additional annotations for the deployment. This should be formatted as a YAML object (map)
annotations: {}

# Controller pre-delete hook labels and annotations
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be great if we could move the hooks configuration to

.

preDeleteHook:
# Extra labels to attach to the pre-delete hook deployment. This should be formatted as a YAML object (map)
labels: {}

# This value defines additional annotations for the pre-delete hook deployment. This should be formatted as a YAML object (map)
annotations: {}

# Settings related to the vault-secrets-operator container.
manager:

Expand Down