From f2d449cfc35f2afee9457ee3129d8ed5e6cf3827 Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Thu, 17 Oct 2024 19:26:18 +0200 Subject: [PATCH 1/6] Test updating templates to pulumi-eks v3.0.0-beta.2 --- kubernetes-aws-csharp/${PROJECT}.csproj | 2 +- kubernetes-aws-csharp/Program.cs | 3 +++ kubernetes-aws-go/go.mod | 4 ++-- kubernetes-aws-go/main.go | 3 +++ kubernetes-aws-python/__main__.py | 2 ++ kubernetes-aws-python/requirements.txt | 2 +- kubernetes-aws-typescript/index.ts | 2 ++ kubernetes-aws-typescript/package.json | 2 +- kubernetes-aws-yaml/Pulumi.yaml | 2 ++ 9 files changed, 17 insertions(+), 5 deletions(-) diff --git a/kubernetes-aws-csharp/${PROJECT}.csproj b/kubernetes-aws-csharp/${PROJECT}.csproj index 2c13ff1b5..708c98b6a 100644 --- a/kubernetes-aws-csharp/${PROJECT}.csproj +++ b/kubernetes-aws-csharp/${PROJECT}.csproj @@ -10,7 +10,7 @@ - + diff --git a/kubernetes-aws-csharp/Program.cs b/kubernetes-aws-csharp/Program.cs index 274eaf121..e5780e2fe 100644 --- a/kubernetes-aws-csharp/Program.cs +++ b/kubernetes-aws-csharp/Program.cs @@ -26,6 +26,9 @@ // Put the cluster in the new VPC created earlier VpcId = eksVpc.VpcId, + // Use the "API" authentication mode to support access entries + AuthenticationMode = Eks.AuthenticationMode.Api, + // Public subnets will be used for load balancers PublicSubnetIds = eksVpc.PublicSubnetIds, diff --git a/kubernetes-aws-go/go.mod b/kubernetes-aws-go/go.mod index 93b3998cf..be58666f3 100644 --- a/kubernetes-aws-go/go.mod +++ b/kubernetes-aws-go/go.mod @@ -4,6 +4,6 @@ go 1.20 require ( github.com/pulumi/pulumi-awsx/sdk/v2 v2.1.1 - github.com/pulumi/pulumi-eks/sdk/v2 v2.0.0 - github.com/pulumi/pulumi/sdk/v3 v3.91.1 + github.com/pulumi/pulumi-eks/sdk/v2 v2.8.1 + github.com/pulumi/pulumi/sdk/v3 v3.112.0 ) diff --git a/kubernetes-aws-go/main.go b/kubernetes-aws-go/main.go index f9ee32488..68ba69940 100644 --- a/kubernetes-aws-go/main.go +++ b/kubernetes-aws-go/main.go @@ -41,10 +41,13 @@ func main() { return err } + apiAuthMode := eks.AuthenticationModeApi // Create a new EKS cluster eksCluster, err := eks.NewCluster(ctx, "eks-cluster", &eks.ClusterArgs{ // Put the cluster in the new VPC created earlier VpcId: eksVpc.VpcId, + // Use the "API" authentication mode to support access entries + AuthenticationMode: &apiAuthMode, // Public subnets will be used for load balancers PublicSubnetIds: eksVpc.PublicSubnetIds, // Private subnets will be used for cluster nodes diff --git a/kubernetes-aws-python/__main__.py b/kubernetes-aws-python/__main__.py index 6a17f96ee..5489cc313 100644 --- a/kubernetes-aws-python/__main__.py +++ b/kubernetes-aws-python/__main__.py @@ -19,6 +19,8 @@ eks_cluster = eks.Cluster("eks-cluster", # Put the cluster in the new VPC created earlier vpc_id=eks_vpc.vpc_id, + # Use the "API" authentication mode to support access entries + authentication_mode=eks.AuthenticationMode.API, # Public subnets will be used for load balancers public_subnet_ids=eks_vpc.public_subnet_ids, # Private subnets will be used for cluster nodes diff --git a/kubernetes-aws-python/requirements.txt b/kubernetes-aws-python/requirements.txt index e2cdbc80e..810f3e705 100644 --- a/kubernetes-aws-python/requirements.txt +++ b/kubernetes-aws-python/requirements.txt @@ -1,3 +1,3 @@ pulumi>=3.0.0,<4.0.0 pulumi-awsx>=2.0.0,<3.0.0 -pulumi-eks>=2.0.0,<3.0.0 +pulumi-eks==3.0.0-beta.2 \ No newline at end of file diff --git a/kubernetes-aws-typescript/index.ts b/kubernetes-aws-typescript/index.ts index eda3ab5a9..1d9d7cd74 100644 --- a/kubernetes-aws-typescript/index.ts +++ b/kubernetes-aws-typescript/index.ts @@ -20,6 +20,8 @@ const eksVpc = new awsx.ec2.Vpc("eks-vpc", { const eksCluster = new eks.Cluster("eks-cluster", { // Put the cluster in the new VPC created earlier vpcId: eksVpc.vpcId, + // Use the "API" authentication mode to support access entries + authenticationMode: eks.AuthenticationMode.Api, // Public subnets will be used for load balancers publicSubnetIds: eksVpc.publicSubnetIds, // Private subnets will be used for cluster nodes diff --git a/kubernetes-aws-typescript/package.json b/kubernetes-aws-typescript/package.json index cf4913fc1..ded81e7e0 100644 --- a/kubernetes-aws-typescript/package.json +++ b/kubernetes-aws-typescript/package.json @@ -6,7 +6,7 @@ }, "dependencies": { "@pulumi/awsx": "^2.0.2", - "@pulumi/eks": "^v2.0.0", + "@pulumi/eks": "^v3.0.0-beta.2", "@pulumi/pulumi": "^3.113.0" } } diff --git a/kubernetes-aws-yaml/Pulumi.yaml b/kubernetes-aws-yaml/Pulumi.yaml index f55146a84..d31460d3b 100644 --- a/kubernetes-aws-yaml/Pulumi.yaml +++ b/kubernetes-aws-yaml/Pulumi.yaml @@ -51,6 +51,8 @@ resources: properties: # Put the cluster in the new VPC created earlier vpcId: ${eks-vpc.vpcId} + # Use the "API" authentication mode to support access entries + authenticationMode: API # Public subnets will be used for load balancers publicSubnetIds: ${eks-vpc.publicSubnetIds} # Private subnets will be used for cluster nodes From b2a9b5e13cb046e5484f8a16a7e2b84673f4c167 Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Tue, 22 Oct 2024 15:07:06 -0700 Subject: [PATCH 2/6] Update to release version --- kubernetes-aws-go/go.mod | 4 ++-- kubernetes-aws-go/main.go | 2 +- kubernetes-aws-python/requirements.txt | 2 +- kubernetes-aws-typescript/package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kubernetes-aws-go/go.mod b/kubernetes-aws-go/go.mod index be58666f3..16599da66 100644 --- a/kubernetes-aws-go/go.mod +++ b/kubernetes-aws-go/go.mod @@ -4,6 +4,6 @@ go 1.20 require ( github.com/pulumi/pulumi-awsx/sdk/v2 v2.1.1 - github.com/pulumi/pulumi-eks/sdk/v2 v2.8.1 - github.com/pulumi/pulumi/sdk/v3 v3.112.0 + github.com/pulumi/pulumi-eks/sdk/v3 v3.0.0 + github.com/pulumi/pulumi/sdk/v3 v3.91.1 ) diff --git a/kubernetes-aws-go/main.go b/kubernetes-aws-go/main.go index 68ba69940..8d5389e10 100644 --- a/kubernetes-aws-go/main.go +++ b/kubernetes-aws-go/main.go @@ -2,7 +2,7 @@ package main import ( "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ec2" - "github.com/pulumi/pulumi-eks/sdk/v2/go/eks" + "github.com/pulumi/pulumi-eks/sdk/v3/go/eks" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) diff --git a/kubernetes-aws-python/requirements.txt b/kubernetes-aws-python/requirements.txt index 810f3e705..28e89a681 100644 --- a/kubernetes-aws-python/requirements.txt +++ b/kubernetes-aws-python/requirements.txt @@ -1,3 +1,3 @@ pulumi>=3.0.0,<4.0.0 pulumi-awsx>=2.0.0,<3.0.0 -pulumi-eks==3.0.0-beta.2 \ No newline at end of file +pulumi-eks>=3.0.0,<4.0.0 \ No newline at end of file diff --git a/kubernetes-aws-typescript/package.json b/kubernetes-aws-typescript/package.json index ded81e7e0..e4f7ea83c 100644 --- a/kubernetes-aws-typescript/package.json +++ b/kubernetes-aws-typescript/package.json @@ -6,7 +6,7 @@ }, "dependencies": { "@pulumi/awsx": "^2.0.2", - "@pulumi/eks": "^v3.0.0-beta.2", + "@pulumi/eks": "^3.0.0", "@pulumi/pulumi": "^3.113.0" } } From 483196a40301812e1faf37af6fb35aeda2267a18 Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Wed, 23 Oct 2024 13:16:44 -0700 Subject: [PATCH 3/6] Enable kubernetes-aws tests --- tests/internal/testutils/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/internal/testutils/config.go b/tests/internal/testutils/config.go index f7c859849..f103e3414 100644 --- a/tests/internal/testutils/config.go +++ b/tests/internal/testutils/config.go @@ -95,7 +95,7 @@ func (cfg TemplateTestConfig) IsSkipped(info TemplateInfo) bool { } func (cfg TemplateTestConfig) PossiblySkip(t *testing.T, info TemplateInfo) { - if cfg.IsSkipped(info) { + if cfg.IsSkipped(info) && !strings.Contains(info.Template.Name, "kubernetes-aws") { t.Skip(fmt.Sprintf("Skipping per %s", cfg.SkipEnvVar)) } } From b9da62694d83b8c8de1b7c225eb1885afe45a32c Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Thu, 24 Oct 2024 10:53:28 -0700 Subject: [PATCH 4/6] Really run the kubernetes tests... --- kubernetes-aws-csharp/Pulumi.yaml | 1 + kubernetes-aws-go/Pulumi.yaml | 1 + kubernetes-aws-python/Pulumi.yaml | 1 + kubernetes-aws-typescript/Pulumi.yaml | 1 + kubernetes-aws-yaml/Pulumi.yaml | 1 + 5 files changed, 5 insertions(+) diff --git a/kubernetes-aws-csharp/Pulumi.yaml b/kubernetes-aws-csharp/Pulumi.yaml index 0b8a50703..d1f6e3ef8 100644 --- a/kubernetes-aws-csharp/Pulumi.yaml +++ b/kubernetes-aws-csharp/Pulumi.yaml @@ -3,6 +3,7 @@ description: ${DESCRIPTION} runtime: dotnet template: description: A C# program to deploy a Kubernetes cluster on AWS + important: true config: aws:region: description: The AWS region to deploy into diff --git a/kubernetes-aws-go/Pulumi.yaml b/kubernetes-aws-go/Pulumi.yaml index 96389be50..9b4ab5051 100644 --- a/kubernetes-aws-go/Pulumi.yaml +++ b/kubernetes-aws-go/Pulumi.yaml @@ -3,6 +3,7 @@ description: ${DESCRIPTION} runtime: go template: description: A Go program to deploy a Kubernetes cluster on AWS + important: true config: aws:region: description: The AWS region to deploy into diff --git a/kubernetes-aws-python/Pulumi.yaml b/kubernetes-aws-python/Pulumi.yaml index 590eb3c58..270b5cf8a 100644 --- a/kubernetes-aws-python/Pulumi.yaml +++ b/kubernetes-aws-python/Pulumi.yaml @@ -3,6 +3,7 @@ description: ${DESCRIPTION} runtime: python template: description: A Python program to deploy a Kubernetes cluster on AWS + important: true config: aws:region: description: The AWS region to deploy into diff --git a/kubernetes-aws-typescript/Pulumi.yaml b/kubernetes-aws-typescript/Pulumi.yaml index c791c11da..e57cfb0cf 100644 --- a/kubernetes-aws-typescript/Pulumi.yaml +++ b/kubernetes-aws-typescript/Pulumi.yaml @@ -3,6 +3,7 @@ description: ${DESCRIPTION} runtime: nodejs template: description: A TypeScript program to deploy a Kubernetes cluster on AWS + important: true config: aws:region: description: The AWS region to deploy into diff --git a/kubernetes-aws-yaml/Pulumi.yaml b/kubernetes-aws-yaml/Pulumi.yaml index d31460d3b..06be659a9 100644 --- a/kubernetes-aws-yaml/Pulumi.yaml +++ b/kubernetes-aws-yaml/Pulumi.yaml @@ -3,6 +3,7 @@ description: ${DESCRIPTION} runtime: yaml template: description: A Pulumi YAML program to deploy a Kubernetes cluster on AWS + important: true config: aws:region: description: The AWS region to deploy into From c191554a3688f815638d3de075e9090bcb636ec0 Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Fri, 25 Oct 2024 10:20:00 -0700 Subject: [PATCH 5/6] Revert "Really run the kubernetes tests..." This reverts commit b9da62694d83b8c8de1b7c225eb1885afe45a32c. --- kubernetes-aws-csharp/Pulumi.yaml | 1 - kubernetes-aws-go/Pulumi.yaml | 1 - kubernetes-aws-python/Pulumi.yaml | 1 - kubernetes-aws-typescript/Pulumi.yaml | 1 - kubernetes-aws-yaml/Pulumi.yaml | 1 - 5 files changed, 5 deletions(-) diff --git a/kubernetes-aws-csharp/Pulumi.yaml b/kubernetes-aws-csharp/Pulumi.yaml index d1f6e3ef8..0b8a50703 100644 --- a/kubernetes-aws-csharp/Pulumi.yaml +++ b/kubernetes-aws-csharp/Pulumi.yaml @@ -3,7 +3,6 @@ description: ${DESCRIPTION} runtime: dotnet template: description: A C# program to deploy a Kubernetes cluster on AWS - important: true config: aws:region: description: The AWS region to deploy into diff --git a/kubernetes-aws-go/Pulumi.yaml b/kubernetes-aws-go/Pulumi.yaml index 9b4ab5051..96389be50 100644 --- a/kubernetes-aws-go/Pulumi.yaml +++ b/kubernetes-aws-go/Pulumi.yaml @@ -3,7 +3,6 @@ description: ${DESCRIPTION} runtime: go template: description: A Go program to deploy a Kubernetes cluster on AWS - important: true config: aws:region: description: The AWS region to deploy into diff --git a/kubernetes-aws-python/Pulumi.yaml b/kubernetes-aws-python/Pulumi.yaml index 270b5cf8a..590eb3c58 100644 --- a/kubernetes-aws-python/Pulumi.yaml +++ b/kubernetes-aws-python/Pulumi.yaml @@ -3,7 +3,6 @@ description: ${DESCRIPTION} runtime: python template: description: A Python program to deploy a Kubernetes cluster on AWS - important: true config: aws:region: description: The AWS region to deploy into diff --git a/kubernetes-aws-typescript/Pulumi.yaml b/kubernetes-aws-typescript/Pulumi.yaml index e57cfb0cf..c791c11da 100644 --- a/kubernetes-aws-typescript/Pulumi.yaml +++ b/kubernetes-aws-typescript/Pulumi.yaml @@ -3,7 +3,6 @@ description: ${DESCRIPTION} runtime: nodejs template: description: A TypeScript program to deploy a Kubernetes cluster on AWS - important: true config: aws:region: description: The AWS region to deploy into diff --git a/kubernetes-aws-yaml/Pulumi.yaml b/kubernetes-aws-yaml/Pulumi.yaml index 06be659a9..d31460d3b 100644 --- a/kubernetes-aws-yaml/Pulumi.yaml +++ b/kubernetes-aws-yaml/Pulumi.yaml @@ -3,7 +3,6 @@ description: ${DESCRIPTION} runtime: yaml template: description: A Pulumi YAML program to deploy a Kubernetes cluster on AWS - important: true config: aws:region: description: The AWS region to deploy into From eadeabb3538fc1391cd746dbac6a18986147c798 Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Fri, 25 Oct 2024 10:20:04 -0700 Subject: [PATCH 6/6] Revert "Enable kubernetes-aws tests" This reverts commit 483196a40301812e1faf37af6fb35aeda2267a18. --- kubernetes-aws-python/requirements.txt | 2 +- tests/internal/testutils/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes-aws-python/requirements.txt b/kubernetes-aws-python/requirements.txt index 28e89a681..eef7d3b54 100644 --- a/kubernetes-aws-python/requirements.txt +++ b/kubernetes-aws-python/requirements.txt @@ -1,3 +1,3 @@ pulumi>=3.0.0,<4.0.0 pulumi-awsx>=2.0.0,<3.0.0 -pulumi-eks>=3.0.0,<4.0.0 \ No newline at end of file +pulumi-eks>=3.0.0,<4.0.0 diff --git a/tests/internal/testutils/config.go b/tests/internal/testutils/config.go index f103e3414..f7c859849 100644 --- a/tests/internal/testutils/config.go +++ b/tests/internal/testutils/config.go @@ -95,7 +95,7 @@ func (cfg TemplateTestConfig) IsSkipped(info TemplateInfo) bool { } func (cfg TemplateTestConfig) PossiblySkip(t *testing.T, info TemplateInfo) { - if cfg.IsSkipped(info) && !strings.Contains(info.Template.Name, "kubernetes-aws") { + if cfg.IsSkipped(info) { t.Skip(fmt.Sprintf("Skipping per %s", cfg.SkipEnvVar)) } }