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

Don't recreate rethinkdb password when running on existing environment #17

Open
viv-4 opened this issue Jul 27, 2021 · 4 comments
Open
Assignees
Labels
focus: devops Focus on DevOps/Infra type: bug something isn't working

Comments

@viv-4
Copy link
Contributor

viv-4 commented Jul 27, 2021

No description provided.

@viv-4 viv-4 self-assigned this Jul 27, 2021
@viv-4
Copy link
Contributor Author

viv-4 commented Aug 13, 2021

If the pod (and stateful set) are removed, eg. uninstalled via ansible, then a subsequent ansible install will regenerate and overwrite the password secret.
The uninstall does not remove the rethinkdb volume however so it is still configured with the old password unless manually removed before install.

@jeremyw24 jeremyw24 added the focus: devops Focus on DevOps/Infra label Oct 11, 2021
@viv-4
Copy link
Contributor Author

viv-4 commented Feb 15, 2022

This actually is not an issue with secret generation but rather with the ansible/helm uninstall not removing persistent volumes (known issue, https://github.com/place-labs/k8s-helm/blob/master/ansible/README.md#limitations).
Secrets are designed to be preserved over upgrades: https://github.com/place-labs/k8s-helm/tree/master/charts#design-notes

@viv-4 viv-4 closed this as completed Feb 15, 2022
@viv-4
Copy link
Contributor Author

viv-4 commented Feb 16, 2022

Reopening as the issue is present when running current ansible playbook: a041740

  • Rethinkdb password secret is changed even though it already exists and is checked for by ansible

Requires further investigation

@viv-4 viv-4 reopened this Feb 16, 2022
@viv-4
Copy link
Contributor Author

viv-4 commented Feb 22, 2022

Due to the rethinkdbPassword release var not being found:

TASK [placeos.helm.releasevars : get the existing release var] *******************************************
task path: ~/k8s-helm/ansible/roles/placeos.helm.releasevars/tasks/lookup.yaml:15     
skipping: [k8s] => (item=rethinkdbPassword)  => {                                                         
    "ansible_loop_var": "item",                                                                           
    "changed": false,                                                                                     
    "item": "rethinkdbPassword",                                                                          
    "skip_reason": "Conditional result was False"                                                         
}

Previous step TASK [placeos.helm.releasevars : check release current state] does not include a rethinkdbPassword in it's returned status.values
The release name is rethinkdb and not placeos as defined the above task.
The release names were changed when the release namespace was set to placeos for all charts.
Changing this line to name: "rethinkdb" resolves this specific issue, as this is the only release var value actually being used:

However the same issue is present for postgresql, and all services should ideally also be using existing values (configMap/secret) when running helm upgrade unless intentionally being changed.
Will look into potentially running the check release current state and get the existing release var task before running each chart with that charts release name.

@caspiano caspiano added the type: bug something isn't working label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: devops Focus on DevOps/Infra type: bug something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants