From e503cef9d59a818c5f56a7f0dc9ed15a111c46f6 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 7 Apr 2021 13:45:44 -0700 Subject: [PATCH] Pass through extra scheduler config options This lets users specify params like "relative_priority" without the operator needing to know about them. Change-Id: I8a82725e51e8c7172063e0fe944a9ee9f13bada1 --- zuul_operator/templates/zuul.conf | 4 +++- zuul_operator/zuul.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/zuul_operator/templates/zuul.conf b/zuul_operator/templates/zuul.conf index 963897d..2292c37 100644 --- a/zuul_operator/templates/zuul.conf +++ b/zuul_operator/templates/zuul.conf @@ -10,7 +10,9 @@ server=zuul-gearman start=true [scheduler] -tenant_config=/etc/zuul/tenant/main.yaml +{% for key, value in spec.scheduler.items() -%} +{{ key }}={{ value }} +{% endfor %} [database] {% for key, value in spec.database.items() -%} diff --git a/zuul_operator/zuul.py b/zuul_operator/zuul.py index 34a9689..653231a 100644 --- a/zuul_operator/zuul.py +++ b/zuul_operator/zuul.py @@ -64,6 +64,9 @@ class Zuul: self.tenant_secret = spec.get('scheduler', {}).\ get('config', {}).get('secretName') + self.spec.setdefault('scheduler', {})['tenant_config'] = \ + '/etc/zuul/tenant/main.yaml' + ex = self.spec.setdefault('executor', {}) self.cert_manager = certmanager.CertManager(