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

Patch CRDs with origin labels #596

Merged
merged 1 commit into from
Feb 1, 2023
Merged

Patch CRDs with origin labels #596

merged 1 commit into from
Feb 1, 2023

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Jan 31, 2023

This allows the applied CRDs to be traced using the same labels as currently applied to resources using a Kustomize post-render.

Kustomize is not used here as the apply logic for CRDs is different from the approach used during releasing, where we inject the labels in such a way that they are written back to the Helm storage in the rendered manifest. This to match Helm's logic from which our present code is already derived (buth with support for policies).

This also moves the full responsibility of dealing with the install of CRDs to ourselves, as we no longer fall back to Helm's logic when Create is configured as a policy during a Helm install. As this would not allow us to add the labels.

Fixes #476

@hiddeco hiddeco added the enhancement New feature or request label Jan 31, 2023
This allows the applied CRDs to be traced using the same labels as
currently applied to resources using a Kustomize post-render.

Kustomize is not used here as the apply logic for CRDs is different
from the approach used during releasing, where we inject the labels
in such a way that they are written back to the Helm storage in the
rendered manifest. This to match Helm's logic from which our present
code is already derived (buth with support for policies).

This also moves the full responsibility of dealing with the install
of CRDs to ourselves, as we no longer fall back to Helm's logic when
`Create` is configured as a policy during a Helm install. As this
would not allow us to add the labels.

Signed-off-by: Hidde Beydals <hello@hidde.co>
@hiddeco hiddeco marked this pull request as ready for review February 1, 2023 09:19
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @hiddeco 🏅

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

Successfully merging this pull request may close these issues.

CRDs are not labeled
2 participants