HomePhabricator

tidyup: Refactor and simplify code

Description

tidyup: Refactor and simplify code

I realized that most utility functions were really User object methods.
They depend mostly on information already contained in that object.

I have made this so here. I verified that in py3.7 at least, adding methods
does not increase the size of instances of the class, so this should
save memory in the end by not copying values all over the place.

Reading and writing the kubeconfig are abstracted to allow reuse during
other operations such as a force-migrate option for the last step of the upgrade.

Adding a "operations_pod.yaml" to make --once and the future --force-migrate
options a lot more sensible to run. This will be important to do the initial
deployment of credentials.

Bug: T236202
Bug: T228499
Change-Id: I66499b4182655d01337b9546bef57bf3aec68d2c

Details

Provenance
BstormAuthored on Dec 4 2019, 8:04 PM
Parents
rLTMKe9d42fc5eff9: deploy: prepare for deployment in toolsbeta
Branches
Unknown
Tags
Unknown
References
refs/changes/09/554609/5
ChangeId
I66499b4182655d01337b9546bef57bf3aec68d2c