fix: Remove unnecessary container registry step
This commit is contained in:
@@ -25,5 +25,8 @@ aap_operator_hub_file_storage_size: 10Gi
|
||||
aap_operator_admin_user: admin
|
||||
|
||||
# --- Routing (optional) ---
|
||||
# Set to a custom hostname to override the auto-generated Gateway route (primary UI/API entry point)
|
||||
# aap_operator_gateway_route_host: aap.example.com
|
||||
# Set to a custom hostname to override the auto-generated Controller route
|
||||
# aap_operator_controller_route_host: aap.example.com
|
||||
# aap_operator_controller_route_host: controller.example.com
|
||||
|
||||
|
||||
@@ -58,10 +58,18 @@ argument_specs:
|
||||
description: Admin username for the platform.
|
||||
type: str
|
||||
default: admin
|
||||
aap_operator_controller_route_host:
|
||||
aap_operator_gateway_route_host:
|
||||
description: >
|
||||
Custom hostname for the Automation Controller Route.
|
||||
When set, overrides the auto-generated route hostname (e.g. aap.example.com).
|
||||
Custom hostname for the AAP Gateway Route (primary UI/API entry point in AAP 2.5+).
|
||||
When set, overrides the auto-generated gateway route (e.g. aap.example.com).
|
||||
Leave unset to use the default apps subdomain route.
|
||||
type: str
|
||||
required: false
|
||||
aap_operator_controller_route_host:
|
||||
description: >
|
||||
Custom hostname for the Automation Controller Route.
|
||||
When set, overrides the auto-generated controller route hostname.
|
||||
Leave unset to use the default apps subdomain route.
|
||||
type: str
|
||||
required: false
|
||||
|
||||
|
||||
@@ -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