gardener / gardener-extension-registry-cache

Gardener extension controller which deploys pull-through caches for container registries.
Apache License 2.0
7 stars 20 forks source link

`make extension-up` call fails to patch the ControllerDeployment #276

Closed ialidzhikov closed 1 day ago

ialidzhikov commented 3 days ago

How to categorize this issue?

/area dev-productivity /kind bug

What happened: We actually hit https://github.com/gardener/gardener/issues/10267.

Any make extension-up call that builds a new image and that has to update an existing ControllerDeployment fails with:

% make extension-up

 - warning: error calculating patch from openapi v3 spec: unable to find api field "image"
 - controllerregistration.core.gardener.cloud/extension-registry-cache configured
 - Error from server: error when applying patch:
 - {"helm":{"values":{"image":{"repository":"garden.local.gardener.cloud:5001/local-skaffold_gardener-extension-registry-cache","tag":"v0.11.0-4-g5b8cc2d1-dirty"}}},"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"core.gardener.cloud/v1\",\"helm\":{\"rawChart\":\"H4sIAAAAAAAAA+0d7XLbuDG/+RSocjd31wmpT9tXzaRTn+1zPJc4Gtt127npeCASlnAmCRYg5eiS9Nm7IEgKJCVRlF05znHHY0sgsFgAu4vdxYKeYO4Qn3CTfAiJLyjzTU4mVIR8btrYnpL2iwdDB+Bgby/+C1D8G3/u9gfd3l5vf1+Wd/d7+/0XaO/hXVdDJELMEXrBGQvX1at6/kxhUrn+1pS4Hp34jJMt+5ALvD8YrFx/WPb8+vc6g17nBeo86khXwB98/V+iEQ5Dwn2BQobUMqP7KfHROKKuQ/0JCrB9hydEWMZLdDWlAokoCBgP4QOwhosmLhsjD4f2FGq/Qpy4OKQzAu3CqVaOfQcQ+GQCT5mPvg84uaUfiIPuKdT70w8Weu+7c8T8uKUkCQWEI5f6xDKs48ubyxBoAxRHzPMAwfXRJXIoF4Y1oWE7/q3IN6zx77wd/04LppO2/JV+FTO/vUA0hvFFAbqlLhHGny1xH8DvMb6D36EHn/8LVa8xpywS6Oz4BDoMOPuN2KFhUYfgtqoHRYY1EzZzSNt46lXdHKrl/2iKeWjNsedu20eV/Pf6e0X573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KUZ0135AinDKN9FGaJf/20Yy9JfQZl+jjlCpcwP48+LQEfKzkkxdBev1oUmMxMaTqOxfJNb25F15TvwYRC5L1nzLYSNKyNItPvcaZfoicWr1bc6Vsccg91ldWEpUxxDdZie/FeP1vNxThpooIEGGmiggQYaaKCBR4X/AU8G3rQAeAAA\",\"values\":{\"image\":{\"repository\":\"garden.local.gardener.cloud:5001/local-skaffold_gardener-extension-registry-cache\",\"tag\":\"v0.11.0-4-g5b8cc2d1-dirty\"}}},\"kind\":\"ControllerDeployment\",\"metadata\":{\"annotations\":{},\"name\":\"extension-registry-cache\"}}\n"}}}
 - to:
 - Resource: "core.gardener.cloud/v1, Resource=controllerdeployments", GroupVersionKind: "core.gardener.cloud/v1, Kind=ControllerDeployment"
 - Name: "extension-registry-cache", Namespace: ""
 - for: "STDIN": error when patching "STDIN": unable to find api field in struct JSON for the json field "image"
kubectl apply: exit status 1
make: *** [extension-up] Error 1

What you expected to happen: make extension-up to be able to properly patch the ControllerDeployment.

How to reproduce it (as minimally and precisely as possible): See above.

Anything else we need to know?: N/A

Environment: