Merge pull request #446 from rooftopcellist/missing-secrets

Do not check for default ee-pull-cred secret
This commit is contained in:
Christian Adams
2021-07-01 15:17:12 -04:00
committed by GitHub
3 changed files with 7 additions and 13 deletions

View File

@@ -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 `<resourcename>-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: <resourcename>-ee-pull-credentials
name: my-ee-pull-credentials
namespace: <target namespace>
stringData:
url: <registry url. i.e. quay.io>
@@ -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`

View File

@@ -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:

View File

@@ -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 }}"