15 Commits (c1852c5791d3972e65c18afe0fb8d4d2bc4abd37)

Author SHA1 Message Date
James E. Blair d87ea64c06 Add support for zuul-registry
Change-Id: Ie206f8f7c48da3cfaabb33d16f2a339b35db4e5e
2 years ago
James E. Blair e5879666bd Bump API version to v1alpha2
To accomodate the CR syntax changes.

Change-Id: Ie646a9c58655b0987a8fb0d4c914cd8b93190b1b
2 years ago
James E. Blair eff9f360f7 Use kopf operator framework
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.

Change-Id: Ib37b67e3444b7cd44692d48eee77775ee9049e9f

Change-Id: I70ec31ecd8fe264118215944022b2e7b513dced9
2 years ago
Tristan Cacqueray ea6652e4e6 Add support for global image prefix
This change adds an imagePrefix attribute to enable using
custom images for all the service at once using a single attribute
which default to "docker.io/zuul".

Change-Id: Ia1a5dd4aa9de410937f59a769019dcdb34167944
3 years ago
Tristan Cacqueray c6d35be4d6 Add zuul-registry deployment
This change adds an optional registry configuration to the spec:

  registry:
    image: docker.io/zuul/zuul-registry:latest
    count: 0
    storage-size: 20
    public-url: https://registry:9000

The operator expect a {{ cr_name }}-registry-tls secret to be provided
for tls and user configuration. If the secret is missing, the operator
creates self signed certificates and generates the user password.

Depends-On: https://review.opendev.org/710644
Change-Id: I0c054485b0ad01d53ddcff93f7bcbf34d1810325
3 years ago
Tristan Cacqueray 87ce71fd39 Update attributes to camelCase
This change updates the external_config and job_volumes attribute
name to be consistent with kubernetes definitions.

Depends-On: https://review.opendev.org/707190
Change-Id: I168128e543e03935c03ab9547f208f18e432e0fc
3 years ago
Tristan Cacqueray 2937272624 Replace existing operator tasks with the new dhall function
This change replaces the existing tasks with a dhall function to
generates all the kubernetes objects. The operator nows converts
the CR spec to a dhall `Input`, then it applies the function
output to the cluster. Follow-up changes demonstrate how
runtime operations can be performed around that function.

This change updates the zuul-ci_v1alpha1_zuul_cr.yaml file with
the actual CR defined in the zuul specification so that it can
be used in the functional tests.

Depends-On: https://review.opendev.org/702753
Change-Id: Iea51bccf90def6e827d2c5846ad6a7e4c86a5bc1
3 years ago
Tristan Cacqueray 5aa579c027 Do not require zuul_cluster label for provided sshsecretname 4 years ago
Tristan Cacqueray 85c4e0f50a Autoscale replicas count based on gearman status 4 years ago
Tristan Cacqueray 518f813503 Fix crd name 4 years ago
Tristan Cacqueray fa042d9c6f Switch back to Zuul crd, short name is better 4 years ago
Tristan Cacqueray 996737d56d Update zuul_cluster to use cr metadata
Also refactor the roles to share group_vars and common tasks
4 years ago
Tristan Cacqueray 9cbe822f81 Add Readme and deploy roles 4 years ago
Tristan Cacqueray e8ea1de7e9 Customize generated files 4 years ago
Tristan Cacqueray 50556f27d1 INITIAL COMMIT 4 years ago