https://pulumi.com logo
#general
Title
# general
i

important-leather-28796

03/05/2019, 7:58 PM
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

gorgeous-egg-16927

03/05/2019, 8:43 PM
@breezy-hamburger-69619 Do you know?
b

breezy-hamburger-69619

03/05/2019, 8:44 PM
I have not explored this personally. @creamy-potato-29402?
c

creamy-potato-29402

03/05/2019, 11:29 PM
I don’t know — seems like it would be a problem with the GCP package.
w

white-balloon-205

03/06/2019, 12:25 AM
@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

important-leather-28796

03/06/2019, 12:26 AM
yes that is correct. So far I haven’t been able to get a correct config in for that
w

white-balloon-205

03/06/2019, 12:33 AM
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

important-leather-28796

03/06/2019, 12:35 AM
ok thanks, I’ll try that tomorrow
5 Views