fix: Remove unnecessary container registry step
This commit is contained in:
@@ -116,6 +116,9 @@
|
||||
# PostgreSQL storage for all components (RWO)
|
||||
database:
|
||||
postgres_storage_class: "{{ aap_operator_storage_class }}"
|
||||
# Gateway is the primary UI/API entry point in AAP 2.5+
|
||||
gateway:
|
||||
route_host: "{{ aap_operator_gateway_route_host | default(omit) }}"
|
||||
# Component toggles and per-component config
|
||||
controller:
|
||||
disabled: "{{ aap_operator_controller_disabled | bool }}"
|
||||
@@ -129,6 +132,48 @@
|
||||
eda:
|
||||
disabled: "{{ aap_operator_eda_disabled | bool }}"
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Step 3a: Clear controller route_host if not explicitly set
|
||||
# strategic-merge-patch (state: present) does not remove existing fields,
|
||||
# so we must explicitly remove /spec/controller/route_host if the user
|
||||
# hasn't set aap_operator_controller_route_host (e.g. after switching to
|
||||
# gateway-based routing).
|
||||
# ------------------------------------------------------------------
|
||||
# The platform operator propagates route_host to the child AutomationController CR.
|
||||
# Both must be cleared or the controller operator will continue to set the old hostname.
|
||||
- name: Remove controller route_host from platform CR (use auto-generated route)
|
||||
kubernetes.core.k8s_json_patch:
|
||||
api_version: aap.ansible.com/v1alpha1
|
||||
kind: AnsibleAutomationPlatform
|
||||
namespace: "{{ aap_operator_namespace }}"
|
||||
name: "{{ aap_operator_platform_name }}"
|
||||
patch:
|
||||
- op: remove
|
||||
path: /spec/controller/route_host
|
||||
when: aap_operator_controller_route_host is not defined
|
||||
failed_when: false # no-op if field doesn't exist
|
||||
|
||||
- name: Remove controller route_host from child AutomationController CR
|
||||
kubernetes.core.k8s_json_patch:
|
||||
api_version: automationcontroller.ansible.com/v1beta1
|
||||
kind: AutomationController
|
||||
namespace: "{{ aap_operator_namespace }}"
|
||||
name: "{{ aap_operator_platform_name }}-controller"
|
||||
patch:
|
||||
- op: remove
|
||||
path: /spec/route_host
|
||||
when: aap_operator_controller_route_host is not defined
|
||||
failed_when: false # no-op if field doesn't exist or CR not yet created
|
||||
|
||||
- name: Delete aap-controller Route so operator recreates with correct hostname
|
||||
kubernetes.core.k8s:
|
||||
api_version: route.openshift.io/v1
|
||||
kind: Route
|
||||
namespace: "{{ aap_operator_namespace }}"
|
||||
name: "{{ aap_operator_platform_name }}-controller"
|
||||
state: absent
|
||||
when: aap_operator_controller_route_host is not defined
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Step 4: Wait for platform to be ready
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user