From d2012a27d1d9f13b13d8a145c8d75cd5da383030 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Fri, 30 Jul 2021 15:27:52 -0400 Subject: [PATCH] cephadm: set global default container for ingress This was partially done in b94c8de but only for haproxy in the cephadm mgr module not in the cephadm binary. This adds the same change for keepalived container image. Now both haproxy and keepalived container images are fully qualified (registry + namespace + image). Fixes: https://tracker.ceph.com/issues/51973 Signed-off-by: Dimitri Savineau (cherry picked from commit f9eb7d826563ab9b995b4123c03f6d1b89423e01) --- src/cephadm/cephadm | 6 ++++-- src/pybind/mgr/cephadm/module.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index bf67d34eacc5f..604635172904e 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -53,6 +53,8 @@ DEFAULT_PROMETHEUS_IMAGE = 'docker.io/prom/prometheus:v2.18.1' DEFAULT_NODE_EXPORTER_IMAGE = 'docker.io/prom/node-exporter:v0.18.1' DEFAULT_GRAFANA_IMAGE = 'docker.io/ceph/ceph-grafana:6.7.4' DEFAULT_ALERT_MANAGER_IMAGE = 'docker.io/prom/alertmanager:v0.20.0' +DEFAULT_HAPROXY_IMAGE = 'docker.io/library/haproxy:2.3' +DEFAULT_KEEPALIVED_IMAGE = 'docker.io/arcts/keepalived' DEFAULT_REGISTRY = 'docker.io' # normalize unqualified digests to this # ------------------------------------------------------------------------------ @@ -639,7 +641,7 @@ class HAproxy(object): """Defines an HAproxy container""" daemon_type = 'haproxy' required_files = ['haproxy.cfg'] - default_image = 'haproxy' + default_image = DEFAULT_HAPROXY_IMAGE def __init__(self, ctx: CephadmContext, @@ -726,7 +728,7 @@ class Keepalived(object): """Defines an Keepalived container""" daemon_type = 'keepalived' required_files = ['keepalived.conf'] - default_image = 'arcts/keepalived' + default_image = DEFAULT_KEEPALIVED_IMAGE def __init__(self, ctx: CephadmContext, diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 87f2fbd0625fd..dbf6036830a62 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -97,6 +97,7 @@ DEFAULT_NODE_EXPORTER_IMAGE = 'docker.io/prom/node-exporter:v0.18.1' DEFAULT_GRAFANA_IMAGE = 'docker.io/ceph/ceph-grafana:6.7.4' DEFAULT_ALERT_MANAGER_IMAGE = 'docker.io/prom/alertmanager:v0.20.0' DEFAULT_HAPROXY_IMAGE = 'docker.io/library/haproxy:2.3' +DEFAULT_KEEPALIVED_IMAGE = 'docker.io/arcts/keepalived' # ------------------------------------------------------------------------------ @@ -214,7 +215,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, ), Option( 'container_image_keepalived', - default='arcts/keepalived', + default=DEFAULT_KEEPALIVED_IMAGE, desc='Keepalived container image', ), Option( -- 2.39.5