-
Bug
-
Resolution: Done
-
Undefined
-
1.7.0
-
None
-
Serverless Sprint 181, Serverless Sprint 182
When we change the spec.containers.ports.containerPort of any deployments like (controller, autoscaler, etc...), operator fails to reconile it.
e.g.
oc edit deploy -n knative-serving autoscaler
FROM
ports: - containerPort: 9090 name: metrics protocol: TCP
TO
ports: - containerPort: 9091 name: metrics protocol: TCP
Then, knative-serving-operator produces following error.
{"level":"error","ts":"2020-03-19T07:31:22.663Z","logger":"serving-operator.knativeserving-controller","caller":"controller/controller.go:409","msg":"Reconcile error","commit":"36ecf1b","knative.dev/controller":"knativeserving-controller","error":"Deployment.apps \"autoscaler\" is invalid: spec.template.spec.containers[0].ports[1].name: Duplicate value: \"metrics\"","stacktrace":"knative.dev/serving-operator/vendor/knative.dev/pkg/controller.(*Impl).handleErr\n\t/go/src/knative.dev/serving-operator/vendor/knative.dev/pkg/controller/controller.go:409\nknative.dev/serving-operator/vendor/knative.dev/pkg/controller.(*Impl).processNextWorkItem\n\t/go/src/knative.dev/serving-operator/vendor/knative.dev/pkg/controller/controller.go:395\nknative.dev/serving-operator/vendor/knative.dev/pkg/controller.(*Impl).Run.func2\n\t/go/src/knative.dev/serving-operator/vendor/knative.dev/pkg/controller/controller.go:343"}
And the autoscaler's pod is still 9091. (We expect 9090).
It happens all deployments deployed by operator. Kourier also has the same issue. ref - https://github.com/openshift-knative/serverless-operator/pull/185#issuecomment-600018918