From 7b707e3e796a024111f3fd4a5c75c1897e72ad85 Mon Sep 17 00:00:00 2001 From: Zijun Wang Date: Thu, 16 Nov 2023 13:22:08 -0800 Subject: [PATCH 1/2] - pass defaultServiceNetwork env variable - fix e2e test issue --- docs/deploy.md | 3 +++ helm/templates/configmap.yaml | 1 + helm/templates/deployment.yaml | 5 +++++ helm/values.yaml | 1 + test/suites/integration/suite_test.go | 4 ++-- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index 01760930..eed3b84f 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -94,8 +94,11 @@ Run through them again for a second cluster to use with the extended example sho --set=clusterVpcId= \ --set=clusterName= \ --set=awsAccountId= \ + # You need to pass defaultServiceNetwork if you want the default service network feature, you could check environment.md for more its details + --set=defaultServiceNetwork= \ # latticeEndpoint is required for the case where the VPC Lattice endpoint is being overridden --set=latticeEndpoint= \ + ``` 9. Create the `amazon-vpc-lattice` GatewayClass: diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 70a70a8e..38e499c7 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -8,4 +8,5 @@ data: clusterVpcId: {{ .Values.clusterVpcId | quote }} clusterName: {{ .Values.clusterName | quote }} latticeEndpoint: {{ .Values.latticeEndpoint | quote }} + defaultServiceNetwork: {{ .Values.defaultServiceNetwork | quote }} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 902ce24b..4850a8db 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -92,6 +92,11 @@ spec: configMapKeyRef: name: env-config key: latticeEndpoint + - name: DEFAULT_SERVICE_NETWORK + valueFrom: + configMapKeyRef: + name: env-config + key: defaultServiceNetwork terminationGracePeriodSeconds: 10 nodeSelector: {{ toYaml .Values.deployment.nodeSelector | nindent 8 }} diff --git a/helm/values.yaml b/helm/values.yaml index 62006dc5..5b949b16 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -75,4 +75,5 @@ awsRegion: awsAccountId: clusterVpcId: clusterName: +defaultServiceNetwork: latticeEndpoint: diff --git a/test/suites/integration/suite_test.go b/test/suites/integration/suite_test.go index 752c08dd..ddbcf660 100644 --- a/test/suites/integration/suite_test.go +++ b/test/suites/integration/suite_test.go @@ -49,9 +49,9 @@ var _ = SynchronizedBeforeSuite(func() { testFramework.Log.Infof("Expecting VPC %s and service network %s association", vpcId, *testServiceNetwork.Id) Eventually(func(g Gomega) { - associated, _, _ := testFramework.IsVpcAssociatedWithServiceNetwork(ctx, vpcId, testServiceNetwork) + associated, snva, _ := testFramework.IsVpcAssociatedWithServiceNetwork(ctx, vpcId, testServiceNetwork) g.Expect(associated).To(BeTrue()) - managed, _ := testFramework.Cloud.IsArnManaged(ctx, *testServiceNetwork.Arn) + managed, _ := testFramework.Cloud.IsArnManaged(ctx, *snva.Arn) g.Expect(managed).To(BeTrue()) }).Should(Succeed()) From b57c6b630b363cdc7984e5aa78b5a5873be19850 Mon Sep 17 00:00:00 2001 From: Zijun Wang Date: Thu, 16 Nov 2023 13:27:48 -0800 Subject: [PATCH 2/2] pass defaultServiceNetwork env variable --- docs/deploy.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index eed3b84f..75d93f6f 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -94,8 +94,7 @@ Run through them again for a second cluster to use with the extended example sho --set=clusterVpcId= \ --set=clusterName= \ --set=awsAccountId= \ - # You need to pass defaultServiceNetwork if you want the default service network feature, you could check environment.md for more its details - --set=defaultServiceNetwork= \ + --set=defaultServiceNetwork= \ # check environment.md for more its details # latticeEndpoint is required for the case where the VPC Lattice endpoint is being overridden --set=latticeEndpoint= \