Skip to content

Commit 2082599

Browse files
authored
Merge pull request #3382 from Ankitasw/e2e-with-resourceref-filters
[E2E] Added tests for using filters in AWSResourceReference type fields
2 parents 60ec2bf + 70748cd commit 2082599

File tree

8 files changed

+37
-2
lines changed

8 files changed

+37
-2
lines changed

test/e2e/data/eks/cluster-template-eks-control-plane-only-withaddon.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ spec:
3434
identityRef:
3535
kind: AWSClusterStaticIdentity
3636
name: e2e-account
37+
# secondaryCidrBlock added to test it's creation and deletion functionality within the cluster.
3738
secondaryCidrBlock: 100.64.0.0/16

test/e2e/data/infrastructure-aws/kustomize_sources/external-securitygroups/kustomization.yaml

Whitespace-only changes.

test/e2e/data/infrastructure-aws/kustomize_sources/nested-multitenancy/kustomization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ resources:
33
- role.yaml
44
patchesStrategicMerge:
55
- patches/role-identity.yaml
6+
# This manifest is added to test bastion host creation.
67
- patches/bastion-enabled.yaml
8+
# This manifest is added to test subnet with filters in AWSMachineTemplate.
9+
- patches/subnet-with-filters.yaml

test/e2e/data/infrastructure-aws/kustomize_sources/nested-multitenancy/patches/bastion-enabled.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
32
kind: AWSCluster
43
metadata:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
kind: AWSMachineTemplate
2+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
3+
metadata:
4+
name: "${CLUSTER_NAME}-md-0"
5+
spec:
6+
template:
7+
spec:
8+
subnet:
9+
filters:
10+
- name: "availabilityZone"
11+
values:
12+
- "us-west-2a"
13+
- name: "tag-key"
14+
values:
15+
- "kubernetes.io/role/internal-elb"

test/e2e/data/infrastructure-aws/kustomize_sources/peered-remote/kustomization.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ patchesStrategicMerge:
44
- patches/management.yaml
55
- patches/az-select.yaml
66
- patches/external-securitygroups.yaml
7-
7+
# This manifest is added to test additionalSecurityGroups with filters in AWSMachineTemplate.
8+
- patches/additional-security-group.yaml
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
kind: AWSMachineTemplate
2+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
3+
metadata:
4+
name: "${CLUSTER_NAME}-control-plane"
5+
spec:
6+
template:
7+
spec:
8+
additionalSecurityGroups:
9+
- filters:
10+
- name: "vpc-id"
11+
values:
12+
- "${MGMT_VPC_ID}"
13+
- name: "group-name"
14+
values:
15+
- "${MGMT_CLUSTER_NAME}-all"

test/e2e/suites/unmanaged/unmanaged_functional_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
695695
specName := "functional-test-extinfra"
696696
mgmtClusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
697697
mgmtClusterInfra := new(shared.AWSInfrastructure)
698+
shared.SetEnvVar("MGMT_CLUSTER_NAME", mgmtClusterName, false)
698699

699700
wlClusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
700701
wlClusterInfra := new(shared.AWSInfrastructure)

0 commit comments

Comments
 (0)