mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 22:33:35 +00:00
Merge pull request #103 from Spredzy/more_flexibility
Augment the OpenAPI schema at the CRD definition level
This commit is contained in:
@@ -26,9 +26,6 @@ spec:
|
|||||||
deployment_type:
|
deployment_type:
|
||||||
description: Name of the deployment type
|
description: Name of the deployment type
|
||||||
type: string
|
type: string
|
||||||
api_version:
|
|
||||||
description: API version identified
|
|
||||||
type: string
|
|
||||||
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
|
||||||
@@ -236,6 +233,9 @@ spec:
|
|||||||
towerVersion:
|
towerVersion:
|
||||||
description: Version of the deployed instance
|
description: Version of the deployed instance
|
||||||
type: string
|
type: string
|
||||||
|
towerImage:
|
||||||
|
description: URL of the image used for the deployed instance
|
||||||
|
type: string
|
||||||
conditions:
|
conditions:
|
||||||
description: The resulting conditions when a Service Telemetry is instantiated
|
description: The resulting conditions when a Service Telemetry is instantiated
|
||||||
items:
|
items:
|
||||||
|
|||||||
@@ -167,9 +167,6 @@ spec:
|
|||||||
deployment_type:
|
deployment_type:
|
||||||
description: Name of the deployment type
|
description: Name of the deployment type
|
||||||
type: string
|
type: string
|
||||||
api_version:
|
|
||||||
description: API version identified
|
|
||||||
type: string
|
|
||||||
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
|
||||||
@@ -377,6 +374,9 @@ spec:
|
|||||||
towerVersion:
|
towerVersion:
|
||||||
description: Version of the deployed instance
|
description: Version of the deployed instance
|
||||||
type: string
|
type: string
|
||||||
|
towerImage:
|
||||||
|
description: URL of the image used for the deployed instance
|
||||||
|
type: string
|
||||||
conditions:
|
conditions:
|
||||||
description: The resulting conditions when a Service Telemetry is instantiated
|
description: The resulting conditions when a Service Telemetry is instantiated
|
||||||
items:
|
items:
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ spec:
|
|||||||
deployment_type:
|
deployment_type:
|
||||||
description: Name of the deployment type
|
description: Name of the deployment type
|
||||||
type: string
|
type: string
|
||||||
api_version:
|
|
||||||
description: API version identified
|
|
||||||
type: string
|
|
||||||
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
|
||||||
@@ -236,6 +233,9 @@ spec:
|
|||||||
towerVersion:
|
towerVersion:
|
||||||
description: Version of the deployed instance
|
description: Version of the deployed instance
|
||||||
type: string
|
type: string
|
||||||
|
towerImage:
|
||||||
|
description: URL of the image used for the deployed instance
|
||||||
|
type: string
|
||||||
conditions:
|
conditions:
|
||||||
description: The resulting conditions when a Service Telemetry is instantiated
|
description: The resulting conditions when a Service Telemetry is instantiated
|
||||||
items:
|
items:
|
||||||
|
|||||||
@@ -81,6 +81,11 @@ 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:text
|
- urn:alm:descriptor:com.tectonic.ui:text
|
||||||
|
- displayName: Admin account username
|
||||||
|
path: tower_admin_user
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:text
|
||||||
- displayName: Admin email address
|
- displayName: Admin email address
|
||||||
path: tower_admin_email
|
path: tower_admin_email
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
@@ -108,11 +113,23 @@ spec:
|
|||||||
- urn:alm:descriptor:com.tectonic.ui:select:none
|
- urn:alm:descriptor:com.tectonic.ui:select:none
|
||||||
- urn:alm:descriptor:com.tectonic.ui:select:Ingress
|
- urn:alm:descriptor:com.tectonic.ui:select:Ingress
|
||||||
- urn:alm:descriptor:com.tectonic.ui:select:Route
|
- urn:alm:descriptor:com.tectonic.ui:select:Route
|
||||||
|
- displayName: Tower Ingress Annotations
|
||||||
|
path: tower_ingress_annotations
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:text
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:Ingress
|
||||||
|
- displayName: Tower Ingress TLS Secret
|
||||||
|
path: tower_ingress_tls_secret
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:io.kubernetes:Secret
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:Ingress
|
||||||
- displayName: Route DNS host
|
- displayName: Route DNS host
|
||||||
path: tower_route_host
|
path: tower_route_host
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
- urn:alm:descriptor:com.tectonic.ui:label
|
- urn:alm:descriptor:com.tectonic.ui:text
|
||||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:Route
|
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:Route
|
||||||
- displayName: Route TLS termination mechanism
|
- displayName: Route TLS termination mechanism
|
||||||
path: tower_route_tls_termination_mechanism
|
path: tower_route_tls_termination_mechanism
|
||||||
@@ -142,6 +159,11 @@ 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:resourceRequirements
|
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||||
|
- displayName: PostgreSQL container resource requirements (when using a managed instance)
|
||||||
|
path: tower_postgres_resource_requirements
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||||
- displayName: Replicas
|
- displayName: Replicas
|
||||||
path: tower_replicas
|
path: tower_replicas
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
@@ -157,6 +179,26 @@ 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: Deployment Type
|
||||||
|
path: deployment_type
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
|
- displayName: Tower Image
|
||||||
|
path: tower_image
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
|
- displayName: Tower Postgres Storage Class
|
||||||
|
path: tower_postgres_storage_class
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
|
- displayName: Certificate Authorirty Trust Bundle
|
||||||
|
path: ca_trust_bundle
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||||
statusDescriptors:
|
statusDescriptors:
|
||||||
- displayName: URL
|
- displayName: URL
|
||||||
description: Route to access the instance deployed
|
description: Route to access the instance deployed
|
||||||
@@ -167,7 +209,7 @@ spec:
|
|||||||
description: Admin user for the instance deployed
|
description: Admin user for the instance deployed
|
||||||
path: towerAdminUser
|
path: towerAdminUser
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
- urn:alm:descriptor:com.tectonic.ui:label
|
- urn:alm:descriptor:com.tectonic.ui:text
|
||||||
- displayName: Admin Password
|
- displayName: Admin Password
|
||||||
description: Admin password for the instance deployed
|
description: Admin password for the instance deployed
|
||||||
path: towerAdminPasswordSecret
|
path: towerAdminPasswordSecret
|
||||||
@@ -177,7 +219,12 @@ spec:
|
|||||||
description: Version of the instance deployed
|
description: Version of the instance deployed
|
||||||
path: towerVersion
|
path: towerVersion
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
- urn:alm:descriptor:com.tectonic.ui:label
|
- urn:alm:descriptor:com.tectonic.ui:text
|
||||||
|
- displayName: Image
|
||||||
|
description: Image of the instance deployed
|
||||||
|
path: towerImage
|
||||||
|
x-descriptors:
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:text
|
||||||
description: AWX operator
|
description: AWX operator
|
||||||
displayName: AWX
|
displayName: AWX
|
||||||
icon:
|
icon:
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ spec:
|
|||||||
properties:
|
properties:
|
||||||
spec:
|
spec:
|
||||||
properties:
|
properties:
|
||||||
|
deployment_type:
|
||||||
|
description: Name of the deployment type
|
||||||
|
type: string
|
||||||
|
tower_admin_user:
|
||||||
|
description: Username to use for the admin account
|
||||||
|
type: string
|
||||||
|
default: admin
|
||||||
tower_hostname:
|
tower_hostname:
|
||||||
description: The hostname of the instance
|
description: The hostname of the instance
|
||||||
type: string
|
type: string
|
||||||
@@ -48,6 +55,12 @@ spec:
|
|||||||
- ingress
|
- ingress
|
||||||
- Route
|
- Route
|
||||||
- route
|
- route
|
||||||
|
tower_ingress_annotations:
|
||||||
|
description: Annotations to add to the ingress
|
||||||
|
type: string
|
||||||
|
tower_ingress_tls_secret:
|
||||||
|
description: Secret where the ingress TLS secret can be found
|
||||||
|
type: string
|
||||||
tower_route_host:
|
tower_route_host:
|
||||||
description: The DNS to use to points to the instance
|
description: The DNS to use to points to the instance
|
||||||
type: string
|
type: string
|
||||||
@@ -63,6 +76,9 @@ spec:
|
|||||||
tower_route_tls_secret:
|
tower_route_tls_secret:
|
||||||
description: Secret where the TLS related credentials are stored
|
description: Secret where the TLS related credentials are stored
|
||||||
type: string
|
type: string
|
||||||
|
tower_image:
|
||||||
|
description: Registry path to the application container to use
|
||||||
|
type: string
|
||||||
tower_image_pull_policy:
|
tower_image_pull_policy:
|
||||||
description: The image pull policy
|
description: The image pull policy
|
||||||
type: string
|
type: string
|
||||||
@@ -131,6 +147,34 @@ spec:
|
|||||||
description: Whether or not to preload data upon Tower instance creation
|
description: Whether or not to preload data upon Tower instance creation
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
tower_postgres_resource_requirements:
|
||||||
|
description: Resource requirements for the PostgreSQL container
|
||||||
|
properties:
|
||||||
|
requests:
|
||||||
|
properties:
|
||||||
|
cpu:
|
||||||
|
type: string
|
||||||
|
memory:
|
||||||
|
type: string
|
||||||
|
storage:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
limits:
|
||||||
|
properties:
|
||||||
|
cpu:
|
||||||
|
type: string
|
||||||
|
memory:
|
||||||
|
type: string
|
||||||
|
storage:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
tower_postgres_storage_class:
|
||||||
|
description: Storage class to use for the PostgreSQL PVC
|
||||||
|
type: string
|
||||||
|
ca_trust_bundle:
|
||||||
|
description: Path where the trusted CA bundle is available
|
||||||
|
type: string
|
||||||
type: object
|
type: object
|
||||||
status:
|
status:
|
||||||
properties:
|
properties:
|
||||||
@@ -146,6 +190,9 @@ spec:
|
|||||||
towerVersion:
|
towerVersion:
|
||||||
description: Version of the deployed instance
|
description: Version of the deployed instance
|
||||||
type: string
|
type: string
|
||||||
|
towerImage:
|
||||||
|
description: URL of the image used for the deployed instance
|
||||||
|
type: string
|
||||||
conditions:
|
conditions:
|
||||||
description: The resulting conditions when a Service Telemetry is instantiated
|
description: The resulting conditions when a Service Telemetry is instantiated
|
||||||
items:
|
items:
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
deployment_type: awx
|
deployment_type: awx
|
||||||
api_version: '{{ deployment_type }}.ansible.com/v1beta1'
|
|
||||||
|
|
||||||
tower_task_privileged: false
|
tower_task_privileged: false
|
||||||
tower_ingress_type: none
|
tower_ingress_type: none
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
---
|
---
|
||||||
|
- name: Set apiVersion and kind variables
|
||||||
|
set_fact:
|
||||||
|
api_version: '{{ hostvars["localhost"]["inventory_file"].split("/")[4:6] | join("/") }}'
|
||||||
|
kind: '{{ hostvars["localhost"]["inventory_file"].split("/")[6] }}'
|
||||||
|
|
||||||
- name: Update admin password status
|
- name: Update admin password status
|
||||||
operator_sdk.util.k8s_status:
|
operator_sdk.util.k8s_status:
|
||||||
api_version: '{{ api_version }}'
|
api_version: '{{ api_version }}'
|
||||||
kind: "{{ deployment_type | upper }}"
|
kind: "{{ kind }}"
|
||||||
name: "{{ meta.name }}"
|
name: "{{ meta.name }}"
|
||||||
namespace: "{{ meta.namespace }}"
|
namespace: "{{ meta.namespace }}"
|
||||||
status:
|
status:
|
||||||
@@ -11,7 +16,7 @@
|
|||||||
- name: Update admin user status
|
- name: Update admin user status
|
||||||
operator_sdk.util.k8s_status:
|
operator_sdk.util.k8s_status:
|
||||||
api_version: '{{ api_version }}'
|
api_version: '{{ api_version }}'
|
||||||
kind: "{{ deployment_type | upper }}"
|
kind: "{{ kind }}"
|
||||||
name: "{{ meta.name }}"
|
name: "{{ meta.name }}"
|
||||||
namespace: "{{ meta.namespace }}"
|
namespace: "{{ meta.namespace }}"
|
||||||
status:
|
status:
|
||||||
@@ -30,12 +35,21 @@
|
|||||||
- name: Update version status
|
- name: Update version status
|
||||||
operator_sdk.util.k8s_status:
|
operator_sdk.util.k8s_status:
|
||||||
api_version: '{{ api_version }}'
|
api_version: '{{ api_version }}'
|
||||||
kind: "{{ deployment_type | upper }}"
|
kind: "{{ kind }}"
|
||||||
name: "{{ meta.name }}"
|
name: "{{ meta.name }}"
|
||||||
namespace: "{{ meta.namespace }}"
|
namespace: "{{ meta.namespace }}"
|
||||||
status:
|
status:
|
||||||
towerVersion: "{{ instance_version.stdout | trim }}"
|
towerVersion: "{{ instance_version.stdout | trim }}"
|
||||||
|
|
||||||
|
- name: Update image status
|
||||||
|
operator_sdk.util.k8s_status:
|
||||||
|
api_version: '{{ api_version }}'
|
||||||
|
kind: "{{ kind }}"
|
||||||
|
name: "{{ meta.name }}"
|
||||||
|
namespace: "{{ meta.namespace }}"
|
||||||
|
status:
|
||||||
|
towerImage: "{{ tower_image }}"
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Retrieve route URL
|
- name: Retrieve route URL
|
||||||
community.kubernetes.k8s_info:
|
community.kubernetes.k8s_info:
|
||||||
@@ -47,7 +61,7 @@
|
|||||||
- name: Update URL status
|
- name: Update URL status
|
||||||
operator_sdk.util.k8s_status:
|
operator_sdk.util.k8s_status:
|
||||||
api_version: '{{ api_version }}'
|
api_version: '{{ api_version }}'
|
||||||
kind: "{{ deployment_type | upper }}"
|
kind: "{{ kind }}"
|
||||||
name: "{{ meta.name }}"
|
name: "{{ meta.name }}"
|
||||||
namespace: "{{ meta.namespace }}"
|
namespace: "{{ meta.namespace }}"
|
||||||
status:
|
status:
|
||||||
|
|||||||
Reference in New Issue
Block a user