Skip to content

Error: Update call failed: invalid mutation to initialNodeCount, despite unchanged initialNodeCount #165

@jonnylangefeld

Description

@jonnylangefeld

Describe the bug
After changing the nodeCount on a containernodepool resource, I get the error Update call failed: the desired mutation for the following field(s) is invalid: [initialNodeCount] in the events of the resource.
This happens in particular when a containernodepool is created with autoscaling and then edited to use nodeCount instead of autoscaling

ConfigConnector Version
1.7.0

To Reproduce

  • create containernodepool resource with autoscaling (use yaml below)
  • kubectl edit the containernodepool, remove autoscaling and change nodeCount
  • do this last step again (this is when it fails).
  • check kubectl describe on the containernodepool, that's where the error is

YAML snippets:

apiVersion: container.cnrm.cloud.google.com/v1beta1
kind: ContainerNodePool
metadata:
  annotations:
    cnrm.cloud.google.com/management-conflict-prevention-policy: none
    cnrm.cloud.google.com/project-id: <project>
  name: sample-nodepool-green
  namespace: default
spec:
  autoscaling:
    minNodeCount: 1
    maxNodeCount: 5
  initialNodeCount: 1
  clusterRef:
    external: <cluster-ref>
  location: us-central1
  nodeLocations:
    - us-central1-a
  maxPodsPerNode: 110
  nodeConfig:
    diskSizeGb: 100
    diskType: pd-standard
    imageType: COS
    machineType: n1-standard-1
    metadata:
      additionalProperties: ""
      disable-legacy-endpoints: "true"
    minCpuPlatform: Intel Skylake
    oauthScopes:
    - https://www.googleapis.com/auth/logging.write
    - https://www.googleapis.com/auth/monitoring
    serviceAccountRef:
      external: default
    shieldedInstanceConfig:
      enableIntegrityMonitoring: true
  upgradeSettings:
    maxSurge: 1
    maxUnavailable: 0
  version: 1.15.11-gke.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions