Merge pull request #2 from ansible/devel

merge changes
This commit is contained in:
billett83
2021-03-26 11:05:21 +00:00
committed by GitHub
10 changed files with 109 additions and 20 deletions

View File

@@ -62,6 +62,8 @@ metadata:
name: awx name: awx
``` ```
> The metadata.name you provide, will be the name of the resulting AWX deployment. If you deploy more than one to the same namespace, be sure to use unique names.
Finally, use `kubectl` to create the awx instance in your cluster: Finally, use `kubectl` to create the awx instance in your cluster:
```bash ```bash

View File

@@ -29,9 +29,11 @@ spec:
tower_task_privileged: tower_task_privileged:
description: If a privileged security context should be enabled description: If a privileged security context should be enabled
type: boolean type: boolean
default: false
tower_admin_user: tower_admin_user:
description: Username to use for the admin account description: Username to use for the admin account
type: string type: string
default: admin
tower_hostname: tower_hostname:
description: The hostname of the instance description: The hostname of the instance
type: string type: string

View File

@@ -37,8 +37,8 @@ spec:
httpGet: httpGet:
path: /healthz path: /healthz
port: 6789 port: 6789
initialDelaySeconds: 5 initialDelaySeconds: 15
periodSeconds: 3 periodSeconds: 20
volumes: volumes:
- name: runner - name: runner
emptyDir: {} emptyDir: {}

View File

@@ -143,8 +143,8 @@ spec:
httpGet: httpGet:
path: /healthz path: /healthz
port: 6789 port: 6789
initialDelaySeconds: 5 initialDelaySeconds: 15
periodSeconds: 3 periodSeconds: 20
volumes: volumes:
- name: runner - name: runner
emptyDir: {} emptyDir: {}
@@ -180,9 +180,11 @@ spec:
tower_task_privileged: tower_task_privileged:
description: If a privileged security context should be enabled description: If a privileged security context should be enabled
type: boolean type: boolean
default: false
tower_admin_user: tower_admin_user:
description: Username to use for the admin account description: Username to use for the admin account
type: string type: string
default: admin
tower_hostname: tower_hostname:
description: The hostname of the instance description: The hostname of the instance
type: string type: string
@@ -348,9 +350,6 @@ spec:
type: string type: string
tower_web_extra_volume_mounts: tower_web_extra_volume_mounts:
type: string type: string
tower_ee_image:
description: Registry path to the Execution Environment container to use
type: string
tower_redis_image: tower_redis_image:
description: Registry path to the redis container to use description: Registry path to the redis container to use
type: string type: string

View File

@@ -29,9 +29,11 @@ spec:
tower_task_privileged: tower_task_privileged:
description: If a privileged security context should be enabled description: If a privileged security context should be enabled
type: boolean type: boolean
default: false
tower_admin_user: tower_admin_user:
description: Username to use for the admin account description: Username to use for the admin account
type: string type: string
default: admin
tower_hostname: tower_hostname:
description: The hostname of the instance description: The hostname of the instance
type: string type: string
@@ -197,9 +199,6 @@ spec:
type: string type: string
tower_web_extra_volume_mounts: tower_web_extra_volume_mounts:
type: string type: string
tower_ee_image:
description: Registry path to the Execution Environment container to use
type: string
tower_redis_image: tower_redis_image:
description: Registry path to the redis container to use description: Registry path to the redis container to use
type: string type: string

View File

@@ -100,6 +100,7 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:io.kubernetes:Secret - urn:alm:descriptor:io.kubernetes:Secret
- displayName: Old Database configuration secret
path: tower_old_postgres_configuration_secret path: tower_old_postgres_configuration_secret
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
@@ -208,6 +209,18 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch - urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- displayName: Deploy the instance in development mode ?
path: development_mode
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Should Tower Task container deployed with privileged level ?
path: tower_task_privileged
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Deployment Type - displayName: Deployment Type
path: deployment_type path: deployment_type
x-descriptors: x-descriptors:
@@ -218,16 +231,76 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden - urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Redis Image
path: tower_redis_image
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: PostgreSQL Image
path: tower_postgres_image
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Postgres Storage Class - displayName: Tower Postgres Storage Class
path: tower_postgres_storage_class path: tower_postgres_storage_class
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden - urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Postgres Datapath
path: tower_postgres_data_path
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Certificate Authorirty Trust Bundle - displayName: Certificate Authorirty Trust Bundle
path: ca_trust_bundle path: ca_trust_bundle
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden - urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Task Args
path: tower_task_args
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Task Command
path: tower_task_command
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Task Extra Env
path: tower_task_extra_env
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Task Extra Volume Mounts
path: tower_task_extra_volume_mounts
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Web Args
path: tower_web_args
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Web Command
path: tower_web_command
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Web Extra Env
path: tower_web_extra_env
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Web Extra Volume Mounts
path: tower_web_extra_volume_mounts
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tower Extra Volumes
path: tower_extra_volumes
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
statusDescriptors: statusDescriptors:
- description: Route to access the instance deployed - description: Route to access the instance deployed
displayName: URL displayName: URL
@@ -367,8 +440,8 @@ spec:
httpGet: httpGet:
path: /healthz path: /healthz
port: 6789 port: 6789
initialDelaySeconds: 5 initialDelaySeconds: 15
periodSeconds: 3 periodSeconds: 20
name: awx-operator name: awx-operator
resources: {} resources: {}
volumeMounts: volumeMounts:

