cisco-open / operator-tools

Speed up the implementation and composition of Kubernetes Operators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Updating service resources fails on k8s 1.20

sancyx opened this issue · comments

Describe the bug
From k8s version 1.20 when updating an immutable field of a Service like spec.clusterIPs the error message is: spec.clusterIPs[0]: Invalid value: []string(nil): primary clusterIP can not be unset
while in earlier versions was something like: spec.clusterIP: Invalid value: "": field is immutable which results in the reconciler code failure, instead of recreating the resource (https://github.com/banzaicloud/operator-tools/blob/c65fef1ee985d957004499bdb2fa51ef9c3c82c4/pkg/reconciler/resource.go#L397)

Steps to reproduce the issue:
Run e2e tests of integrated-service-operator with at least version 0.21.0 of operator tools. (Latest kind is using k8s 1.20)

Expected behavior
Recreate service.