Compare commits

...

19 Commits

Author SHA1 Message Date
Shane McDonald
555dc8516a Merge pull request #436 from shanemcd/bump-0.12.0
Bump versions for next release
2021-06-28 18:31:19 -04:00
Shane McDonald
34958282d2 Merge pull request #435 from rooftopcellist/keep-spec-newlines
Preserve newlines in AWX spec
2021-06-28 17:50:54 -04:00
Christian M. Adams
6b01ada12b preserve newlines in AWX spec 2021-06-28 17:39:01 -04:00
Shane McDonald
e28d114d78 Bump versions for next release 2021-06-28 17:26:06 -04:00
Julen Landa Alustiza
cd312c6d70 Merge pull request #431 from Zokormazo/ca-fields-to-advanced
olm-catalog: Add missing custom trusted CA related fields
2021-06-28 11:02:20 +02:00
Shane McDonald
82422b8510 Merge pull request #412 from tchellomello/enhanhce_docs_ee
Enhances ee* documentation
2021-06-25 13:19:07 -04:00
Christian Adams
c7c97da68e Merge pull request #430 from rooftopcellist/backup-ee-pull-secret
Backup ingress, bundle & ee pull secrets
2021-06-25 12:00:12 -04:00
Shane McDonald
657b5b67db Merge pull request #432 from shanemcd/fix-extra-settings
Allow for types other than strings to be passed to extra_settings
2021-06-25 09:56:50 -04:00
Shane McDonald
b664b920dc Allow for types other than strings to be passed to extra_settings
This feature was not working as intended
2021-06-25 09:47:08 -04:00
Julen Landa Alustiza
7ea60efe3e olm-catalog: Add missing custom trusted CA related fields
Signed-off-by: Julen Landa Alustiza <jlanda@redhat.com>
2021-06-25 11:36:36 +02:00
Christian M. Adams
f5c8b33b40 Backup ingress, bundle & ee pull secrets 2021-06-24 13:50:49 -04:00
Julen Landa Alustiza
a28a744f00 Merge pull request #429 from Zokormazo/explicitly-nullify-ownerreference
Explicitly nullify ownerReference on operator created backup pvc
2021-06-24 15:39:47 +02:00
Julen Landa Alustiza
68aaf1db79 Explicitly nullify ownerReference on operator created backup pvc
Signed-off-by: Julen Landa Alustiza <jlanda@redhat.com>
2021-06-24 14:58:18 +02:00
Shane McDonald
b8d6dcfbf2 Merge pull request #427 from shanemcd/fix-secrets-with-newlines
Preserve newlines when restored secrets contain newlines
2021-06-23 20:09:08 -04:00
Shane McDonald
0ea9a04028 Preserve newlines when restored secrets contain newlines 2021-06-23 19:57:44 -04:00
Shane McDonald
e448d0ec8e Merge pull request #425 from rooftopcellist/downgrade-kubernetes-module
Downgrade kubernetes module to 1.1.1 because of template bug
2021-06-23 17:20:40 -04:00
Shane McDonald
cb14c9a1fc Pin to different version of kubernetes.core for CI usage
Bugs everywhere!
2021-06-23 17:07:27 -04:00
Christian M. Adams
d3cfc55944 Downgrade kubernetes module to 1.1.1 because of template bug 2021-06-23 14:38:48 -04:00
Marcelo Moreira de Mello
9cc8aeeb4b Enhance ee documentation 2021-06-18 13:53:22 -04:00
19 changed files with 68 additions and 51 deletions

View File

@@ -571,6 +571,8 @@ In a scenario where custom volumes and volume mounts are required to either over
| task_extra_volume_mounts | Specify volume mounts to be added to Task container | '' |
| ee_extra_volume_mounts | Specify volume mounts to be added to Execution container | '' |
> :warning: The `ee_extra_volume_mounts` and `extra_volumes` will only take effect to the globally available Execution Environments. For custom `ee`, please [customize the Pod spec](https://docs.ansible.com/ansible-tower/latest/html/administration/external_execution_envs.html#customize-the-pod-spec).
Example configuration for ConfigMap
#### Default execution environments from private registries
@@ -679,6 +681,8 @@ If you need to export custom environment variables to your containers.
| web_extra_env | Environment variables to be added to Web container | '' |
| ee_extra_env | Environment variables to be added to EE container | '' |
> :warning: The `ee_extra_env` will only take effect to the globally available Execution Environments. For custom `ee`, please [customize the Pod spec](https://docs.ansible.com/ansible-tower/latest/html/administration/external_execution_envs.html#customize-the-pod-spec).
Example configuration of environment variables
```yaml

View File

@@ -1,4 +1,4 @@
operator_image: quay.io/ansible/awx-operator
operator_version: 0.11.0
operator_version: 0.12.0
pull_policy: Always
ansible_debug_logs: "false"

View File

@@ -384,7 +384,7 @@ spec:
setting:
type: string
value:
type: string
x-kubernetes-preserve-unknown-fields: true
type: object
type: array
type: object

View File

@@ -6,9 +6,9 @@ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=awx-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
LABEL operators.operatorframework.io.metrics.project_layout=ansible
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.4
LABEL operators.operatorframework.io.metrics.project_layout=ansible
COPY deploy/olm-catalog/awx-operator/manifests /manifests/
COPY deploy/olm-catalog/awx-operator/metadata /metadata/

View File

@@ -386,7 +386,7 @@ spec:
setting:
type: string
value:
type: string
x-kubernetes-preserve-unknown-fields: true
type: object
type: array
type: object
@@ -720,7 +720,7 @@ spec:
serviceAccountName: awx-operator
containers:
- name: awx-operator
image: "quay.io/ansible/awx-operator:0.11.0"
image: "quay.io/ansible/awx-operator:0.12.0"
imagePullPolicy: "Always"
volumeMounts:
- mountPath: /tmp/ansible-operator/runner
@@ -738,7 +738,7 @@ spec:
- name: ANSIBLE_GATHERING
value: explicit
- name: OPERATOR_VERSION
value: "0.11.0"
value: "0.12.0"
- name: ANSIBLE_DEBUG_LOGS
value: "false"
livenessProbe:

View File

@@ -384,7 +384,7 @@ spec:
setting:
type: string
value:
type: string
x-kubernetes-preserve-unknown-fields: true
type: object
type: array
type: object

View File

@@ -39,7 +39,7 @@ metadata:
capabilities: Basic Install
operators.operatorframework.io/builder: operator-sdk-v0.19.4
operators.operatorframework.io/project_layout: ansible
name: awx-operator.v0.11.0
name: awx-operator.v0.12.0
namespace: placeholder
spec:
apiservicedefinitions: {}
@@ -535,6 +535,23 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- description: Registry path to the init container to use
displayName: Init Container Image
path: init_container_image
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- description: Init container image version to use
displayName: Init Container Image Version
path: init_container_image
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- description: Secret where can be found the trusted Certificate Authority Bundle
path: bundle_cacert_secret
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:io.kubernetes:Secret
statusDescriptors:
- description: Route to access the instance deployed
displayName: URL
@@ -678,10 +695,10 @@ spec:
- name: ANSIBLE_GATHERING
value: explicit
- name: OPERATOR_VERSION
value: 0.11.0
value: 0.12.0
- name: ANSIBLE_DEBUG_LOGS
value: "false"
image: quay.io/ansible/awx-operator:0.11.0
image: quay.io/ansible/awx-operator:0.12.0
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -720,5 +737,5 @@ spec:
provider:
name: AWX Community
url: https://github.com/ansible/awx-operator
replaces: awx-operator.v0.10.0
version: 0.11.0
replaces: awx-operator.v0.11.0
version: 0.12.0

View File

@@ -104,7 +104,7 @@ spec:
setting:
type: string
value:
type: string
x-kubernetes-preserve-unknown-fields: true
type: object
type: array
extra_volumes:
@@ -156,7 +156,7 @@ spec:
description: Registry path to the init container to use
type: string
init_container_image_version:
description: Initcontainer image version to use
description: Init container image version to use
type: string
kind:
description: Kind of the deployment type

View File

@@ -1,6 +1,6 @@
---
collections:
- name: kubernetes.core
version: '==1.2.1'
version: '==1.1.1'
- name: operator_sdk.util
version: '==0.1.0'

View File

@@ -10,11 +10,8 @@
- name: Set AWX object
set_fact:
_awx: "{{ _awx_cro['resources'][0] }}"
- name: Set user specified spec
set_fact:
awx_spec: "{{ _awx['spec'] }}"
awx_spec:
spec: "{{ this_awx['resources'][0]['spec'] }}"
- name: Set names of backed up secrets in the CR spec
set_fact:
@@ -30,4 +27,4 @@
namespace: "{{ backup_pvc_namespace }}"
pod: "{{ meta.name }}-db-management"
command: >-
bash -c 'echo "$0" > {{ backup_dir }}/awx_object' {{ awx_spec | quote }}
bash -c 'echo "$0" > {{ backup_dir }}/awx_object' {{ awx_spec | to_yaml | quote }}

View File

@@ -45,10 +45,21 @@
set_fact:
backup_claim: "{{ backup_pvc | default(_default_backup_pvc, true) }}"
- name: Create PVC for backup
k8s:
kind: PersistentVolumeClaim
template: "backup_pvc.yml.j2"
- block:
- name: Create PVC for backup
k8s:
kind: PersistentVolumeClaim
template: "backup_pvc.yml.j2"
- name: Remove PVC ownerReference
k8s:
definition:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: '{{ deployment_name }}-backup-claim'
namespace: '{{ backup_pvc_namespace }}'
ownerReferences: null
when:
- backup_pvc == '' or backup_pvc is not defined

View File

@@ -18,8 +18,11 @@
include_tasks: dump_secret.yml
loop:
- route_tls_secret
- ingress_tls_secret
- ldap_cacert_secret
- bundle_cacert_secret
- image_pull_secret
- ee_pull_credentials_secret
- name: Nest secrets under a single variable
set_fact:

View File

@@ -106,7 +106,7 @@ extra_volumes: ''
# Use these image versions for Ansible AWX.
image: quay.io/ansible/awx
image_version: 19.2.1
image_version: 19.2.2
redis_image: docker.io/redis
redis_image_version: latest
postgres_image: postgres
@@ -117,10 +117,10 @@ image_pull_policy: IfNotPresent
image_pull_secret: ''
ee_images:
- name: AWX EE 0.4.0
image: quay.io/ansible/awx-ee:0.4.0
- name: AWX EE 0.5.0
image: quay.io/ansible/awx-ee:0.5.0
control_plane_ee_image: quay.io/ansible/awx-ee:0.4.0
control_plane_ee_image: quay.io/ansible/awx-ee:0.5.0
create_preload_data: true

View File

@@ -90,11 +90,7 @@ data:
BROADCAST_WEBSOCKET_PROTOCOL = 'http'
{% for item in extra_settings | default([]) %}
{% if item.value is string %}
{{ item.setting }} = '{{ item.value }}'
{% else %}
{{ item.setting }} = {{ item.value }}
{% endif %}
{% endfor %}
nginx_conf: |

View File

@@ -1,9 +1,5 @@
---
- name: Save kind
set_fact:
_kind: "{{ kind }}"
- name: Get AWX object definition from pvc
k8s_exec:
namespace: "{{ backup_pvc_namespace }}"
@@ -25,22 +21,13 @@
- name: Include spec vars to save them as a dict
include_vars: "{{ tmp_spec.path }}"
register: spec
- name: Use include_vars to read in spec as a dict (because spec doesn't have quotes)
set_fact:
awx_spec: "{{ spec.ansible_facts }}"
- name: Restore kind
set_fact:
kind: "{{ _kind }}"
- name: Deploy AWX
k8s:
state: "{{ state | default('present') }}"
namespace: "{{ meta.namespace }}"
apply: yes
template: awx_object.yml.j2
definition: "{{ lookup('template', 'awx_object.yml.j2') }}"
wait: true
wait_condition:
type: "Running"

View File

@@ -4,4 +4,5 @@ kind: AWX
metadata:
name: '{{ deployment_name }}'
namespace: '{{ meta.namespace }}'
spec: {{ awx_spec }}
spec:
{{ spec | to_yaml | indent(2) }}

View File

@@ -12,8 +12,9 @@ metadata:
app.kubernetes.io/component: '{{ deployment_type }}'
app.kubernetes.io/operator-version: '{{ lookup("env", "OPERATOR_VERSION") }}'
stringData:
{% for key, value in secrets[secret]['data'].items() %}
'{{ key }}': '{{ value | b64decode }}'
{% endfor %}
{% for key, value in secrets[secret]['data'].items() %}
{{ key }}: |-
{{ value | b64decode | indent(4) }}
{% endfor %}
{% endfor %}

Binary file not shown.