Fix indentation of active_record secret arrays
What does this MR do?
Fix indentation of active_record secret arrays
The shared secrets script didn't indent Rails secrets with multiple active_record_encryption_primary_keys or active_record_encryption_deterministic_keys correctly.
By default those arrays have a single entry, but multiple entries are valid e.g. when performing a secret rotation.
Changelog: fixed
Impacted versions
All chart versions handling active_record_encryption_primary_keys and active_record_encryption_deterministic_keys are impacted but only in chart 10.2+ this causes a hard failure hence I am suggesting to backport this to 10.2 and 10.3.
Related issues
Closes shared-secrets job incorrectly indents when mul... (#6639 - closed) • Clemens Beck • 19.4
Test plan
-
Install GitLab chart
-
Edit the rails secret to have multiple active_record_encryption_primary_keys and active_record_encryption_deterministic_keys
$ kubectl get secret gl-rails-secret -n gitlab \ -o jsonpath='{.data.secrets\.yml}' | base64 -d > secrets.yml $ vim secrets.yml $ kubectl create secret generic gl-rails-secret \ --from-file=secrets.yml=secrets.yml \ --dry-run=client -o yaml -n gitlab | kubectl apply -f - -
Upgrade GitLab chart
-
Confirm shared secrets passed
-
Confirm all keys persisted
Author checklist
For general guidance, please follow our Contributing guide.
Required
For anything in this list which will not be completed, please provide a reason in the MR discussion.
- Merge Request Title and Description are up to date, accurate, and descriptive.
- MR targeting the appropriate branch.
- MR has a green pipeline.
-
Documentation created/updated. -
Tests added/updated. - Have you validated that your change works end-to-end on a real cluster deployment?
- Describe how you did it in a comment.
-
Equivalent MR/issue foromnibus-gitlabopened.
Reviewers checklist
- MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab.
- Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab chart.