diff --git a/README.md b/README.md index 8a44b4c2..5ce26fe1 100644 --- a/README.md +++ b/README.md @@ -577,7 +577,7 @@ Example configuration for ConfigMap #### Default execution environments from private registries -In order to register default execution environments from private registries, the Custom Resource needs to know about the pull credentials. Those credentials should be stored as a secret and either specified as `ee_pull_credentials_secret` at the CR spec level, or simply be present on the namespace under the name `-ee-pull-credentials` . Instance initialization will register a `Container registry` type credential on the deployed instance and assign it to the registered default execution environments. +In order to register default execution environments from private registries, the Custom Resource needs to know about the pull credentials. Those credentials should be stored as a secret and specified as `ee_pull_credentials_secret` at the CR spec level. Instance initialization will register a `Container registry` type credential on the deployed instance and assign it to the registered default execution environments. The secret should be formated as follows: @@ -586,7 +586,7 @@ The secret should be formated as follows: apiVersion: v1 kind: Secret metadata: - name: -ee-pull-credentials + name: my-ee-pull-credentials namespace: stringData: url: @@ -596,7 +596,7 @@ stringData: type: Opaque ``` -##### Control plane ee from private registry +##### Control plane EE from private registry The images listed in "ee_images" will be added as globally available Execution Environments. The "control_plane_ee_image" will be used to run project updates. In order to use a private image for any of these you'll need to use `image_pull_secret` to provide a k8s pull secret to access it. Currently the same secret is used for any of these images supplied at install time. You can create `image_pull_secret` diff --git a/roles/backup/tasks/dump_secret.yml b/roles/backup/tasks/dump_secret.yml index d062407c..bc8ac06c 100644 --- a/roles/backup/tasks/dump_secret.yml +++ b/roles/backup/tasks/dump_secret.yml @@ -2,7 +2,7 @@ - name: Get Secret Name set_fact: - _name: "{{ awx_spec[item] | default('') }}" + _name: "{{ awx_spec.spec[item] | default('') }}" - name: Skip if secret name not defined block: diff --git a/roles/installer/tasks/initialize_django.yml b/roles/installer/tasks/initialize_django.yml index ebfbdced..cdfc03ae 100644 --- a/roles/installer/tasks/initialize_django.yml +++ b/roles/installer/tasks/initialize_django.yml @@ -73,18 +73,12 @@ register: _custom_execution_environments_pull_credentials when: ee_pull_credentials_secret | length -- name: Check for default execution environment pull credentials - k8s_info: - kind: Secret - namespace: '{{ meta.namespace }}' - name: '{{ meta.name }}-ee-pull-credentials' - register: _default_execution_environments_pull_credentials - -- name: Set admin password secret +- name: Set execution environment pull credential secret set_fact: _execution_environments_pull_credentials: >- {{ _custom_execution_environments_pull_credentials["resources"] | default([]) | length - | ternary(_custom_execution_environments_pull_credentials, _default_execution_environments_pull_credentials) }} + | ternary(_custom_execution_environments_pull_credentials, []) }} + - name: Register default execution environments (without authentication) k8s_exec: namespace: "{{ meta.namespace }}"