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

Fix chart labels #6983

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix chart labels #6983

wants to merge 4 commits into from

Conversation

timstoop
Copy link

Switch the app label key to the well known app.kubernetes.io/component key instead. This helps other applications (like cilium hubble) identify the Pods easier. More information about the label can be found here: https://kubernetes.io/docs/reference/labels-annotations-taints/#app-kubernetes-io-component

I've remove the app: label from the tls-secret, as I felt like it did not serve a purpose and all important labels are already added by the helper script.

I was unable to find any reference to this label in the application code (but that said, I'm not very familiar with the application code).

This is a replacement for PR #6974 where I messed up the label key name.

@timstoop timstoop requested a review from a team as a code owner October 27, 2023 08:03
@innobead innobead self-requested a review October 31, 2023 13:22
Copy link
Member

@innobead innobead left a comment

Choose a reason for hiding this comment

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

LGTM.

Some other labels are automaticaly generated for each resource created for a Longhorn instance installation.

ref: /deploy/longhorn.yaml#L4097-L4099

    app.kubernetes.io/name: longhorn
    app.kubernetes.io/instance: longhorn
    app.kubernetes.io/version: v1.6.0-dev

@innobead
Copy link
Member

@derekbit @PhanLe1010 @shuo-wu any concerns about this change?

@derekbit
Copy link
Member

derekbit commented Nov 9, 2023

longhorn-manager codes need changes as well, e.g. https://github.com/longhorn/longhorn-manager/blob/master/app/post_upgrade.go#L108.

@innobead
Copy link
Member

longhorn-manager codes need changes as well, e.g. longhorn/longhorn-manager@master/app/post_upgrade.go#L108.

@timstoop Would you like to contribute this change to longhorn-manager as well?

@timstoop
Copy link
Author

I'm no Go programmer, so I don't have the local toolset available to actually test this. Happy to make the change, but I have to depend on you to make sure the change actually works!

@timstoop
Copy link
Author

Yeah, I had a look at that code, but I have no idea what it is doing. In my mind, it's probably changing pod.Labels["app"] into pod.Labels["app.kubernetes.io/component"], but that's honestly just a guess.

@innobead
Copy link
Member

We can keep the original label app as is to ensure not breaking the current implementation, but still can add the new app.kubernetes.io/component label to support external solutions integration.

Copy link

mergify bot commented Dec 14, 2024

This pull request is now in conflict. Could you fix it @timstoop? 🙏

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

Successfully merging this pull request may close these issues.

3 participants