From 3a330e494334254ee15d2090df96d792efc3160d Mon Sep 17 00:00:00 2001 From: tabjer Date: Mon, 12 Jul 2021 09:09:01 +0800 Subject: [PATCH 1/4] Added default ingress_path, made it an overridable var --- roles/installer/defaults/main.yml | 2 +- roles/installer/templates/ingress.yaml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/installer/defaults/main.yml b/roles/installer/defaults/main.yml index 8a16f621..ab86fe09 100644 --- a/roles/installer/defaults/main.yml +++ b/roles/installer/defaults/main.yml @@ -9,7 +9,7 @@ database_username: "{{ deployment_type }}" task_privileged: false service_type: ClusterIP ingress_type: none - +ingress_path: '/' # Add annotations to the service account. Specify as literal block. E.g.: # service_account_annotations: | # eks.amazonaws.com/role-arn: arn:aws:iam:::role/ diff --git a/roles/installer/templates/ingress.yaml.j2 b/roles/installer/templates/ingress.yaml.j2 index 6bd586c4..a93cd7b5 100644 --- a/roles/installer/templates/ingress.yaml.j2 +++ b/roles/installer/templates/ingress.yaml.j2 @@ -20,7 +20,7 @@ spec: - host: '{{ hostname }}' http: paths: - - path: / + - path: '{{ ingress_path }}' backend: serviceName: '{{ meta.name }}-service' servicePort: 80 From 0cd6d722afa280918794d2f6381b554a2126a325 Mon Sep 17 00:00:00 2001 From: tabjer Date: Mon, 12 Jul 2021 09:20:52 +0800 Subject: [PATCH 2/4] Updated ingress documentation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aae3ed84..3070cc87 100644 --- a/README.md +++ b/README.md @@ -276,6 +276,7 @@ The following variables are customizable when `ingress_type=ingress`. The `ingre | ingress_annotations | Ingress annotations | Empty string | | ingress_tls_secret | Secret that contains the TLS information | Empty string | | hostname | Define the FQDN | {{ meta.name }}.example.com | +| ingress_path | Define the ingress path to the service | / | ```yaml --- From cc6cb4b9903f5ca3aaab3710ed77a4b31bf5b809 Mon Sep 17 00:00:00 2001 From: tabjer Date: Mon, 12 Jul 2021 12:23:11 +0800 Subject: [PATCH 3/4] Updated awx-operator, crds for ingress_path --- deploy/awx-operator.yaml | 3 +++ deploy/crds/awx_v1beta1_crd.yaml | 3 +++ .../awx-operator/manifests/awx.ansible.com_awxs_crd.yaml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/deploy/awx-operator.yaml b/deploy/awx-operator.yaml index 89cb5226..cdcd37b4 100644 --- a/deploy/awx-operator.yaml +++ b/deploy/awx-operator.yaml @@ -88,6 +88,9 @@ spec: - ingress - Route - route + ingress_path: + description: The ingress path used to reach the deployed service + type: string ingress_annotations: description: Annotations to add to the Ingress Controller type: string diff --git a/deploy/crds/awx_v1beta1_crd.yaml b/deploy/crds/awx_v1beta1_crd.yaml index 961ade74..97b7cf2c 100644 --- a/deploy/crds/awx_v1beta1_crd.yaml +++ b/deploy/crds/awx_v1beta1_crd.yaml @@ -86,6 +86,9 @@ spec: - ingress - Route - route + ingress_path: + description: The ingress path used to reach the deployed service + type: string ingress_annotations: description: Annotations to add to the Ingress Controller type: string diff --git a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml index 6c174639..ed3906b8 100644 --- a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml +++ b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml @@ -152,6 +152,9 @@ spec: - Route - route type: string + ingress_path: + description: The ingress path used to reach the deployed service + type: string init_container_image: description: Registry path to the init container to use type: string From e36b1a3b2cf1012c84eecd9c85b21b3dc69922c7 Mon Sep 17 00:00:00 2001 From: tabjer Date: Thu, 15 Jul 2021 08:44:30 +0800 Subject: [PATCH 4/4] Reset for some changes, updated crd and regenerated files --- ansible/templates/crd.yml.j2 | 3 +++ bundle.Dockerfile | 2 +- .../awx-operator/manifests/awx.ansible.com_awxs_crd.yaml | 9 +++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ansible/templates/crd.yml.j2 b/ansible/templates/crd.yml.j2 index 961ade74..97b7cf2c 100644 --- a/ansible/templates/crd.yml.j2 +++ b/ansible/templates/crd.yml.j2 @@ -86,6 +86,9 @@ spec: - ingress - Route - route + ingress_path: + description: The ingress path used to reach the deployed service + type: string ingress_annotations: description: Annotations to add to the Ingress Controller type: string diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 17fe97cd..f78084ba 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -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/ diff --git a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml index ed3906b8..c1ae8b55 100644 --- a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml +++ b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml @@ -36,7 +36,8 @@ spec: description: Secret where the broadcast websocket secret can be found type: string bundle_cacert_secret: - description: Secret where can be found the trusted Certificate Authority Bundle + description: Secret where can be found the trusted Certificate Authority + Bundle type: string ca_trust_bundle: description: Path where the trusted CA bundle is available @@ -140,6 +141,9 @@ spec: ingress_annotations: description: Annotations to add to the Ingress Controller type: string + ingress_path: + description: The ingress path used to reach the deployed service + type: string ingress_tls_secret: description: Secret where the Ingress TLS secret can be found type: string @@ -152,9 +156,6 @@ spec: - Route - route type: string - ingress_path: - description: The ingress path used to reach the deployed service - type: string init_container_image: description: Registry path to the init container to use type: string