Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New "app.kubernetes.io/version" label causes "must be no more than 63 characters" error on reconcile #879

Closed
ringerc opened this issue May 17, 2022 · 3 comments

Comments

@ringerc
Copy link

ringerc commented May 17, 2022

PR #797 added app.kubernetes.io/version to metadata.labels . The label value is computed from the image tag.

If the opentelemetry operator is deployed using an image specified by a sha256 hash, this breaks reconciliation with errors like

failed to reconcile config maps","error":"failed to reconcile the expected configmaps: failed to apply changes: ConfigMap "otel-collector" is invalid: metadata.labels: Invalid value: "8f65b4d94bb5290c8fc1540703c06f7a7a12cfd917d2f141bdc8a18803828615": must be no more than 63 characters"

It is incorrect to parse the image tag to get the version of the component. Instead, the version should be injected as a --build-arg / ARG into the container, then:

#797 introduced a breaking regression.

@ringerc
Copy link
Author

ringerc commented May 17, 2022

Workaround:

Downgrade your opentelemetry-operator Kustomizations and (if overridden from upstream kustomizations) your container image to v0.48.0.

Find and delete all Deployments created by the v0.50.0 operator, which incorrectly add a label to selector, resulting in reconciliation errors on downgrade per #840:

kubectl delete --all-namespaces deployment -l app.kubernetes.io/managed-by=opentelemetry-operator --dry-run=client

Omit the --dry-run=client to really execute the delete.

@pavolloffay
Copy link
Member

This was resolves in #849

please re-open if the issue is still lthere.

@ringerc
Copy link
Author

ringerc commented May 23, 2022

Thanks. I didn't land up working out how to write a kuttl test for it, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants