[stable/zed] Build `keepalived` image (#1117)

This is an automated cherry-pick of #1112
/assign mnaser
diff --git a/images/keepalived/Dockerfile b/images/keepalived/Dockerfile
new file mode 100644
index 0000000..e4bfc08
--- /dev/null
+++ b/images/keepalived/Dockerfile
@@ -0,0 +1,22 @@
+# Copyright (c) 2024 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+FROM registry.atmosphere.dev/library/ubuntu:zed
+RUN <<EOF bash -xe
+apt-get update -qq
+apt-get install -qq -y --no-install-recommends \
+    curl keepalived
+apt-get clean
+rm -rf /var/lib/apt/lists/*
+EOF
diff --git a/roles/defaults/vars/main.yml b/roles/defaults/vars/main.yml
index a04c465..e767a38 100644
--- a/roles/defaults/vars/main.yml
+++ b/roles/defaults/vars/main.yml
@@ -73,7 +73,7 @@
   ingress_nginx_controller: registry.k8s.io/ingress-nginx/controller:v1.1.1
   ingress_nginx_default_backend: registry.k8s.io/defaultbackend-amd64:1.5
   ingress_nginx_kube_webhook_certgen: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1
-  keepalived: us-docker.pkg.dev/vexxhost-infra/openstack/keepalived:2.0.19
+  keepalived: registry.atmosphere.dev/library/keepalived:zed
   keycloak: quay.io/keycloak/keycloak:22.0.1-0
   keystone_api: registry.atmosphere.dev/library/keystone:zed
   keystone_credential_cleanup: registry.atmosphere.dev/library/heat:zed
diff --git a/zuul.d/container-images/keepalived.yaml b/zuul.d/container-images/keepalived.yaml
new file mode 100644
index 0000000..11d66cf
--- /dev/null
+++ b/zuul.d/container-images/keepalived.yaml
@@ -0,0 +1,59 @@
+# Copyright (c) 2024 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+- project:
+    check:
+      jobs:
+        - atmosphere-build-container-image-keepalived
+    gate:
+      jobs:
+        - atmosphere-upload-container-image-keepalived
+    promote:
+      jobs:
+        - atmosphere-promote-container-image-keepalived
+
+- job:
+    name: atmosphere-build-container-image-keepalived
+    parent: atmosphere-build-container-image
+    dependencies:
+      - name: atmosphere-build-container-image-ubuntu
+        soft: true
+    vars: &container_image_vars
+      promote_container_image_job: atmosphere-upload-container-image-keepalived
+      container_images:
+        - context: images/keepalived
+          registry: registry.atmosphere.dev
+          repository: registry.atmosphere.dev/library/keepalived
+          arch:
+            - linux/amd64
+          tags:
+            - zed
+    files: &container_image_files
+      - images/ubuntu/.*
+      - images/keepalived/.*
+
+- job:
+    name: atmosphere-upload-container-image-keepalived
+    parent: atmosphere-upload-container-image
+    dependencies:
+      - name: atmosphere-upload-container-image-ubuntu
+        soft: true
+    vars: *container_image_vars
+    files: *container_image_files
+
+- job:
+    name: atmosphere-promote-container-image-keepalived
+    parent: atmosphere-promote-container-image
+    vars: *container_image_vars
+    files: *container_image_files