GoogleCloudPlatform / k8s-config-connector

GCP Config Connector, a Kubernetes add-on for managing GCP resources
https://cloud.google.com/config-connector/docs/overview
Apache License 2.0
890 stars 218 forks source link

[Lack of idempotency] ComputeInstance zero-delta updates returns: Cannot make changes on immutable fields: [networkInterface] #103

Closed tonybenchsci closed 4 years ago

tonybenchsci commented 4 years ago

Issue

Same KCC configuration for ComputeInstance on subsequent applies (after initial creation) will return: admission webhook "deny-immutable-field-updates.cnrm.cloud.google.com" denied the request: Cannot make changes on immutable fields: [networkInterface]

Environment

kubectl version

Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.12", GitCommit:"a8b52209ee172232b6db7a6e0ce2adc77458829f", GitTreeState:"clean", BuildDate:"2019-10-15T12:12:15Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.11-gke.23", GitCommit:"93457f9dac45d5f95c2c609232e1ff2343c72684", GitTreeState:"clean", BuildDate:"2020-01-14T06:01:01Z", GoVersion:"go1.12.11b4", Compiler:"gc", Platform:"linux/amd64"}

Tried K8s Config Connector versions

1.0.0
1.4.0

Steps to reproduce

Apply below file with kubectl apply -f es-data1.computeinstance.yaml

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstance
metadata:
  name: es-data1
spec:
  minCpuPlatform: "Intel Haswell"
  machineType: n1-highmem-8
  zone: us-east4-a
  networkInterface:
  - networkRef:
      name: default
  bootDisk:
    autoDelete: true
    deviceName: es-v35-data1
    initializeParams:
      sourceImageRef:
        external: https://www.googleapis.com/compute/v1/projects/<REDACTED>

Expected Behavior

computeinstance.compute.cnrm.cloud.google.com/es-data1 unchanged

Actual Behavior

admission webhook "deny-immutable-field-updates.cnrm.cloud.google.com" denied the request: Cannot make changes on immutable fields: [networkInterface]

Additional information

kibbles-n-bytes commented 4 years ago

@tonybenchsci Thanks for making us aware of this. We're investigating what we can do on our end, and will update this issue once we have a plan in place.

tonybenchsci commented 4 years ago

@tonybenchsci Thanks for making us aware of this. We're investigating what we can do on our end, and will update this issue once we have a plan in place.

@kibbles-n-bytes any updates on this one? Thanks for v1.5.2 release btw (it's not listed in github code releases yet though, but I see it in gsutil)

tonybenchsci commented 4 years ago

bump. this is breaking our CloudBuild pipeline. Thanks for efforts.

kibbles-n-bytes commented 4 years ago

Hey @tonybenchsci , sorry for the delay. We have a release coming out today that will have a patch for this.

kibbles-n-bytes commented 4 years ago

1.6.1 is now released; please update and let us know if you're still having any issues!

tonybenchsci commented 4 years ago

Fixed! Thanks.