Since we support custom image prefixes, we should also support
imagePullSecrets since they are likely to be in a private registry.
This also updates some nearby documentation which was out of date.
We are supposed to update zuul/nodepool when the relevant secrets
are updated. We do that by subscribing to changes on all secrets
in the system, then check to see if they are ones that we're watching
and if so, run the appropriate operator methods.
We only updated the list of secrets to watch on startup, which means
that from a clean start where a zuul was added, we would not add
the new secrets to our list. This change updates the list after every
time that the zuul resource is created or updated.
An indentation error caused the operator to only create the last
provider listed in the nodepool config.
Additionally, add the nodepool provider to the nodepool launcher
This is needed to separate the pods for different nodepool launchers
(otherwise, the deployments may consider pods for one launcher to
belong to another).
We overrode the PXC resource values in order for functional tests
in minikube to work. Restore the defaults and set an override in
the functional tests.
Allow the user to specify an image prefix and a version tag.
This updates the functional test to account for a recent change
in Zuul which returns incomplete builds on the API endpoint.
The external zookeeper config was mostly a stub and most of the system
actually assumed internal management. Flesh out the support for external
management. Do the same for the database.
This also passes through any additional keys in the zookeeper and database
sections of the spec.
The operator currently creates an ingress object, but this was really
just to aid testing. The operator probably shouldn't really create one
since doing so may be site-specific.
Having the ingress greatly aids local and functional testing though, so
move it to the functional test playbook.
To make the functional tests easier to run locally, run a git server
in k8s instead of on the local machine.
Also, update the secret creation to work with kind as well as minikube.
This switches from the ansible/dhall operator framework to kopf,
an operator framework written in pure Python. This allows us to:
* Build the operator application as a Python app.
* Build the operator image using the opendev python builder images.
* Run the operator as a Python CLI program "zuul-operator".
* Write procedural Python code to handle operator tasks (such as
creating new nodepool launchers when providers are added).
* Use Jinja for templating config files and k8s resource files
(direct pythonic manipulation of resources is an option too).
The new CR nearly matches the existing one, with some minor differences.
Some missing features and documentation are added in the commits
immediately following; they should be reviewed and merged as a unit.
Also, fx waiting for scheduler to settle in functional test since
we changed this log line in Zuul.