From fca5cc3c044fd8d2de92b345649dd50c0f496e8c Mon Sep 17 00:00:00 2001 From: Grant Spence Date: Thu, 31 Aug 2023 16:21:19 -0400 Subject: [PATCH] NE-1324: E2E test for External DNS Operator Shared VPC This introduces a new test job for the external-dns-operator repo called e2e-aws-shared-vpc-phz-operator as well as a new workflow optional-operators-ci-aws-shared-vpc-phz. This new workflow installs and configures cluster that is using a shared Route 53 private hosted zone with another AWS account and then installs an optional operator. The new job runs the new workflow with parameters for installing the external-dns-operator. It runs the operator's E2E test suite after configuring the cluster with a shared Route 53 and the external-dns-operator. --- .../openshift-external-dns-operator-main.yaml | 20 ++++++ ...external-dns-operator-main-presubmits.yaml | 72 +++++++++++++++++++ .../ci/aws/shared-vpc-phz/OWNERS | 2 + ...-aws-shared-vpc-phz-workflow.metadata.json | 8 +++ ...rators-ci-aws-shared-vpc-phz-workflow.yaml | 10 +++ 5 files changed, 112 insertions(+) create mode 100644 ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/OWNERS create mode 100644 ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/optional-operators-ci-aws-shared-vpc-phz-workflow.metadata.json create mode 100644 ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/optional-operators-ci-aws-shared-vpc-phz-workflow.yaml diff --git a/ci-operator/config/openshift/external-dns-operator/openshift-external-dns-operator-main.yaml b/ci-operator/config/openshift/external-dns-operator/openshift-external-dns-operator-main.yaml index cf102c080c60b..24d3ea73ba2bc 100644 --- a/ci-operator/config/openshift/external-dns-operator/openshift-external-dns-operator-main.yaml +++ b/ci-operator/config/openshift/external-dns-operator/openshift-external-dns-operator-main.yaml @@ -127,6 +127,26 @@ tests: requests: cpu: 100m workflow: optional-operators-ci-azure +- as: e2e-aws-shared-vpc-phz-operator + steps: + cluster_profile: aws + dependencies: + OO_INDEX: ci-index-external-dns-operator-bundle + env: + BASE_DOMAIN: origin-ci-int-aws.dev.rhcloud.com + OO_CHANNEL: stable-v1 + OO_INSTALL_NAMESPACE: external-dns-operator + OO_PACKAGE: external-dns-operator + OO_TARGET_NAMESPACES: '!install' + test: + - as: test + cli: latest + commands: make test-e2e + from: src + resources: + requests: + cpu: 100m + workflow: optional-operators-ci-aws-shared-vpc-phz zz_generated_metadata: branch: main org: openshift diff --git a/ci-operator/jobs/openshift/external-dns-operator/openshift-external-dns-operator-main-presubmits.yaml b/ci-operator/jobs/openshift/external-dns-operator/openshift-external-dns-operator-main-presubmits.yaml index 200ce03cef0d4..a103e86098822 100644 --- a/ci-operator/jobs/openshift/external-dns-operator/openshift-external-dns-operator-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/external-dns-operator/openshift-external-dns-operator-main-presubmits.yaml @@ -119,6 +119,78 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-aws-operator,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^main$ + - ^main- + cluster: build03 + context: ci/prow/e2e-aws-shared-vpc-phz-operator + decorate: true + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-external-dns-operator-main-e2e-aws-shared-vpc-phz-operator + rerun_command: /test e2e-aws-shared-vpc-phz-operator + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --secret-dir=/usr/local/e2e-aws-shared-vpc-phz-operator-cluster-profile + - --target=e2e-aws-shared-vpc-phz-operator + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /usr/local/e2e-aws-shared-vpc-phz-operator-cluster-profile + name: cluster-profile + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: cluster-profile + secret: + secretName: cluster-secrets-aws + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-aws-shared-vpc-phz-operator,?($|\s.*) - agent: kubernetes always_run: true branches: diff --git a/ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/OWNERS b/ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/OWNERS new file mode 100644 index 0000000000000..806601568ce6c --- /dev/null +++ b/ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/OWNERS @@ -0,0 +1,2 @@ +approvers: + - gcs278 diff --git a/ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/optional-operators-ci-aws-shared-vpc-phz-workflow.metadata.json b/ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/optional-operators-ci-aws-shared-vpc-phz-workflow.metadata.json new file mode 100644 index 0000000000000..6bcd15bfca2a8 --- /dev/null +++ b/ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/optional-operators-ci-aws-shared-vpc-phz-workflow.metadata.json @@ -0,0 +1,8 @@ +{ + "path": "optional-operators/ci/aws/shared-vpc-phz/optional-operators-ci-aws-shared-vpc-phz-workflow.yaml", + "owners": { + "approvers": [ + "gcs278" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/optional-operators-ci-aws-shared-vpc-phz-workflow.yaml b/ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/optional-operators-ci-aws-shared-vpc-phz-workflow.yaml new file mode 100644 index 0000000000000..3e2a9ddac5c67 --- /dev/null +++ b/ci-operator/step-registry/optional-operators/ci/aws/shared-vpc-phz/optional-operators-ci-aws-shared-vpc-phz-workflow.yaml @@ -0,0 +1,10 @@ +workflow: + as: optional-operators-ci-aws-shared-vpc-phz + steps: + pre: + - chain: ipi-aws-pre-shared-vpc-phz + - ref: optional-operators-subscribe + post: + - chain: ipi-aws-post-shared-vpc-phz + documentation: |- + Installs a cluster on AWS in a shared VPC with a preexisting private-hosted zone in a separate AWS account as well as an optional operator using the built index image that refers to build bundle images.