Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates kubernetes-aws templates to use pulumi-eks v3 #847

Merged
merged 6 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kubernetes-aws-csharp/${PROJECT}.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.Aws" Version="6.*" />
<PackageReference Include="Pulumi.Awsx" Version="2.*" />
<PackageReference Include="Pulumi.Eks" Version="2.*" />
<PackageReference Include="Pulumi.Eks" Version="3.*" />
</ItemGroup>

</Project>
3 changes: 3 additions & 0 deletions kubernetes-aws-csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
2 changes: 1 addition & 1 deletion kubernetes-aws-go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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-eks/sdk/v3 v3.0.0
github.com/pulumi/pulumi/sdk/v3 v3.91.1
)
5 changes: 4 additions & 1 deletion kubernetes-aws-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions kubernetes-aws-python/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-aws-python/requirements.txt
Original file line number Diff line number Diff line change
@@ -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,<4.0.0
2 changes: 2 additions & 0 deletions kubernetes-aws-typescript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-aws-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@pulumi/awsx": "^2.0.2",
"@pulumi/eks": "^v2.0.0",
"@pulumi/eks": "^3.0.0",
"@pulumi/pulumi": "^3.113.0"
}
}
2 changes: 2 additions & 0 deletions kubernetes-aws-yaml/Pulumi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading