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 support for argocd and custom annotations to the init job #246

Closed
wants to merge 2 commits into from
Closed
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 cockroachdb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
name: cockroachdb
home: https://www.cockroachlabs.com
version: 8.0.0
version: 8.0.1
appVersion: 22.1.0
description: CockroachDB is a scalable, survivable, strongly-consistent SQL database.
icon: https://raw.githubusercontent.com/cockroachdb/cockroach/master/docs/media/cockroach_db.png
Expand Down
4 changes: 4 additions & 0 deletions cockroachdb/templates/job.init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ metadata:
annotations:
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-delete-policy: before-hook-creation
argocd.argoproj.io/hook: Sync
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than hardcoding this, could we instead just have anyone that would like to include this define it in jobAnnotations?

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought the same, @pseudomuto.

{{- with .Values.init.jobAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
template:
metadata:
Expand Down
3 changes: 3 additions & 0 deletions cockroachdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ init:
labels:
app.kubernetes.io/component: init

# Additional annotations to apply to this Job.
jobAnnotations: {}

# Additional annotations to apply to the Pod of this Job.
annotations: {}

Expand Down