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

Custom labels added for istio-cni deployment and pods in helm chart #50694

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

Conversation

nischay30
Copy link

@nischay30 nischay30 commented Apr 26, 2024

This PR adds the capability in helm chart for adding custom labels to istio-cni deployments ands pods and aims at this Issue - #50372

Copy link

linux-foundation-easycla bot commented Apr 26, 2024

CLA Missing ID CLA Not Signed

@istio-policy-bot
Copy link

😊 Welcome @nischay30! This is either your first contribution to the Istio istio repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 26, 2024
@istio-testing
Copy link
Collaborator

Hi @nischay30. Thanks for your PR.

I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@@ -32,6 +32,12 @@ defaults:
# Allows user to set custom affinity for the DaemonSet
affinity: {}

# Custom labels on Deployment level, if you need them
Copy link
Member

Choose a reason for hiding this comment

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

This isn't a Deployment so the naming is kind of weird?

Copy link
Author

Choose a reason for hiding this comment

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

That was a typo. Fixed it

Copy link
Contributor

@costinm costinm left a comment

Choose a reason for hiding this comment

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

I was about to open a PR - can you add the "app: istio-cni" label as well ?

It is very annoying that all other charts have this label - but this one uses k8s-app instead ( and I don't know what "-node" suffix means - all other charts use the "app: chart_name")

Copy link
Contributor

@costinm costinm left a comment

Choose a reason for hiding this comment

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

And it may be useful to provide an example of 'when you need them' - by the criteria that you may need something we would replicate the entire Pod spec in values.yaml...

I know there is a pattern of redundant docs in most of the helm charts, but at least for new stuff it may be nice to have at least an example use case.

@nischay30
Copy link
Author

I was about to open a PR - can you add the "app: istio-cni" label as well ?

It is very annoying that all other charts have this label - but this one uses k8s-app instead ( and I don't know what "-node" suffix means - all other charts use the "app: chart_name")

The k8s-app label is present in spec.selector.matchLabels, which is immutable field. By replacing, it will become a breaking change, where first it needs to be uninstalled.

@nischay30
Copy link
Author

And it may be useful to provide an example of 'when you need them' - by the criteria that you may need something we would replicate the entire Pod spec in values.yaml...

I know there is a pattern of redundant docs in most of the helm charts, but at least for new stuff it may be nice to have at least an example use case.

Do you have any example? any format? where we can add? because custom labels isn't a big thing

@costinm
Copy link
Contributor

costinm commented Apr 29, 2024 via email

@costinm
Copy link
Contributor

costinm commented Apr 29, 2024 via email

Copy link
Member

@linsun linsun left a comment

Choose a reason for hiding this comment

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

Can you add a release note file?

Also explain why use daemonset vs pod level label for istio-cni?

cc @bleggett

@bleggett
Copy link
Contributor

bleggett commented May 2, 2024

Can you add a release note file?

Also explain why use daemonset vs pod level label for istio-cni?

cc @bleggett

It's good practice to have both, like we already do in the ztunnel daemonset chart.

My biggest beef with the istio-cni chart is the use of the cni prefix for all the values, which is an artifact of istioctl and very non-helm.

@costinm
Copy link
Contributor

costinm commented May 3, 2024 via email

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label May 3, 2024
@istio-testing istio-testing removed the needs-rebase Indicates a PR needs to be rebased before being merged label May 7, 2024
@nischay30
Copy link
Author

Can you add a release note file?

Also explain why use daemonset vs pod level label for istio-cni?

cc @bleggett

I have changed to labels as discussed above. Also, how to add release-notes file?

@bleggett
Copy link
Contributor

bleggett commented May 7, 2024

Can you add a release note file?
Also explain why use daemonset vs pod level label for istio-cni?
cc @bleggett

I have changed to labels as discussed above. Also, how to add release-notes file?

Check istio/releasenotes/README.md

Copy link
Contributor

@dgn dgn left a comment

Choose a reason for hiding this comment

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

generally lgtm, just one small comment regarding the release note

releasenotes/notes/cni-custom-labels.yaml Outdated Show resolved Hide resolved
@costinm
Copy link
Contributor

costinm commented May 14, 2024 via email

@bleggett
Copy link
Contributor

  • Custom labels on Daemonset level, for eg - FinOps/teams labels + labels: {} + # team-owner: finops + + # Custom labels on Pod level, for eg - FinOps/teams labels + podLabels: {} + # team-owner: finops + Minor nit - don't need specific examples.

I asked for examples and use cases - but I agree 'team-owner' is not the right example for CNI or ztunnel, it's not a regular pod. I still don't understand the use case, but since all other helm charts we have contain similar customisation I don't mind this, was just hoping to understand.

I'll leave it to you then, I missed you had asked for it, it just looks weird since we don't do that in other spots and people might not know what finops is.

@nischay30
Copy link
Author

What is blocking to get this merged?

@costinm
Copy link
Contributor

costinm commented May 17, 2024

Not sure.

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label May 18, 2024
Copy link
Member

@hanxiaop hanxiaop left a comment

Choose a reason for hiding this comment

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

Can you rebase?

/ok-to-test

@istio-testing istio-testing added ok-to-test Set this label allow normal testing to take place for a PR not submitted by an Istio org member. and removed needs-ok-to-test labels May 21, 2024
@istio-testing istio-testing removed the needs-rebase Indicates a PR needs to be rebased before being merged label May 21, 2024
@istio-testing
Copy link
Collaborator

@nischay30: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
unit-tests-arm64_istio b16c562 link true /test unit-tests-arm64
gencheck_istio b16c562 link true /test gencheck
unit-tests_istio b16c562 link true /test unit-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/environments ok-to-test Set this label allow normal testing to take place for a PR not submitted by an Istio org member. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants