Skip to content

Commit 424a04a

Browse files
committed
Add shared vpc CI job for installer repo and informing periodics
* `==` vs `=~` the regex match allows the cluster_variant to be a mix like `compact,shared-vpc` * Azure vritual network (an other resources) need to be in the same location as the various cluster resources like virtual machines, load balancers etc. So, The job picks the right resources based on the regions picked. The resources were created using the work-in-progress UPI Azure docs with some modifications [4]. * AWS needs to picks set of subnets from 4 groups because of the limitation on the number of tags on the each resource [1] The max tags allowed per resource is 50, and since we need atleast one tag (kubernetes.io/cluster/<>: shared) on each subnet, and also internal-lb on some subnets, 25% load sharing on 4 sets allows ~200, but since these subnets were created by CloudFormation, there are already 3 tags on each subnet, so its definitely not 200. There is no regions switch on AWS currently, therefore there was no need to crate subnets per region, but whenever that happends we might have to add those. The resources where created using the AWS CF templates for creating VPC [3] ``` aws cloudformation create-stack --stack-policy-body --stack-name do-not-delete-shared-vpc-1 --template-body "$(cat upi/aws/cloudformation/01_vpc.yaml)" --parameters ParameterKey=AvailabilityZoneCount,ParameterValue=3 ``` * GCP has one set of network resources There is no regions switch on GCP currently, therefore there was no need to crate subnets per region, but whenever that happends we might have to add those. The resources where created using the GCP UPI template for creating a VPC [2] ``` gcloud --project openshift-gce-devel-ci deployment-manager deployments create do-no-delete-shared-vpc --config 01_vpc.yaml ``` [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-restrictions [2]: https://github.com/openshift/installer/blob/release-4.3/upi/gcp/01_vpc.py [3]: https://github.com/openshift/installer/blob/release-4.3/upi/aws/cloudformation/01_vpc.yaml [4]: https://github.com/glennswest/ocpupi4azure
1 parent 1810823 commit 424a04a

File tree

4 files changed

+572
-5
lines changed

4 files changed

+572
-5
lines changed

ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,77 @@ presubmits:
485485
secret:
486486
secretName: sentry-dsn
487487
trigger: (?m)^/test( | .* )e2e-aws-scaleup-rhel7,?($|\s.*)
488+
- agent: kubernetes
489+
always_run: false
490+
branches:
491+
- master
492+
context: ci/prow/e2e-aws-shared-vpc
493+
decorate: true
494+
decoration_config:
495+
skip_cloning: true
496+
labels:
497+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
498+
name: pull-ci-openshift-installer-master-e2e-aws-shared-vpc
499+
optional: true
500+
rerun_command: /test e2e-aws-shared-vpc
501+
spec:
502+
containers:
503+
- args:
504+
- --artifact-dir=$(ARTIFACTS)
505+
- --branch=master
506+
- --give-pr-author-access-to-namespace=true
507+
- --org=openshift
508+
- --repo=installer
509+
- --resolver-address=http://ci-operator-configresolver
510+
- --secret-dir=/usr/local/e2e-aws-shared-vpc-cluster-profile
511+
- --sentry-dsn-path=/etc/sentry-dsn/ci-operator
512+
- --target=e2e-aws-shared-vpc
513+
- --template=/usr/local/e2e-aws-shared-vpc
514+
command:
515+
- ci-operator
516+
env:
517+
- name: CLUSTER_TYPE
518+
value: aws
519+
- name: CLUSTER_VARIANT
520+
value: shared-vpc
521+
- name: CONFIG_SPEC
522+
valueFrom:
523+
configMapKeyRef:
524+
key: openshift-installer-master.yaml
525+
name: ci-operator-master-configs
526+
- name: JOB_NAME_SAFE
527+
value: e2e-aws-shared-vpc
528+
- name: TEST_COMMAND
529+
value: TEST_SUITE=openshift/conformance/parallel run-tests
530+
image: ci-operator:latest
531+
imagePullPolicy: Always
532+
name: ""
533+
resources:
534+
requests:
535+
cpu: 10m
536+
volumeMounts:
537+
- mountPath: /usr/local/e2e-aws-shared-vpc-cluster-profile
538+
name: cluster-profile
539+
- mountPath: /usr/local/e2e-aws-shared-vpc
540+
name: job-definition
541+
subPath: cluster-launch-installer-e2e.yaml
542+
- mountPath: /etc/sentry-dsn
543+
name: sentry-dsn
544+
readOnly: true
545+
serviceAccountName: ci-operator
546+
volumes:
547+
- name: cluster-profile
548+
projected:
549+
sources:
550+
- secret:
551+
name: cluster-secrets-aws
552+
- configMap:
553+
name: prow-job-cluster-launch-installer-e2e
554+
name: job-definition
555+
- name: sentry-dsn
556+
secret:
557+
secretName: sentry-dsn
558+
trigger: (?m)^/test( | .* )e2e-aws-shared-vpc,?($|\s.*)
488559
- agent: kubernetes
489560
always_run: true
490561
branches:
@@ -681,6 +752,77 @@ presubmits:
681752
secret:
682753
secretName: sentry-dsn
683754
trigger: (?m)^/test( | .* )e2e-azure,?($|\s.*)
755+
- agent: kubernetes
756+
always_run: false
757+
branches:
758+
- master
759+
context: ci/prow/e2e-azure-shared-vpc
760+
decorate: true
761+
decoration_config:
762+
skip_cloning: true
763+
labels:
764+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
765+
name: pull-ci-openshift-installer-master-e2e-azure-shared-vpc
766+
optional: true
767+
rerun_command: /test e2e-azure-shared-vpc
768+
spec:
769+
containers:
770+
- args:
771+
- --artifact-dir=$(ARTIFACTS)
772+
- --branch=master
773+
- --give-pr-author-access-to-namespace=true
774+
- --org=openshift
775+
- --repo=installer
776+
- --resolver-address=http://ci-operator-configresolver
777+
- --secret-dir=/usr/local/e2e-azure-shared-vpc-cluster-profile
778+
- --sentry-dsn-path=/etc/sentry-dsn/ci-operator
779+
- --target=e2e-azure-shared-vpc
780+
- --template=/usr/local/e2e-azure-shared-vpc
781+
command:
782+
- ci-operator
783+
env:
784+
- name: CLUSTER_TYPE
785+
value: azure4
786+
- name: CLUSTER_VARIANT
787+
value: shared-vpc
788+
- name: CONFIG_SPEC
789+
valueFrom:
790+
configMapKeyRef:
791+
key: openshift-installer-master.yaml
792+
name: ci-operator-master-configs
793+
- name: JOB_NAME_SAFE
794+
value: e2e-azure-shared-vpc
795+
- name: TEST_COMMAND
796+
value: TEST_SUITE=openshift/conformance/parallel run-tests
797+
image: ci-operator:latest
798+
imagePullPolicy: Always
799+
name: ""
800+
resources:
801+
requests:
802+
cpu: 10m
803+
volumeMounts:
804+
- mountPath: /usr/local/e2e-azure-shared-vpc-cluster-profile
805+
name: cluster-profile
806+
- mountPath: /usr/local/e2e-azure-shared-vpc
807+
name: job-definition
808+
subPath: cluster-launch-installer-e2e.yaml
809+
- mountPath: /etc/sentry-dsn
810+
name: sentry-dsn
811+
readOnly: true
812+
serviceAccountName: ci-operator
813+
volumes:
814+
- name: cluster-profile
815+
projected:
816+
sources:
817+
- secret:
818+
name: cluster-secrets-azure4
819+
- configMap:
820+
name: prow-job-cluster-launch-installer-e2e
821+
name: job-definition
822+
- name: sentry-dsn
823+
secret:
824+
secretName: sentry-dsn
825+
trigger: (?m)^/test( | .* )e2e-azure-shared-vpc,?($|\s.*)
684826
- agent: kubernetes
685827
always_run: false
686828
branches:
@@ -753,6 +895,79 @@ presubmits:
753895
secret:
754896
secretName: sentry-dsn
755897
trigger: (?m)^/test( | .* )e2e-gcp,?($|\s.*)
898+
- agent: kubernetes
899+
always_run: false
900+
branches:
901+
- master
902+
context: ci/prow/e2e-gcp-shared-vpc
903+
decorate: true
904+
decoration_config:
905+
skip_cloning: true
906+
labels:
907+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
908+
name: pull-ci-openshift-installer-master-e2e-gcp-shared-vpc
909+
optional: true
910+
rerun_command: /test e2e-gcp-shared-vpc
911+
spec:
912+
containers:
913+
- args:
914+
- --artifact-dir=$(ARTIFACTS)
915+
- --branch=master
916+
- --give-pr-author-access-to-namespace=true
917+
- --org=openshift
918+
- --repo=installer
919+
- --resolver-address=http://ci-operator-configresolver
920+
- --secret-dir=/usr/local/e2e-gcp-shared-vpc-cluster-profile
921+
- --sentry-dsn-path=/etc/sentry-dsn/ci-operator
922+
- --target=e2e-gcp-shared-vpc
923+
- --template=/usr/local/e2e-gcp-shared-vpc
924+
command:
925+
- ci-operator
926+
env:
927+
- name: CLUSTER_TYPE
928+
value: gcp
929+
- name: CLUSTER_VARIANT
930+
value: shared-vpc
931+
- name: CONFIG_SPEC
932+
valueFrom:
933+
configMapKeyRef:
934+
key: openshift-installer-master.yaml
935+
name: ci-operator-master-configs
936+
- name: JOB_NAME_SAFE
937+
value: e2e-gcp-shared-vpc
938+
- name: TEST_COMMAND
939+
value: TEST_SUITE=openshift/conformance/parallel run-tests
940+
image: ci-operator:latest
941+
imagePullPolicy: Always
942+
name: ""
943+
resources:
944+
requests:
945+
cpu: 10m
946+
volumeMounts:
947+
- mountPath: /usr/local/e2e-gcp-shared-vpc-cluster-profile
948+
name: cluster-profile
949+
- mountPath: /usr/local/e2e-gcp-shared-vpc
950+
name: job-definition
951+
subPath: cluster-launch-installer-e2e.yaml
952+
- mountPath: /etc/sentry-dsn
953+
name: sentry-dsn
954+
readOnly: true
955+
serviceAccountName: ci-operator
956+
volumes:
957+
- name: cluster-profile
958+
projected:
959+
sources:
960+
- secret:
961+
name: cluster-secrets-gcp
962+
- configMap:
963+
name: cluster-profile-gcp
964+
- configMap:
965+
name: prow-job-cluster-launch-installer-e2e
966+
name: job-definition
967+
- name: sentry-dsn
968+
secret:
969+
secretName: sentry-dsn
970+
trigger: (?m)^/test( | .* )e2e-gcp-shared-vpc,?($|\s.*)
756971
- agent: kubernetes
757972
always_run: false
758973
branches:

0 commit comments

Comments
 (0)