mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-27 05:43:11 +00:00
Compare commits
1 Commits
0.12.0
...
shanemcd-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7c67e75a4 |
@@ -2,6 +2,7 @@
|
||||
|
||||
[](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
|
||||
@@ -571,8 +572,6 @@ 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
|
||||
@@ -681,8 +680,6 @@ 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.12.0
|
||||
operator_version: 0.11.0
|
||||
pull_policy: Always
|
||||
ansible_debug_logs: "false"
|
||||
|
||||
@@ -384,7 +384,7 @@ spec:
|
||||
setting:
|
||||
type: string
|
||||
value:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: string
|
||||
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:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: string
|
||||
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.12.0"
|
||||
image: "quay.io/ansible/awx-operator:0.11.0"
|
||||
imagePullPolicy: "Always"
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/ansible-operator/runner
|
||||
@@ -738,7 +738,7 @@ spec:
|
||||
- name: ANSIBLE_GATHERING
|
||||
value: explicit
|
||||
- name: OPERATOR_VERSION
|
||||
value: "0.12.0"
|
||||
value: "0.11.0"
|
||||
- name: ANSIBLE_DEBUG_LOGS
|
||||
value: "false"
|
||||
livenessProbe:
|
||||
|
||||
@@ -384,7 +384,7 @@ spec:
|
||||
setting:
|
||||
type: string
|
||||
value:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: string
|
||||
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.12.0
|
||||
name: awx-operator.v0.11.0
|
||||
namespace: placeholder
|
||||
spec:
|
||||
apiservicedefinitions: {}
|
||||
@@ -535,23 +535,6 @@ 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
|
||||
@@ -695,10 +678,10 @@ spec:
|
||||
- name: ANSIBLE_GATHERING
|
||||
value: explicit
|
||||
- name: OPERATOR_VERSION
|
||||
value: 0.12.0
|
||||
value: 0.11.0
|
||||
- name: ANSIBLE_DEBUG_LOGS
|
||||
value: "false"
|
||||
image: quay.io/ansible/awx-operator:0.12.0
|
||||
image: quay.io/ansible/awx-operator:0.11.0
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -737,5 +720,5 @@ spec:
|
||||
provider:
|
||||
name: AWX Community
|
||||
url: https://github.com/ansible/awx-operator
|
||||
replaces: awx-operator.v0.11.0
|
||||
version: 0.12.0
|
||||
replaces: awx-operator.v0.10.0
|
||||
version: 0.11.0
|
||||
|
||||
@@ -104,7 +104,7 @@ spec:
|
||||
setting:
|
||||
type: string
|
||||
value:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: string
|
||||
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: Init container image version to use
|
||||
description: Initcontainer image version to use
|
||||
type: string
|
||||
kind:
|
||||
description: Kind of the deployment type
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
collections:
|
||||
- name: kubernetes.core
|
||||
version: '==1.1.1'
|
||||
version: '==1.2.1'
|
||||
- name: operator_sdk.util
|
||||
version: '==0.1.0'
|
||||
|
||||
@@ -10,8 +10,11 @@
|
||||
|
||||
- name: Set AWX object
|
||||
set_fact:
|
||||
awx_spec:
|
||||
spec: "{{ this_awx['resources'][0]['spec'] }}"
|
||||
_awx: "{{ _awx_cro['resources'][0] }}"
|
||||
|
||||
- name: Set user specified spec
|
||||
set_fact:
|
||||
awx_spec: "{{ _awx['spec'] }}"
|
||||
|
||||
- name: Set names of backed up secrets in the CR spec
|
||||
set_fact:
|
||||
@@ -27,4 +30,4 @@
|
||||
namespace: "{{ backup_pvc_namespace }}"
|
||||
pod: "{{ meta.name }}-db-management"
|
||||
command: >-
|
||||
bash -c 'echo "$0" > {{ backup_dir }}/awx_object' {{ awx_spec | to_yaml | quote }}
|
||||
bash -c 'echo "$0" > {{ backup_dir }}/awx_object' {{ awx_spec | quote }}
|
||||
|
||||
@@ -45,21 +45,10 @@
|
||||
set_fact:
|
||||
backup_claim: "{{ backup_pvc | default(_default_backup_pvc, true) }}"
|
||||
|
||||
- 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
|
||||
- name: Create PVC for backup
|
||||
k8s:
|
||||
kind: PersistentVolumeClaim
|
||||
template: "backup_pvc.yml.j2"
|
||||
when:
|
||||
- backup_pvc == '' or backup_pvc is not defined
|
||||
|
||||
|
||||
@@ -18,11 +18,8 @@
|
||||
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.2
|
||||
image_version: 19.2.1
|
||||
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.5.0
|
||||
image: quay.io/ansible/awx-ee:0.5.0
|
||||
- name: AWX EE 0.4.0
|
||||
image: quay.io/ansible/awx-ee:0.4.0
|
||||
|
||||
control_plane_ee_image: quay.io/ansible/awx-ee:0.5.0
|
||||
control_plane_ee_image: quay.io/ansible/awx-ee:0.4.0
|
||||
|
||||
create_preload_data: true
|
||||
|
||||
|
||||
@@ -90,7 +90,11 @@ 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,5 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Save kind
|
||||
set_fact:
|
||||
_kind: "{{ kind }}"
|
||||
|
||||
- name: Get AWX object definition from pvc
|
||||
k8s_exec:
|
||||
namespace: "{{ backup_pvc_namespace }}"
|
||||
@@ -21,13 +25,22 @@
|
||||
|
||||
- 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
|
||||
definition: "{{ lookup('template', 'awx_object.yml.j2') }}"
|
||||
template: awx_object.yml.j2
|
||||
wait: true
|
||||
wait_condition:
|
||||
type: "Running"
|
||||
|
||||
@@ -4,5 +4,4 @@ kind: AWX
|
||||
metadata:
|
||||
name: '{{ deployment_name }}'
|
||||
namespace: '{{ meta.namespace }}'
|
||||
spec:
|
||||
{{ spec | to_yaml | indent(2) }}
|
||||
spec: {{ awx_spec }}
|
||||
|
||||
@@ -12,9 +12,8 @@ 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 | indent(4) }}
|
||||
{% endfor %}
|
||||
{% for key, value in secrets[secret]['data'].items() %}
|
||||
'{{ key }}': '{{ value | b64decode }}'
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
BIN
vendor/galaxy.ansible.com/kubernetes/core/kubernetes-core-1.1.1.tar.gz
generated
vendored
BIN
vendor/galaxy.ansible.com/kubernetes/core/kubernetes-core-1.1.1.tar.gz
generated
vendored
Binary file not shown.
BIN
vendor/galaxy.ansible.com/kubernetes/core/kubernetes-core-1.2.1.tar.gz
generated
vendored
Normal file
BIN
vendor/galaxy.ansible.com/kubernetes/core/kubernetes-core-1.2.1.tar.gz
generated
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user