View File

@@ -37,6 +37,7 @@ spec:
tower_admin_user: tower_admin_user:
description: Username to use for the admin account description: Username to use for the admin account
type: string type: string
default: admin
tower_broadcast_websocket_secret: tower_broadcast_websocket_secret:
description: Secret where the broadcast websocket secret can be found description: Secret where the broadcast websocket secret can be found
type: string type: string
@@ -180,6 +181,7 @@ spec:
tower_task_privileged: tower_task_privileged:
description: If a privileged security context should be enabled description: If a privileged security context should be enabled
type: boolean type: boolean
default: false
tower_task_resource_requirements: tower_task_resource_requirements:
description: Resource requirements for the task container description: Resource requirements for the task container
properties: properties:

View File

@@ -14,14 +14,26 @@
name: '{{ meta.name }}-postgres-configuration' name: '{{ meta.name }}-postgres-configuration'
register: _default_pg_config_resources register: _default_pg_config_resources
- name: Check for old PostgreSQL configuration secret - name: Check for specified old PostgreSQL configuration secret
k8s_info: k8s_info:
kind: Secret kind: Secret
namespace: '{{ meta.namespace }}' namespace: '{{ meta.namespace }}'
name: '{{ tower_old_postgres_configuration_secret }}' name: '{{ tower_old_postgres_configuration_secret }}'
register: old_pg_config register: _custom_old_pg_config_resources
when: tower_old_postgres_configuration_secret | length when: tower_old_postgres_configuration_secret | length
- name: Check for default old PostgreSQL configuration
k8s_info:
kind: Secret
namespace: '{{ meta.namespace }}'
name: '{{ meta.name }}-old-postgres-configuration'
register: _default_old_pg_config_resources
- name: Set old PostgreSQL configuration
set_fact:
# yamllint disable-line rule:line-length
old_pg_config: '{{ _custom_old_pg_config_resources["resources"] | default([]) | length | ternary(_custom_old_pg_config_resources, _default_old_pg_config_resources) }}' # noqa 204
- name: Set proper database name when migrating from old deployment - name: Set proper database name when migrating from old deployment
set_fact: set_fact:
database_name: "{{ old_pg_config['resources'][0]['data']['database'] | b64decode }}" database_name: "{{ old_pg_config['resources'][0]['data']['database'] | b64decode }}"

View File

@@ -13,7 +13,7 @@
kind: Pod kind: Pod
namespace: '{{ meta.namespace }}' namespace: '{{ meta.namespace }}'
label_selectors: label_selectors:
- "app={{ deployment_type }}-postgres" - "app={{ meta.name }}-{{ deployment_type }}-postgres"
register: postgres_pod register: postgres_pod
until: "postgres_pod['resources'][0]['status']['phase'] == 'Running'" until: "postgres_pod['resources'][0]['status']['phase'] == 'Running'"
delay: 5 delay: 5

View File

@@ -6,11 +6,11 @@ metadata:
name: '{{ meta.name }}-postgres' name: '{{ meta.name }}-postgres'
namespace: '{{ meta.namespace }}' namespace: '{{ meta.namespace }}'
labels: labels:
app: '{{ deployment_type }}-postgres' app: '{{ meta.name }}-{{ deployment_type }}-postgres'
spec: spec:
selector: selector:
matchLabels: matchLabels:
app: '{{ deployment_type }}-postgres' app: '{{ meta.name }}-{{ deployment_type }}-postgres'
serviceName: '{{ meta.name }}' serviceName: '{{ meta.name }}'
replicas: 1 replicas: 1
updateStrategy: updateStrategy:
@@ -18,7 +18,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: '{{ deployment_type }}-postgres' app: '{{ meta.name }}-{{ deployment_type }}-postgres'
spec: spec:
containers: containers:
- image: '{{ tower_postgres_image }}' - image: '{{ tower_postgres_image }}'
@@ -71,10 +71,10 @@ metadata:
name: '{{ meta.name }}-postgres' name: '{{ meta.name }}-postgres'
namespace: '{{ meta.namespace }}' namespace: '{{ meta.namespace }}'
labels: labels:
app: '{{ deployment_type }}-postgres' app: '{{ meta.name }}-{{ deployment_type }}-postgres'
spec: spec:
ports: ports:
- port: 5432 - port: 5432
clusterIP: None clusterIP: None
selector: selector:
app: '{{ deployment_type }}-postgres' app: '{{ meta.name }}-{{ deployment_type }}-postgres'