From f2d449cfc35f2afee9457ee3129d8ed5e6cf3827 Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Thu, 17 Oct 2024 19:26:18 +0200 Subject: [PATCH] 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