GoogleCloudPlatform / gke-terraform-generator

gke-tf was created to streamline the creation of customized Terraform source files that build GKE clusters and supporting resources in GCP.
Apache License 2.0
55 stars 24 forks source link

IntialNode Count MaxCount MinCount Validation #22

Open chrislovecnm opened 4 years ago

chrislovecnm commented 4 years ago

The validation for initialNodeCount: 2 working weird.

This works

  nodePools:
    - metadata:
        name: my-node-pool
      spec:
        minCount: 2
        maxCount: 2
        initialNodeCount: 2

This does not work:

  nodePools:
    - metadata:
        name: my-node-pool
      spec:
        minCount: 2
        initialNodeCount: 2

This does not work:

  nodePools:
    - metadata:
        name: my-node-pool
      spec:
        initialNodeCount: 2
chrislovecnm commented 4 years ago

We need to decide exactly how it should work. If initialNodeCount is set, but min and max are not set, what do we set them to?? How does this impact autoscaling??

@bgeesaman @robinpercy @wripley

bgeesaman commented 4 years ago

My thoughts:

If min and max are not set, no autoscaling is to be enabled OR, set min and max to same as initialnodecount and warn? If only min is set, validation error for not providing max.