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

(Optionally) run _cluster_setup after installation #41

Open
flimzy opened this issue Sep 18, 2020 · 6 comments · May be fixed by #42
Open

(Optionally) run _cluster_setup after installation #41

flimzy opened this issue Sep 18, 2020 · 6 comments · May be fixed by #42

Comments

@flimzy
Copy link
Member

flimzy commented Sep 18, 2020

Would it be reasonable to create the _users database upon cluster initialization? If it doesn't make sense in all cases, would it be reasonable to do it optionally if a config value (createUsersDatabase = true?) is set?

If this is something we want, I'm happy to work on a PR.

I'm not sure of the best approach. One possibility would be to create a Job resource that effectively calls curl -X PUT http://.../_users. There might be some cleaner way I haven't thought of. I'm eager to hear other suggestions, if this is deemed worth pursuing.

@willholley
Copy link
Member

willholley commented Sep 18, 2020

you might be able to do it with a post-install hook, but does this not happen as part of the _cluster_setup step that needs to be run anyway (https://github.com/apache/couchdb-helm/blob/master/couchdb/templates/NOTES.txt#L10)?

@flimzy
Copy link
Member Author

flimzy commented Sep 21, 2020

I shuold ammend my suggestion to run all of the _cluster_setup step, not just create _users. Or is there a reason that this cannot be reasonably automated?

@willholley
Copy link
Member

have a look at https://helm.sh/docs/topics/charts_hooks/ for automation

@flimzy
Copy link
Member Author

flimzy commented Sep 21, 2020

have a look at https://helm.sh/docs/topics/charts_hooks/ for automation

Are you saying a PR to do this would be welcome on this project? Or you prefer to keep this up to the consumers of the helm chart to implement as they see fit?

@willholley
Copy link
Member

@flimzy PRs are always welcome 😃

@flimzy flimzy changed the title (Optionally) create _users database on startup (Optionally) run _cluster_setup after installation Sep 21, 2020
@flimzy flimzy linked a pull request Sep 21, 2020 that will close this issue
4 tasks
@krjackso
Copy link

Any chance of this PR being considered? Would love to have this feature in our couchdb setups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants