mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-27 05:43:11 +00:00
Compare commits
19 Commits
shanemcd-p
...
0.12.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
555dc8516a | ||
|
|
34958282d2 | ||
|
|
6b01ada12b | ||
|
|
e28d114d78 | ||
|
|
cd312c6d70 | ||
|
|
82422b8510 | ||
|
|
c7c97da68e | ||
|
|
657b5b67db | ||
|
|
b664b920dc | ||
|
|
7ea60efe3e | ||
|
|
f5c8b33b40 | ||
|
|
a28a744f00 | ||
|
|
68aaf1db79 | ||
|
|
b8d6dcfbf2 | ||
|
|
0ea9a04028 | ||
|
|
e448d0ec8e | ||
|
|
cb14c9a1fc | ||
|
|
d3cfc55944 | ||
|
|
9cc8aeeb4b |
@@ -2,7 +2,6 @@
|
||||
|
||||
[](https://opensource.org/licenses/Apache-2.0) [](https://github.com/ansible/awx-operator/actions)
|
||||
|
||||
|
||||
An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built with [Operator SDK](https://github.com/operator-framework/operator-sdk) and Ansible.
|
||||
|
||||
# Table of Contents
|
||||
@@ -572,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
|
||||
@@ -680,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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -384,7 +384,7 @@ spec:
|
||||
setting:
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -384,7 +384,7 @@ spec:
|
||||
setting:
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
collections:
|
||||
- name: kubernetes.core
|
||||
version: '==1.2.1'
|
||||
version: '==1.1.1'
|
||||
- name: operator_sdk.util
|
||||
version: '==0.1.0'
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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: |
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -4,4 +4,5 @@ kind: AWX
|
||||
metadata:
|
||||
name: '{{ deployment_name }}'
|
||||
namespace: '{{ meta.namespace }}'
|
||||
spec: {{ awx_spec }}
|
||||
spec:
|
||||
{{ spec | to_yaml | indent(2) }}
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
BIN
vendor/galaxy.ansible.com/kubernetes/core/kubernetes-core-1.1.1.tar.gz
generated
vendored
Normal file
BIN
vendor/galaxy.ansible.com/kubernetes/core/kubernetes-core-1.1.1.tar.gz
generated
vendored
Normal file
Binary file not shown.
BIN
vendor/galaxy.ansible.com/kubernetes/core/kubernetes-core-1.2.1.tar.gz
generated
vendored
BIN
vendor/galaxy.ansible.com/kubernetes/core/kubernetes-core-1.2.1.tar.gz
generated
vendored
Binary file not shown.
Reference in New Issue
Block a user