Commit Graph

23 Commits (900528164e13785795a1c81b3832030edecff6ba)

Author SHA1 Message Date
James E. Blair d87ea64c06 Add support for zuul-registry
Change-Id: Ie206f8f7c48da3cfaabb33d16f2a339b35db4e5e
2021-07-23 10:27:06 -07:00
James E. Blair a32c31bc3c Add docs
Change-Id: I2975607a51860df88863454785ae5d189f6f2831
2021-07-23 10:27:04 -07:00
James E. Blair e5879666bd Bump API version to v1alpha2
To accomodate the CR syntax changes.

Change-Id: Ie646a9c58655b0987a8fb0d4c914cd8b93190b1b
2021-07-20 13:16:58 -07:00
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
2021-07-20 13:16:07 -07:00
Tristan Cacqueray ee8a7b2cfb Remove command args override and update operator-framework to v1.4.2
This change fixes an issue where zuul services can't create
a lockfile.

Another issue happening with older operator-framework and newer
kubernetes version is being fixed by updating the operator-framework
following this migration documentation:

Change-Id: I6adfb907184112f0b7debb050975f76cd1dd4b01
2021-04-06 17:23:56 +00:00
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 "".

Change-Id: Ia1a5dd4aa9de410937f59a769019dcdb34167944
2020-04-17 16:50:44 +00:00
Tristan Cacqueray 20f634230d Add initial withCertManager input toggle
This change adds a new input toggle to enable using a cert-manager service.
The operator currently only setup a selfSigned CA.

Change-Id: Ifc63768a87f9508c66e4414d5286bae2969985e7
2020-04-15 00:04:21 +00:00
Tristan Cacqueray c6d35be4d6 Add zuul-registry deployment
This change adds an optional registry configuration to the spec:

    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.

Change-Id: I0c054485b0ad01d53ddcff93f7bcbf34d1810325
2020-04-14 11:22:20 +00:00
Tristan Cacqueray 87ce71fd39 Update attributes to camelCase
This change updates the external_config and job_volumes attribute
name to be consistent with kubernetes definitions.

Change-Id: I168128e543e03935c03ab9547f208f18e432e0fc
2020-04-06 20:59:48 +00:00
Tristan Cacqueray bb0b0c984d Add tenant reconfiguration when main.yaml changed
This change adds zuul scheduler reconfiguration when the tenant config

Change-Id: Ib405f5508f513b41f6167e86bf9abe83640d8a18
2020-03-27 16:17:37 +00:00
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.

Change-Id: Iea51bccf90def6e827d2c5846ad6a7e4c86a5bc1
2020-02-04 00:51:30 +00:00
Jeff Liu 5637d13f1f use opendev image building system for zuul-operator test

Change-Id: I12bde1fbe892273c458f11e568402d1b53073a41
2019-07-31 10:56:55 -04:00
Jeff Liu aafaeab660 Add Kubernetes Operator Functional Test Job
A job that will run playbooks which start kubernetes, and verify that the
zuul-operator builds properly. This will be added to check and gate and
is the first step to

Change-Id: Idf677621cf178b3af9975bbd22fbfe0d30df7ee5
2019-07-12 10:37:42 -04:00
Tristan Cacqueray 5aa579c027 Do not require zuul_cluster label for provided sshsecretname 2019-04-09 01:49:58 +00:00
Tristan Cacqueray 85c4e0f50a Autoscale replicas count based on gearman status 2019-04-08 09:03:14 +00:00
Tristan Cacqueray 3900ec1bf3 Add missing pg cluster rbac 2019-04-08 04:39:15 +00:00
Tristan Cacqueray 518f813503 Fix crd name 2019-04-05 10:23:00 +00:00
Tristan Cacqueray 31a7934291 Add uid entrypoint 2019-04-05 09:07:57 +00:00
Tristan Cacqueray fa042d9c6f Switch back to Zuul crd, short name is better 2019-04-05 01:39:53 +00:00
Tristan Cacqueray 996737d56d Update zuul_cluster to use cr metadata
Also refactor the roles to share group_vars and common tasks
2019-04-04 08:20:25 +00:00
Tristan Cacqueray 9cbe822f81 Add Readme and deploy roles 2019-04-02 10:04:53 +00:00
Tristan Cacqueray e8ea1de7e9 Customize generated files 2019-04-02 10:04:48 +00:00
Tristan Cacqueray 50556f27d1 INITIAL COMMIT 2019-04-02 10:03:52 +00:00