From 3aa448ac37b333ac85f38dcea14ef593c6179998 Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Mon, 9 Dec 2024 16:50:04 +0100 Subject: [PATCH] Update defaults for addons --- nodejs/eks/cluster.ts | 25 +++++++++++++------ provider/cmd/pulumi-gen-eks/main.go | 9 ++++--- provider/cmd/pulumi-resource-eks/schema.json | 7 +++--- sdk/dotnet/Cluster.cs | 1 + sdk/dotnet/Inputs/AutoModeOptionsArgs.cs | 1 + .../Inputs/KubeProxyAddonOptionsArgs.cs | 3 +-- sdk/go/eks/cluster.go | 2 ++ sdk/go/eks/pulumiTypes.go | 20 ++++++--------- .../main/java/com/pulumi/eks/ClusterArgs.java | 3 +++ .../eks/inputs/AutoModeOptionsArgs.java | 3 +++ .../eks/inputs/KubeProxyAddonOptionsArgs.java | 7 +++--- sdk/nodejs/cluster.ts | 1 + sdk/nodejs/types/input.ts | 4 +-- sdk/python/pulumi_eks/_inputs.py | 11 ++++---- sdk/python/pulumi_eks/cluster.py | 3 +++ 15 files changed, 59 insertions(+), 41 deletions(-) diff --git a/nodejs/eks/cluster.ts b/nodejs/eks/cluster.ts index 76f19076c..862b2ff83 100644 --- a/nodejs/eks/cluster.ts +++ b/nodejs/eks/cluster.ts @@ -544,7 +544,8 @@ export function createCore( ); } - const skipDefaultSecurityGroups = args.skipDefaultSecurityGroups || args.autoMode?.enabled; + // Do not create the default security group if the user makes an explicit decision or if EKS Auto Mode is enabled. + const skipDefaultSecurityGroups = args.skipDefaultSecurityGroups ?? args.autoMode?.enabled; // Create the EKS cluster security group let eksClusterSecurityGroup: aws.ec2.SecurityGroup | undefined; @@ -733,7 +734,8 @@ export function createCore( }, ); - if (args.kubeProxyAddonOptions?.enabled ?? true) { + const kubeProxyAddonEnabled = args.kubeProxyAddonOptions?.enabled ?? !args.autoMode?.enabled; + if (kubeProxyAddonEnabled) { const kubeProxyVersion: pulumi.Output = args.kubeProxyAddonOptions?.version ? pulumi.output(args.kubeProxyAddonOptions?.version) : aws.eks @@ -890,7 +892,9 @@ export function createCore( { parent: parent }, ); - const skipDefaultNodeGroup = args.skipDefaultNodeGroup || args.fargate || args.autoMode?.enabled; + // create the default node group unless the user opts out of it or if Fargate/EKS Auto Mode is enabled + const skipDefaultNodeGroup = + args.skipDefaultNodeGroup || args.fargate || args.autoMode?.enabled; let instanceRoles: pulumi.Output; let defaultInstanceRole: pulumi.Output | undefined; @@ -1053,10 +1057,13 @@ export function createCore( } } + // Create the VPC CNI addon if the user has not explicitly disabled it. The VPC CNI addon is enabled by default + // unless EKS Auto Mode is enabled. + const vpcCniAddonEnabled = + args.useDefaultVpcCni !== undefined ? !args.useDefaultVpcCni : !args.autoMode?.enabled; // Create the VPC CNI addon - const vpcCni = args.useDefaultVpcCni - ? undefined - : new VpcCniAddon( + const vpcCni = vpcCniAddonEnabled + ? new VpcCniAddon( `${name}-vpc-cni`, { ...args.vpcCniOptions, @@ -1072,7 +1079,8 @@ export function createCore( kubernetes: k8sProvider, }, }, - ); + ) + : undefined; const fargateProfile: pulumi.Output = pulumi .output(args.fargate) @@ -2198,7 +2206,8 @@ export function createCluster( let nodeSecurityGroup: aws.ec2.SecurityGroup | undefined; let eksClusterIngressRule: aws.ec2.SecurityGroupRule | undefined; - if (!args.skipDefaultSecurityGroups) { + const skipDefaultSecurityGroups = args.skipDefaultSecurityGroups ?? args.autoMode?.enabled ?? false; + if (skipDefaultSecurityGroups) { if (!core.clusterSecurityGroup) { throw new pulumi.ResourceError( "clusterSecurityGroup is required when creating the default node group.", diff --git a/provider/cmd/pulumi-gen-eks/main.go b/provider/cmd/pulumi-gen-eks/main.go index ed76b4825..8e394d28c 100644 --- a/provider/cmd/pulumi-gen-eks/main.go +++ b/provider/cmd/pulumi-gen-eks/main.go @@ -418,7 +418,8 @@ func generateSchema(version semver.Version, outdir string) schema.PackageSpec { Type: "boolean", Plain: true, }, - Description: "Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`.", + Description: "Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`.\n" + + "Defaults to true, unless `autoMode` is enabled.", }, "instanceType": { TypeSpec: schema.TypeSpec{Type: "string"}, // TODO: aws.ec2.InstanceType is a string enum. @@ -1430,7 +1431,8 @@ func generateSchema(version semver.Version, outdir string) schema.PackageSpec { Type: "boolean", Plain: true, }, - Description: "Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you.", + Description: "Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you.\n" + + "When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities.", }, "createNodeRole": { TypeSpec: schema.TypeSpec{ @@ -2107,8 +2109,7 @@ func generateSchema(version semver.Version, outdir string) schema.PackageSpec { Properties: map[string]schema.PropertySpec{ "enabled": { TypeSpec: schema.TypeSpec{Type: "boolean", Plain: true}, - Default: true, - Description: "Whether or not to create the `kube-proxy` Addon in the cluster", + Description: "Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled.", }, "version": { TypeSpec: schema.TypeSpec{Type: "string"}, diff --git a/provider/cmd/pulumi-resource-eks/schema.json b/provider/cmd/pulumi-resource-eks/schema.json index 1b18a77c7..16a7f161d 100644 --- a/provider/cmd/pulumi-resource-eks/schema.json +++ b/provider/cmd/pulumi-resource-eks/schema.json @@ -245,7 +245,7 @@ "enabled": { "type": "boolean", "plain": true, - "description": "Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you." + "description": "Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you.\nWhen enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities." } }, "type": "object", @@ -700,8 +700,7 @@ "enabled": { "type": "boolean", "plain": true, - "description": "Whether or not to create the `kube-proxy` Addon in the cluster", - "default": true + "description": "Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled." }, "resolveConflictsOnCreate": { "type": "string", @@ -1530,7 +1529,7 @@ "useDefaultVpcCni": { "type": "boolean", "plain": true, - "description": "Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`." + "description": "Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`.\nDefaults to true, unless `autoMode` is enabled." }, "userMappings": { "type": "array", diff --git a/sdk/dotnet/Cluster.cs b/sdk/dotnet/Cluster.cs index e1d13f866..ded9917f4 100644 --- a/sdk/dotnet/Cluster.cs +++ b/sdk/dotnet/Cluster.cs @@ -720,6 +720,7 @@ public InputMap Tags /// /// Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + /// Defaults to true, unless `autoMode` is enabled. /// [Input("useDefaultVpcCni")] public bool? UseDefaultVpcCni { get; set; } diff --git a/sdk/dotnet/Inputs/AutoModeOptionsArgs.cs b/sdk/dotnet/Inputs/AutoModeOptionsArgs.cs index da034d6f7..c5dbf97de 100644 --- a/sdk/dotnet/Inputs/AutoModeOptionsArgs.cs +++ b/sdk/dotnet/Inputs/AutoModeOptionsArgs.cs @@ -31,6 +31,7 @@ public sealed class AutoModeOptionsArgs : global::Pulumi.ResourceArgs /// /// Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + /// When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. /// [Input("enabled", required: true)] public bool Enabled { get; set; } diff --git a/sdk/dotnet/Inputs/KubeProxyAddonOptionsArgs.cs b/sdk/dotnet/Inputs/KubeProxyAddonOptionsArgs.cs index 69ee46bc4..e009b9a51 100644 --- a/sdk/dotnet/Inputs/KubeProxyAddonOptionsArgs.cs +++ b/sdk/dotnet/Inputs/KubeProxyAddonOptionsArgs.cs @@ -25,7 +25,7 @@ public InputMap ConfigurationValues } /// - /// Whether or not to create the `kube-proxy` Addon in the cluster + /// Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. /// [Input("enabled")] public bool? Enabled { get; set; } @@ -50,7 +50,6 @@ public InputMap ConfigurationValues public KubeProxyAddonOptionsArgs() { - Enabled = true; ResolveConflictsOnCreate = Pulumi.Eks.ResolveConflictsOnCreate.Overwrite; ResolveConflictsOnUpdate = Pulumi.Eks.ResolveConflictsOnUpdate.Overwrite; } diff --git a/sdk/go/eks/cluster.go b/sdk/go/eks/cluster.go index b7b7e2633..bb4dd973a 100644 --- a/sdk/go/eks/cluster.go +++ b/sdk/go/eks/cluster.go @@ -354,6 +354,7 @@ type clusterArgs struct { // Key-value mapping of tags that are automatically applied to all AWS resources directly under management with this cluster, which support tagging. Tags map[string]string `pulumi:"tags"` // Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + // Defaults to true, unless `autoMode` is enabled. UseDefaultVpcCni *bool `pulumi:"useDefaultVpcCni"` // Optional mappings from AWS IAM users to Kubernetes users and groups. Only supported with authentication mode `CONFIG_MAP` or `API_AND_CONFIG_MAP`. UserMappings []UserMapping `pulumi:"userMappings"` @@ -598,6 +599,7 @@ type ClusterArgs struct { // Key-value mapping of tags that are automatically applied to all AWS resources directly under management with this cluster, which support tagging. Tags pulumi.StringMapInput // Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + // Defaults to true, unless `autoMode` is enabled. UseDefaultVpcCni *bool // Optional mappings from AWS IAM users to Kubernetes users and groups. Only supported with authentication mode `CONFIG_MAP` or `API_AND_CONFIG_MAP`. UserMappings UserMappingArrayInput diff --git a/sdk/go/eks/pulumiTypes.go b/sdk/go/eks/pulumiTypes.go index 66ae4458f..41a1c37a3 100644 --- a/sdk/go/eks/pulumiTypes.go +++ b/sdk/go/eks/pulumiTypes.go @@ -306,6 +306,7 @@ type AutoModeOptions struct { // Whether to create an IAM role for the EKS Auto Mode node group if none is provided in `computeConfig`. CreateNodeRole *bool `pulumi:"createNodeRole"` // Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + // When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. Enabled bool `pulumi:"enabled"` } @@ -342,6 +343,7 @@ type AutoModeOptionsArgs struct { // Whether to create an IAM role for the EKS Auto Mode node group if none is provided in `computeConfig`. CreateNodeRole *bool `pulumi:"createNodeRole"` // Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + // When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. Enabled bool `pulumi:"enabled"` } @@ -448,6 +450,7 @@ func (o AutoModeOptionsOutput) CreateNodeRole() pulumi.BoolPtrOutput { } // Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. +// When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. func (o AutoModeOptionsOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v AutoModeOptions) bool { return v.Enabled }).(pulumi.BoolOutput) } @@ -497,6 +500,7 @@ func (o AutoModeOptionsPtrOutput) CreateNodeRole() pulumi.BoolPtrOutput { } // Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. +// When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. func (o AutoModeOptionsPtrOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AutoModeOptions) *bool { if v == nil { @@ -2729,7 +2733,7 @@ func (o FargateProfilePtrOutput) SubnetIds() pulumi.StringArrayOutput { type KubeProxyAddonOptions struct { // Custom configuration values for the kube-proxy addon. This object must match the schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html). ConfigurationValues map[string]interface{} `pulumi:"configurationValues"` - // Whether or not to create the `kube-proxy` Addon in the cluster + // Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. Enabled *bool `pulumi:"enabled"` // How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are `NONE` and `OVERWRITE`. For more details see the [CreateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html) API Docs. ResolveConflictsOnCreate *ResolveConflictsOnCreate `pulumi:"resolveConflictsOnCreate"` @@ -2745,10 +2749,6 @@ func (val *KubeProxyAddonOptions) Defaults() *KubeProxyAddonOptions { return nil } tmp := *val - if tmp.Enabled == nil { - enabled_ := true - tmp.Enabled = &enabled_ - } if tmp.ResolveConflictsOnCreate == nil { resolveConflictsOnCreate_ := ResolveConflictsOnCreate("OVERWRITE") tmp.ResolveConflictsOnCreate = &resolveConflictsOnCreate_ @@ -2774,7 +2774,7 @@ type KubeProxyAddonOptionsInput interface { type KubeProxyAddonOptionsArgs struct { // Custom configuration values for the kube-proxy addon. This object must match the schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html). ConfigurationValues pulumi.MapInput `pulumi:"configurationValues"` - // Whether or not to create the `kube-proxy` Addon in the cluster + // Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. Enabled *bool `pulumi:"enabled"` // How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are `NONE` and `OVERWRITE`. For more details see the [CreateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html) API Docs. ResolveConflictsOnCreate *ResolveConflictsOnCreate `pulumi:"resolveConflictsOnCreate"` @@ -2790,10 +2790,6 @@ func (val *KubeProxyAddonOptionsArgs) Defaults() *KubeProxyAddonOptionsArgs { return nil } tmp := *val - if tmp.Enabled == nil { - enabled_ := true - tmp.Enabled = &enabled_ - } if tmp.ResolveConflictsOnCreate == nil { resolveConflictsOnCreate_ := ResolveConflictsOnCreate("OVERWRITE") tmp.ResolveConflictsOnCreate = &resolveConflictsOnCreate_ @@ -2886,7 +2882,7 @@ func (o KubeProxyAddonOptionsOutput) ConfigurationValues() pulumi.MapOutput { return o.ApplyT(func(v KubeProxyAddonOptions) map[string]interface{} { return v.ConfigurationValues }).(pulumi.MapOutput) } -// Whether or not to create the `kube-proxy` Addon in the cluster +// Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. func (o KubeProxyAddonOptionsOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v KubeProxyAddonOptions) *bool { return v.Enabled }).(pulumi.BoolPtrOutput) } @@ -2940,7 +2936,7 @@ func (o KubeProxyAddonOptionsPtrOutput) ConfigurationValues() pulumi.MapOutput { }).(pulumi.MapOutput) } -// Whether or not to create the `kube-proxy` Addon in the cluster +// Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. func (o KubeProxyAddonOptionsPtrOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *KubeProxyAddonOptions) *bool { if v == nil { diff --git a/sdk/java/src/main/java/com/pulumi/eks/ClusterArgs.java b/sdk/java/src/main/java/com/pulumi/eks/ClusterArgs.java index dfa8269ff..d8c650ecb 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/ClusterArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/ClusterArgs.java @@ -1047,6 +1047,7 @@ public Optional>> tags() { /** * Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + * Defaults to true, unless `autoMode` is enabled. * */ @Import(name="useDefaultVpcCni") @@ -1054,6 +1055,7 @@ public Optional>> tags() { /** * @return Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + * Defaults to true, unless `autoMode` is enabled. * */ public Optional useDefaultVpcCni() { @@ -2520,6 +2522,7 @@ public Builder tags(Map tags) { /** * @param useDefaultVpcCni Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + * Defaults to true, unless `autoMode` is enabled. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/AutoModeOptionsArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/AutoModeOptionsArgs.java index 669c45574..022564462 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/AutoModeOptionsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/AutoModeOptionsArgs.java @@ -56,6 +56,7 @@ public Optional createNodeRole() { /** * Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + * When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. * */ @Import(name="enabled", required=true) @@ -63,6 +64,7 @@ public Optional createNodeRole() { /** * @return Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + * When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. * */ public Boolean enabled() { @@ -129,6 +131,7 @@ public Builder createNodeRole(@Nullable Boolean createNodeRole) { /** * @param enabled Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + * When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/KubeProxyAddonOptionsArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/KubeProxyAddonOptionsArgs.java index 9a25310ca..86bd9997e 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/KubeProxyAddonOptionsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/KubeProxyAddonOptionsArgs.java @@ -37,14 +37,14 @@ public Optional>> configurationValues() { } /** - * Whether or not to create the `kube-proxy` Addon in the cluster + * Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. * */ @Import(name="enabled") private @Nullable Boolean enabled; /** - * @return Whether or not to create the `kube-proxy` Addon in the cluster + * @return Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. * */ public Optional enabled() { @@ -146,7 +146,7 @@ public Builder configurationValues(Map configurationValues) { } /** - * @param enabled Whether or not to create the `kube-proxy` Addon in the cluster + * @param enabled Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. * * @return builder * @@ -200,7 +200,6 @@ public Builder version(String version) { } public KubeProxyAddonOptionsArgs build() { - $.enabled = Codegen.booleanProp("enabled").arg($.enabled).def(true).getNullable(); $.resolveConflictsOnCreate = Codegen.objectProp("resolveConflictsOnCreate", ResolveConflictsOnCreate.class).arg($.resolveConflictsOnCreate).def(ResolveConflictsOnCreate.Overwrite).getNullable(); $.resolveConflictsOnUpdate = Codegen.objectProp("resolveConflictsOnUpdate", ResolveConflictsOnUpdate.class).arg($.resolveConflictsOnUpdate).def(ResolveConflictsOnUpdate.Overwrite).getNullable(); return $; diff --git a/sdk/nodejs/cluster.ts b/sdk/nodejs/cluster.ts index 5d2e5935e..33dbba6ea 100644 --- a/sdk/nodejs/cluster.ts +++ b/sdk/nodejs/cluster.ts @@ -596,6 +596,7 @@ export interface ClusterArgs { tags?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + * Defaults to true, unless `autoMode` is enabled. */ useDefaultVpcCni?: boolean; /** diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index b444b9f5b..8ec99915d 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -79,6 +79,7 @@ export interface AutoModeOptionsArgs { createNodeRole?: boolean; /** * Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + * When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. */ enabled: boolean; } @@ -503,7 +504,7 @@ export interface KubeProxyAddonOptionsArgs { */ configurationValues?: pulumi.Input<{[key: string]: any}>; /** - * Whether or not to create the `kube-proxy` Addon in the cluster + * Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. */ enabled?: boolean; /** @@ -525,7 +526,6 @@ export interface KubeProxyAddonOptionsArgs { export function kubeProxyAddonOptionsArgsProvideDefaults(val: KubeProxyAddonOptionsArgs): KubeProxyAddonOptionsArgs { return { ...val, - enabled: (val.enabled) ?? true, resolveConflictsOnCreate: (val.resolveConflictsOnCreate) ?? "OVERWRITE", resolveConflictsOnUpdate: (val.resolveConflictsOnUpdate) ?? "OVERWRITE", }; diff --git a/sdk/python/pulumi_eks/_inputs.py b/sdk/python/pulumi_eks/_inputs.py index 19c6580b3..7159789ea 100644 --- a/sdk/python/pulumi_eks/_inputs.py +++ b/sdk/python/pulumi_eks/_inputs.py @@ -271,6 +271,7 @@ class AutoModeOptionsArgsDict(TypedDict): enabled: bool """ Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. """ compute_config: NotRequired[pulumi.Input['ClusterComputeConfigArgsDict']] """ @@ -294,6 +295,7 @@ def __init__(__self__, *, For more information, see: https://docs.aws.amazon.com/eks/latest/userguide/automode.html :param bool enabled: Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. :param pulumi.Input['ClusterComputeConfigArgs'] compute_config: Compute configuration for EKS Auto Mode. :param bool create_node_role: Whether to create an IAM role for the EKS Auto Mode node group if none is provided in `computeConfig`. """ @@ -310,6 +312,7 @@ def __init__(__self__, *, def enabled(self) -> bool: """ Whether to enable EKS Auto Mode. If enabled, EKS will manage node pools, EBS volumes and Load Balancers for you. + When enabled, the vpc-cni and kube-proxy will not be enabled by default because EKS Auto Mode includes pod networking capabilities. """ return pulumi.get(self, "enabled") @@ -2145,7 +2148,7 @@ class KubeProxyAddonOptionsArgsDict(TypedDict): """ enabled: NotRequired[bool] """ - Whether or not to create the `kube-proxy` Addon in the cluster + Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. """ resolve_conflicts_on_create: NotRequired['ResolveConflictsOnCreate'] """ @@ -2172,15 +2175,13 @@ def __init__(__self__, *, version: Optional[pulumi.Input[str]] = None): """ :param pulumi.Input[Mapping[str, Any]] configuration_values: Custom configuration values for the kube-proxy addon. This object must match the schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html). - :param bool enabled: Whether or not to create the `kube-proxy` Addon in the cluster + :param bool enabled: Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. :param 'ResolveConflictsOnCreate' resolve_conflicts_on_create: How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are `NONE` and `OVERWRITE`. For more details see the [CreateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html) API Docs. :param 'ResolveConflictsOnUpdate' resolve_conflicts_on_update: How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are `NONE`, `OVERWRITE`, and `PRESERVE`. For more details see the [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs. :param pulumi.Input[str] version: The version of the EKS add-on. The version must match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html). """ if configuration_values is not None: pulumi.set(__self__, "configuration_values", configuration_values) - if enabled is None: - enabled = True if enabled is not None: pulumi.set(__self__, "enabled", enabled) if resolve_conflicts_on_create is None: @@ -2210,7 +2211,7 @@ def configuration_values(self, value: Optional[pulumi.Input[Mapping[str, Any]]]) @pulumi.getter def enabled(self) -> Optional[bool]: """ - Whether or not to create the `kube-proxy` Addon in the cluster + Whether or not to create the `kube-proxy` Addon in the cluster. Defaults to true, unless `autoMode` is enabled. """ return pulumi.get(self, "enabled") diff --git a/sdk/python/pulumi_eks/cluster.py b/sdk/python/pulumi_eks/cluster.py index 893e9f6f5..934e48ce4 100644 --- a/sdk/python/pulumi_eks/cluster.py +++ b/sdk/python/pulumi_eks/cluster.py @@ -263,6 +263,7 @@ def __init__(__self__, *, Note: The use of `subnetIds`, along with `publicSubnetIds` and/or `privateSubnetIds` is mutually exclusive. The use of `publicSubnetIds` and `privateSubnetIds` is encouraged. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value mapping of tags that are automatically applied to all AWS resources directly under management with this cluster, which support tagging. :param bool use_default_vpc_cni: Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + Defaults to true, unless `autoMode` is enabled. :param pulumi.Input[Sequence[pulumi.Input['UserMappingArgs']]] user_mappings: Optional mappings from AWS IAM users to Kubernetes users and groups. Only supported with authentication mode `CONFIG_MAP` or `API_AND_CONFIG_MAP`. :param pulumi.Input[str] version: Desired Kubernetes master / control plane version. If you do not specify a value, the latest available version is used. :param 'VpcCniOptionsArgs' vpc_cni_options: The configuration of the Amazon VPC CNI plugin for this instance. Defaults are described in the documentation for the VpcCniOptions type. @@ -1114,6 +1115,7 @@ def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): def use_default_vpc_cni(self) -> Optional[bool]: """ Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + Defaults to true, unless `autoMode` is enabled. """ return pulumi.get(self, "use_default_vpc_cni") @@ -1435,6 +1437,7 @@ def __init__(__self__, Note: The use of `subnetIds`, along with `publicSubnetIds` and/or `privateSubnetIds` is mutually exclusive. The use of `publicSubnetIds` and `privateSubnetIds` is encouraged. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value mapping of tags that are automatically applied to all AWS resources directly under management with this cluster, which support tagging. :param bool use_default_vpc_cni: Use the default VPC CNI instead of creating a custom one. Should not be used in conjunction with `vpcCniOptions`. + Defaults to true, unless `autoMode` is enabled. :param pulumi.Input[Sequence[pulumi.Input[Union['UserMappingArgs', 'UserMappingArgsDict']]]] user_mappings: Optional mappings from AWS IAM users to Kubernetes users and groups. Only supported with authentication mode `CONFIG_MAP` or `API_AND_CONFIG_MAP`. :param pulumi.Input[str] version: Desired Kubernetes master / control plane version. If you do not specify a value, the latest available version is used. :param Union['VpcCniOptionsArgs', 'VpcCniOptionsArgsDict'] vpc_cni_options: The configuration of the Amazon VPC CNI plugin for this instance. Defaults are described in the documentation for the VpcCniOptions type.