feat: allow for custom registry
This patch adds a simple CLI which can mirror all the images needed
as well as allow for simple override for `atmosphere_image_repository`
for all images.
diff --git a/roles/keepalived/defaults/main.yml b/roles/keepalived/defaults/main.yml
index 5fddd22..ac9309e 100644
--- a/roles/keepalived/defaults/main.yml
+++ b/roles/keepalived/defaults/main.yml
@@ -36,18 +36,6 @@
keepalived_interface: "{{ undef(hint='You must specify a Keepalived virtual IP interface') }}"
# ]]]
-# .. envvar:: keepalived_image_repository [[[
-#
-# Keepalived container image repository location
-keepalived_image_repository: "{{ atmosphere_image_repository | default('us-docker.pkg.dev/vexxhost-infra/openstack') }}"
-
- # ]]]
-# .. envvar:: keepalived_image_tag [[[
-#
-# Keepalived container image tag
-keepalived_image_tag: 2.0.19
-
- # ]]]
# .. envvar:: keepalived_vrid [[[
#
# Keepalived virtual router id
diff --git a/roles/keepalived/tasks/main.yml b/roles/keepalived/tasks/main.yml
index dedddfc..d401c4b 100644
--- a/roles/keepalived/tasks/main.yml
+++ b/roles/keepalived/tasks/main.yml
@@ -118,7 +118,7 @@
automountServiceAccountToken: true
initContainers:
- name: init
- image: "{{ keepalived_image_repository }}/kubernetes-entrypoint:latest"
+ image: "{{ lookup('vexxhost.atmosphere.image_ref', 'dep_check', output='ref') }}"
env:
- name: NAMESPACE
valueFrom:
@@ -133,7 +133,7 @@
- name: DEPENDENCY_POD_JSON
value: '[{"labels":{"application":"neutron","component":"neutron-ovs-agent"},"requireSameNode":true}]'
- name: wait-for-ip
- image: "{{ keepalived_image_repository }}/keepalived:{{ keepalived_image_tag }}"
+ image: "{{ lookup('vexxhost.atmosphere.image_ref', 'keepalived', output='ref') }}"
command:
- /bin/wait-for-ip.sh
volumeMounts:
@@ -144,7 +144,7 @@
subPath: wait-for-ip.sh
containers:
- name: keepalived
- image: "{{ keepalived_image_repository }}/keepalived:{{ keepalived_image_tag }}"
+ image: "{{ lookup('vexxhost.atmosphere.image_ref', 'keepalived', output='ref') }}"
command:
- keepalived
- -f