Page MenuHomePhabricator

Update maintain_kubeusers to use the toolstate database
Open, MediumPublic

Description

Right now maintain_kubeusers checks $home/crontab.disabled before disabling k8s, and after disabling indicates success by touching $home/k8s.disabled.

As part of T332514, maintain_kubeusers that needs to change -- it should instead check the s51051__disable_tool.toolstate for the 'crontab_disabled' flag and then set 'kubernetes_disabled' when finished.

Event Timeline

The only tricky part of this is getting the database credentials for the admin tool injected into maintain_kubeusers. I don't immediately know how to do that... @taavi are you interested in taking on this subtask? The creds will look something like https://gerrit.wikimedia.org/r/c/operations/puppet/+/907983

Indeed. A quick and hacky solution would be to create a Secret for that manually, and a proper solution is T334585: [cookbooks.wmcs.toolforge.component.deploy] Add secrets support when deploying.. do you have any preferences which approach to take for now?

Indeed. A quick and hacky solution would be to create a Secret for that manually, and a proper solution is T334585: [cookbooks.wmcs.toolforge.component.deploy] Add secrets support when deploying.. do you have any preferences which approach to take for now?

will helm secrets work in this case too?

Indeed. A quick and hacky solution would be to create a Secret for that manually, and a proper solution is T334585: [cookbooks.wmcs.toolforge.component.deploy] Add secrets support when deploying.. do you have any preferences which approach to take for now?

will helm secrets work in this case too?

Oh yes, it's deployed with the same method :), nice

The first few steps for having a decent development environment to work on this has been made:

I guess the next logical step would be to have some kind of fake toolsdb that can be used in the same development setup.

The times for esoteric (or nonexistent) maintain-kubeusers development setup should end.

taavi removed taavi as the assignee of this task.Wed, Jun 12, 9:06 AM