-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[bitnami/opensearch] Enable automated setup of snapshot policies #29796
Conversation
I've borrowowed most of the config from the dashboards PVC. Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
This change creates a new job to be run as an optional post-install hook for creating initial snapshot policies in OpenSearch, along with relvant ConfigMaps and NetworkPolicies. I have tried to follow most of Bitnami's conventions for the templates, but it's hard to tell if everything is 100% aligned with best practices. Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Sorry for the delay in getting back to you. This is just a quick message to let you know that we are going to review it and will provide feedback as soon as possible. |
Thanks, I really appreciate the ping to let me know you will get to it soon! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just added some comments. Please take a look at them and let me know so we finish reviewing this PR. Thanks for your contribution
Co-authored-by: Juan José Martos <jotamartos@gmail.com> Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Please take a look at the error while generating the README
|
I'm aware of the error. It relates to this discussion: #29796 (comment) If we want to go for keeping the API body as YAML format, do you have any idea how we should go about configuring the |
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Co-authored-by: Juan José Martos <jotamartos@gmail.com> Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Just updated the thread above. Please ping me with a new comment when you update the PR. Thanks |
Great. I'll just run one last test by installing it in my local cluster to try and verify nothing is obviously broken. I'll ping you once I'm done with that. |
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This drastically improves debugging things when `curl` returns errors. Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
I found a typo in the Network Policy that I fixed. When debugging this, I also added a flag to curl to make debugging things a lot easier when curl crashes. I've tested this now and it seems to work! Assuming you approve my recent changes, I think we are ready to merge! 🚀 |
Hey @jotamartos , if you have time to check on my latest changes that would be great. 🙂 |
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
@jotamartos I've resolved the conflicts now. If you could have a look at the latest changes and review before the next conflict emerge, that would be awesome! 👍 |
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor comments. Please have a look
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM! Thank you for your contribution
Oh happy day! 🎉 Thank you for the collaboration! |
…nami#29796) * [bitnami/opensearch] Conditionally create PVC for snapshots I've borrowowed most of the config from the dashboards PVC. Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * [bitnami/opensearch] Create volumes for snapshots Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * [bitnami/opensearch] Create snapshots post-install hook This change creates a new job to be run as an optional post-install hook for creating initial snapshot policies in OpenSearch, along with relvant ConfigMaps and NetworkPolicies. I have tried to follow most of Bitnami's conventions for the templates, but it's hard to tell if everything is 100% aligned with best practices. Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * [bitnami/opensearch] Bump chart version Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * [bitnami/opensearch] Remove reundant comment in values Co-authored-by: Juan José Martos <jotamartos@gmail.com> Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * [bitnami/opensearch] Remove another reundant comment Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * Add defaults for documented image values Co-authored-by: Juan José Martos <jotamartos@gmail.com> Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * [bitnami/opensearch] Fix typo in nindent Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * [bitnami/opensearch] Add `--show-error` to curl This drastically improves debugging things when `curl` returns errors. Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * [bitnami/opensearch] Allow UDP/53 in NetworkPolicy Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * Add snapshots.image to warnings list Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * Move `snapshots.enabled` to the top Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * Move `snapshots.persistence.enabled` to the top Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> --------- Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Co-authored-by: Juan José Martos <jotamartos@gmail.com> Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
Description of the change
This change lets users opt-in to automatically initialize snapshot repositories and snapshot policies in OpenSearch using a post-install chart hook.
Benefits
Before this change, configuring snapshot policies was a fairly complex task that requires interacting with the OpenSearch API manually. This change automates that process and allows for easy configuration via the Helm chart's values. I believe this will enable more people to have an OpenSearch instance that is properly configured so consistent backups can be taken.
Possible drawbacks
Considering this is an opt-in feature, I don't see any significant draw-backs.
Applicable issues
Additional information
I've tried to split the PR into logically separate commits, so if we want the PVC creation to be a separate PR that's easy to do. Please inspect my commits for more info!
Checklist
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files.README.md
using readme-generator-for-helm