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

standard GKE cluster creation fails when enableAutopilot is explicitly set to false #2881

Open
ba1ajinaidu opened this issue Jan 17, 2025 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team

Comments

@ba1ajinaidu
Copy link

ba1ajinaidu commented Jan 17, 2025

Describe what happened

I'm trying to setup a GKE cluster using pulumi @pulumi/[email protected]. I see enableAutopilot flag defaults to false, but when I explicitly set it to false and set removeDefaultNodePool: true, the cluster creation fails with the below error. It works when I don't explicitly set enableAutopilot but doesn't when I do set it.
error:

gcp:container:Cluster gke-Cluster  error: gcp:container/cluster:Cluster resource 'gke-Cluster' has a problem: Conflicting configuration arguments. "remove_default_node_pool": conflicts with enable_autopilot. Examine values at 'gke-Cluster.removeDefaultNodePool'.
    pulumi:pulumi:Stack gcp-launchpad-dev
    gcp:container:Cluster gke-Cluster **failed** 1 error
Diagnostics:
  gcp:container:Cluster (gke-Cluster):
    error: gcp:container/cluster:Cluster resource 'gke-Cluster' has a problem: Conflicting configuration arguments. "remove_default_node_pool": conflicts with enable_autopilot. Examine values at 'gke-Cluster.removeDefaultNodePool'

Sample program

const gkeCluster = new gcp.container.Cluster("gke-Cluster", {
        addonsConfig: {
            gcePersistentDiskCsiDriverConfig: {
                enabled: true,
            },
            horizontalPodAutoscaling: {
                disabled: false,
            },
        },
        clusterTelemetry: {
            type: "SYSTEM_ONLY",
        },
        controlPlaneEndpointsConfig: {
            dnsEndpointConfig: {
                allowExternalTraffic: true,
            }
        },
        datapathProvider: "ADVANCED_DATAPATH",
        description: "GKE Cluster to deploy Fennel",
        enableAutopilot: false,
        initialNodeCount: 1,
        location: input.env.region,
        minMasterVersion: gkeVersion.latestMasterVersion,
        name: `test-gke-cluster`,
        network: vpc.selfLink,
        networkingMode: "VPC_NATIVE",
        privateClusterConfig: {
            enablePrivateNodes: true,
        },
        project: input.env.projectId,
        releaseChannel: {
            channel: "STABLE",
        },
        removeDefaultNodePool: true,
        resourceLabels: input.tags,
        subnetwork: input.vpcOutput.subnet.selfLink,
        workloadIdentityConfig: {
            workloadPool: `${projectId}.svc.id.goog`,
        }
    }, { provider: gcpProvider, protect: true });

Log output

No response

Affected Resource(s)

gcp.container.cluster

Output of pulumi about

❯ pulumi about
CLI
Version      3.130.0
Go Version   go1.22.6
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  command     1.0.1
resource  gcp         8.13.1
resource  kubernetes  4.20.0
language  nodejs      unknown

Host
OS       darwin
Version  15.2
Arch     arm64

This project is written in nodejs: executable='/nix/store/9vkabbbbyfn8hv5l1r8fm59d27imq460-nodejs-22.11.0/bin/node' version='v22.11.0'

Current Stack: gcp-launchpad/dev

TYPE                                     URN
pulumi:pulumi:Stack                      urn:pulumi:dev::gcp-launchpad::pulumi:pulumi:Stack::gcp-launchpad-dev
pulumi:providers:gcp                     urn:pulumi:dev::gcp-launchpad::pulumi:providers:gcp::global-gcp-provider
gcp:compute/network:Network              urn:pulumi:dev::gcp-launchpad::gcp:compute/network:Network::vpc
gcp:compute/subnetwork:Subnetwork        urn:pulumi:dev::gcp-launchpad::gcp:compute/subnetwork:Subnetwork::dev-asia-south1-subnet
gcp:container/cluster:Cluster            urn:pulumi:dev::gcp-launchpad::gcp:container/cluster:Cluster::gke-Cluster


Dependencies:
NAME                VERSION
@pulumi/command     1.0.1
@pulumi/kubernetes  4.20.0
@pulumi/pulumi      3.145.0
@types/node         18.19.70
vitest              2.1.8
@pulumi/gcp         8.13.1
@types/netmask      2.0.5
netmask             2.0.2
ts-node             10.9.2
typescript          5.7.3

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@ba1ajinaidu ba1ajinaidu added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team
Projects
None yet
Development

No branches or pull requests

1 participant