chore(keycloak): split upstream container image coordinates

This commit is contained in:
transcaffeine 2024-11-08 18:29:35 +01:00
parent 11d5c81c60
commit 1d1f519e3a
Signed by: transcaffeine
GPG Key ID: 03624C433676E465
3 changed files with 15 additions and 5 deletions

View File

@ -2,7 +2,17 @@
keycloak_version: 26.0.5 keycloak_version: 26.0.5
keycloak_container_name: keycloak keycloak_container_name: keycloak
keycloak_container_upstream_image_name: quay.io/keycloak/keycloak keycloak_container_image_upstream_registry: quay.io
keycloak_container_image_upstream_namespace: keycloak
keycloak_container_image_upstream_name: keycloak
keycloak_container_image_upstream: >-2
{{
([
keycloak_container_image_upstream_registry | default([]),
keycloak_container_image_upstream_namespace | default([]),
keycloak_container_image_upstream_name,
] | flatten | join('/'))
}}
keycloak_container_image_name: "keycloak:{{ keycloak_version }}-custom" keycloak_container_image_name: "keycloak:{{ keycloak_version }}-custom"
keycloak_container_database_vendor: postgres keycloak_container_database_vendor: postgres

View File

@ -27,9 +27,9 @@
- keycloak-container - keycloak-container
- keycloak-build-container - keycloak-build-container
- name: Ensure upstream Keycloak container image '{{ keycloak_container_upstream_image_name }}:{{ keycloak_version }}' is present - name: Ensure upstream Keycloak container image '{{ keycloak_container_image_upstream }}:{{ keycloak_version }}' is present
docker_image: docker_image:
name: "{{ keycloak_container_upstream_image_name }}:{{ keycloak_version }}" name: "{{ keycloak_container_image_upstream }}:{{ keycloak_version }}"
source: pull source: pull
state: present state: present
register: keycloak_container_image_upstream_status register: keycloak_container_image_upstream_status

View File

@ -1,4 +1,4 @@
FROM {{ keycloak_container_upstream_image_name }}:{{ keycloak_version }} as builder FROM {{ keycloak_container_image_upstream }}:{{ keycloak_version }} as builder
# Enable health and metrics support # Enable health and metrics support
ENV KC_HEALTH_ENABLED={{ keycloak_config_health_enabled | ternary('true', 'false') }} ENV KC_HEALTH_ENABLED={{ keycloak_config_health_enabled | ternary('true', 'false') }}
@ -27,7 +27,7 @@ RUN {{ keycloak_container_working_directory }}/bin/kc.sh --verbose \
{% endif %} {% endif %}
FROM {{ keycloak_container_upstream_image_name }}:{{ keycloak_version }} FROM {{ keycloak_container_image_upstream }}:{{ keycloak_version }}
COPY --from=builder {{ keycloak_container_working_directory }}/ {{ keycloak_container_working_directory }}/ COPY --from=builder {{ keycloak_container_working_directory }}/ {{ keycloak_container_working_directory }}/
ENV KC_HOSTNAME={{ keycloak_config_hostname }} ENV KC_HOSTNAME={{ keycloak_config_hostname }}