How do I enable autoUpgrade and autoRepair on a GK...
# general
i
How do I enable autoUpgrade and autoRepair on a GKE cluster? This typechecks but does not work:
Copy code
nodePools: {
          management: {
            autoRepair: true,
            autoUpgrade: true,
          },
        }
gcp:container/cluster:Cluster resource 'development' has a problem: node_pool: should be a list
Why does this also typecheck?
Copy code
nodePools: [{
          management: {
            autoRepair: true,
            autoUpgrade: true,
          },
        }],
These typescript definitions appear to be non-specific when I am hoping they guide my configuration. The above fails with
error: Plan apply failed: googleapi: Error 400: It's invalid to specify both cluster.node_config and a node pool. Please only provide a node pool., badRequest
g
@breezy-hamburger-69619 Do you know?
b
I have not explored this personally. @creamy-potato-29402?
c
I don’t know — seems like it would be a problem with the GCP package.
w
@important-leather-28796 I tried the first example you shared, and I get a type error as expected. For the second, I get no type error, but I wouldn't expect one here. The TypeScript types don't capture these complex relationships between properties like "X and Y are mutually exclusive", they just capture required or optional and the type shape. Given the error message, I'm assuming you also provided
nodeConfig
?
i
yes that is correct. So far I haven’t been able to get a correct config in for that
w
I think you have to specify the
nodeConfig
inside the pool you want it to apply to. The
nodeConfig
at the root configures the default NodePool, which can't be used if you specify an explicit array of NodePools. You can see the shape in the API docs: https://pulumi.io/reference/pkg/nodejs/@pulumi/gcp/container/#ClusterArgs-nodePools
i
ok thanks, I’ll try that tomorrow