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

Label release resources with HelmRelease origin #238

Merged
merged 1 commit into from
Mar 18, 2021
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Mar 18, 2021

This commit adds a new post renderer that labels all resources with
helm.toolkit.fluxcd.io/name and helm.toolkit.fluxcd.io/namespace
so their source of origin can be traced back by e.g. the Flux UI.

The post renderer makes use of the Kustomize API without running
a full Kustomize build, by making directly use of the builtin
LabelTransformerPlugin on a ResMap that has been constructed
from the bytes of the bytes.Buffer given by Helm.

@hiddeco hiddeco added enhancement New feature or request area/ux In pursuit of a delightful user experience labels Mar 18, 2021
@hiddeco hiddeco requested a review from stefanprodan March 18, 2021 20:14
This commit adds a new post renderer that labels all resources with
`helm.toolkit.fluxcd.io/name` and `helm.toolkit.fluxcd.io/namespace`
so their source of origin can be traced back by e.g. the Flux UI.

The post renderer makes use of the Kustomize API without running
a full Kustomize build, by making directly use of the builtin
`LabelTransformerPlugin` on a `ResMap` that has been constructed
from the bytes of the `bytes.Buffer` given by Helm.

Signed-off-by: Hidde Beydals <hello@hidde.co>
@hiddeco hiddeco force-pushed the origin-labels branch 2 times, most recently from 32c170e to 879cf5b Compare March 18, 2021 20:33
@hiddeco hiddeco changed the title Label all release resources to mark origin Label release resources with HelmRelease origin Mar 18, 2021
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

@hiddeco hiddeco merged commit 10cc378 into main Mar 18, 2021
@hiddeco hiddeco deleted the origin-labels branch March 18, 2021 20:54
stefanprodan added a commit that referenced this pull request Apr 21, 2021
Followup #238

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan mentioned this pull request Apr 21, 2021
stefanprodan added a commit that referenced this pull request Apr 21, 2021
Followup #238

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux In pursuit of a delightful user experience enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants