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 custom annotations to the Init Job #250

Merged
merged 2 commits into from
Jun 10, 2022

Conversation

diogokiss
Copy link
Contributor

@diogokiss diogokiss commented Jun 8, 2022

In some cases, there is a need for adding custom annotations to the Init job.
For example, when using ArgoCD, we need to instruct ArgoCD to start the job
still during the Sync phase and not as a PostSync hook. Otherwise, the job never
starts. And this is done by adding the following annotation to the job.

argocd.argoproj.io/hook: Sync

This is to continue the work started in #246 and #206
to address #149

@diogokiss
Copy link
Contributor Author

@pseudomuto and @rail, could you maybe take a look at this PR, please? 😬

Copy link
Contributor

@pseudomuto pseudomuto left a comment

Choose a reason for hiding this comment

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

Aside from the version this LGTM 👍 Nice work!

@@ -2,7 +2,7 @@
apiVersion: v1
name: cockroachdb
home: https://www.cockroachlabs.com
version: 8.0.1
version: 8.0.2
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're adding a new feature I think we should make this new version 8.1.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. ✅

Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

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

Would you mind adding an example usage somewhere? Maybe to the Readme template or as comments next to the new section. What do you think?

cockroachdb/values.yaml Show resolved Hide resolved
@rail rail added enhancement New feature or request O-community labels Jun 9, 2022
In some cases, there is a need for adding custom annotations to the Init job.
For example, when using ArgoCD, we need to instruct ArgoCD to start the job
still during the Sync phase and not as a PostSync hook. Otherwise, the job never
starts. And this is done by adding the following annotation to the job.
```
argocd.argoproj.io/hook: Sync
```

This is to continue the work started in cockroachdb#246
to address cockroachdb#149
Bumping the chart version for a new release.
@diogokiss diogokiss force-pushed the init-job-annotations branch from 57be672 to 87c8039 Compare June 10, 2022 09:10
@diogokiss
Copy link
Contributor Author

@rail and @pseudomuto, I've addressed and force-pushed the requested changes. 🤝

@diogokiss diogokiss requested review from rail and pseudomuto June 10, 2022 09:17
@diogokiss
Copy link
Contributor Author

On another note, I saw this. What is the recommended way of installing CockroachDB in a K8s cluster? Is it via Helm or Operator? Just for clarification. Also, I have another issue opened that seems not to affect the Operator. So, if I'm supposed to use the Operator, I'll not even bother to wait for it to be resolved.

Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

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

Thank you very much!

@rail rail merged commit 1075c18 into cockroachdb:master Jun 10, 2022
@diogokiss diogokiss deleted the init-job-annotations branch June 13, 2022 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request O-community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants