You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect that the CRD upgrade from v1beta1 to v1 of app-crd.yaml in #562 broke our old deployer images that had an misplaced field info (it was under descriptor instead of spec).
This mistake wasn't picked up by the validation, and we did not discover that it wasn't valid until a few days ago.
apiVersion: app.k8s.io/v1beta1kind: Applicationspec:
descriptor:
...info: [] # Field not in the right spot.
error: error validating "/data/resources.yaml": error validating data:
ValidationError(Application.spec.descriptor): unknown field "info" in
io.k8s.app.v1beta1.Application.spec.descriptor; if you choose to ignore
these errors, turn validation off with --validate=false
My hypothesis is that when the CRD was moved to v1 by default, the conversion webhook that converts old v1beta1 CustomResourceDefinitions to v1 started complaining about this misplaced info field.
Reproduce the issue
I was able to reproduce this bug with Kubernetes 1.19, but it should also appear with other Kubernetes versions. First, create a Kubernetes cluster on GKE
gcloud container clusters create test --zone=europe-west2-b --num-nodes=2
Now, let's use the old v1beta1 and deploy an application that has a misplaced info field. You can check that the field is misplaced using the command:
docker run --rm --entrypoint=cat gcr.io/jetstack-public/jetstack-secure-for-cert-manager/deployer:1.3.1-gcm.0 /data/chart/chart.tar.gz | tar xz -C /tmp/ chart/templates/application.yaml
cat /tmp/chart/templates/application.yaml
Now, let's install the old version v1beta1 of the CRD, and install the application:
error: error validating "/data/resources.yaml": error validating data:
[ValidationError(Application.spec): unknown field "addOwnerRef" in
io.k8s.app.v1beta1.Application.spec,
ValidationError(Application.spec.descriptor): unknown field "info" in
io.k8s.app.v1beta1.Application.spec.descriptor]; if you choose to ignore these
errors, turn validation off with --validate=false
Questions:
Is there a way to subscribe to some changelog for the changes made to the CRD, mpdev and testrunner? I would expect this changelog to contain a "breaking change" section.
What should I do with the "broken" deployers for old versions? Should I re-issue a new deployer with the fix?
I suspect that the CRD upgrade from
v1beta1
tov1
ofapp-crd.yaml
in #562 broke our old deployer images that had an misplaced fieldinfo
(it was underdescriptor
instead ofspec
).This mistake wasn't picked up by the validation, and we did not discover that it wasn't valid until a few days ago.
The valid Application should have been:
The error looks like this:
My hypothesis is that when the CRD was moved to
v1
by default, the conversion webhook that converts oldv1beta1
CustomResourceDefinitions tov1
started complaining about this misplacedinfo
field.Reproduce the issue
I was able to reproduce this bug with Kubernetes 1.19, but it should also appear with other Kubernetes versions. First, create a Kubernetes cluster on GKE
gcloud container clusters create test --zone=europe-west2-b --num-nodes=2
Now, let's use the old
v1beta1
and deploy an application that has a misplacedinfo
field. You can check that the field is misplaced using the command:Now, let's install the old version
v1beta1
of the CRD, and install the application:The application is installed with no problem.
Now, let us install the new
v1
CRD instead, and deploy the application again:This time, the following error appears:
Questions:
mpdev
andtestrunner
? I would expect this changelog to contain a "breaking change" section.cc @gibbleyg
The text was updated successfully, but these errors were encountered: