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: add missing labels to resources #2519

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

cwrau
Copy link
Contributor

@cwrau cwrau commented Jan 10, 2024

What this PR does / why we need it:
Currently the chart doesn't contain the required labels on the applied resources, this makes it impossible to update the chart without manual intervention

Which issue this PR fixes(if applicable):

Special notes for reviewers:
I introduced the common chart from bitnami to standardly handle labels. The chart could also be used to handle resource names, secrets, matchlabels, ... . But I wanted to have this change be backwards-compatible and non-intrusive

Release note:

- adds missing labels to enable helm upgrades

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 10, 2024
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 10, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @cwrau. Thanks for your PR.

I'm waiting for a kubernetes 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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 10, 2024
@cwrau
Copy link
Contributor Author

cwrau commented Jan 10, 2024

Also, I'd like to backport this to at least 1.27 and up, do I still just open a PR with a cherry pick?

Comment on lines -6 to -7
labels:
{{- include "occm.labels" . | nindent 4 }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this give use the same labels here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this will result in the same labels

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm looking at CI results and I only see this label added to the DaemonSet:

Labels:         k8s-app=openstack-cloud-controller-manager

See for yourself in the "Describe failed openstack-cloud-controller-manager" step: https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/cloud-provider-openstack/2519/openstack-cloud-controller-manager-e2e-test/1749846521752326144/build-log.txt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know how CI comes up with that, but I would say it's technically impossible for this label to exist, neither in the old version nor my new one 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines +12 to +15
dependencies:
- name: common
version: 2.14.1
repository: https://charts.bitnami.com/bitnami
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I'd rather prefer to just copy this single function here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uff, I'm highly against copying code, that's the whole point of using a central, standard library for this; to remove code duplication.

Then you'd have to keep track of the upstream changes and copy them as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, but how "standard" is this standard library? I see it's used extensively in charts around GitHub, but it still seems to be from a third party?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it's not a "standard" by definition, but as you said it's extremely widely used across helm charts and bitnami, even though they're a third party, has made themselves a recognizable helm chart writer and supporter known for their quality, at least in my knowledge circle.

@jichenjc
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 11, 2024
@jichenjc
Copy link
Contributor

I introduced the common chart from bitnami to standardly handle labels. The chart could also be used to handle resource names, secrets, matchlabels, ... . But I wanted to have this change be backwards-compatible and non-intrusive

not sure ,is it a bug or label ? usually we only backport bugs

@cwrau
Copy link
Contributor Author

cwrau commented Jan 11, 2024

I introduced the common chart from bitnami to standardly handle labels. The chart could also be used to handle resource names, secrets, matchlabels, ... . But I wanted to have this change be backwards-compatible and non-intrusive

not sure ,is it a bug or label ? usually we only backport bugs

It's both, the missing labels are a major bug. To be honest; I'm really surprised that noone noticed this before

@dulek
Copy link
Contributor

dulek commented Jan 11, 2024

If this is to be backported it'll need an issue reported.

@@ -1,11 +1,15 @@
apiVersion: v1
apiVersion: v2
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's not something we want to change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed for dependencies

And, why not? 🤔🤷

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I thought it's a dependency upgrade then no need to update the api version ..

appVersion: v1.28.0
description: Openstack Cloud Controller Manager Helm Chart
icon: https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/6e4619c416ff4bd19e1c087f27a43eea/www-images-prod/openstack-logo/OpenStack-Logo-Vertical.png
home: https://github.com/kubernetes/cloud-provider-openstack
name: openstack-cloud-controller-manager
version: 2.29.0-alpha.5
version: 2.29.1-alpha.5
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be .6 instead ?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 20, 2024
otherwise upgrades fail with `resource already exists, add missing labels`
appVersion: v1.29.0
description: Openstack Cloud Controller Manager Helm Chart
icon: https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/6e4619c416ff4bd19e1c087f27a43eea/www-images-prod/openstack-logo/OpenStack-Logo-Vertical.png
home: https://github.com/kubernetes/cloud-provider-openstack
name: openstack-cloud-controller-manager
version: 2.29.0
version: 2.29.0-1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess not, so maybe now? 2.29.1?

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 22, 2024
@dulek
Copy link
Contributor

dulek commented Jan 23, 2024

/test openstack-cloud-controller-manager-e2e-test
/test openstack-cloud-csi-cinder-e2e-test
/test openstack-cloud-csi-cinder-e2e-test

@dulek
Copy link
Contributor

dulek commented Jan 23, 2024

/test openstack-cloud-csi-manila-e2e-test

@dulek
Copy link
Contributor

dulek commented Jan 23, 2024

These CI errors look unrelated, I see them on #2316 too.

/retest

@jichenjc
Copy link
Contributor

e2e report this error

Error from server (BadRequest): container "openstack-cloud-controller-manager" in pod "openstack-cloud-controller-manager-ghc27" is waiting to start: ImageInspectError

I googled this but seems the related report is pointing to image has some problem ,may need check more

@dulek
Copy link
Contributor

dulek commented Jan 25, 2024

e2e report this error

Error from server (BadRequest): container "openstack-cloud-controller-manager" in pod "openstack-cloud-controller-manager-ghc27" is waiting to start: ImageInspectError

I googled this but seems the related report is pointing to image has some problem ,may need check more

Yes, I'm on this.

@dulek
Copy link
Contributor

dulek commented Jan 30, 2024

/retest

@dulek
Copy link
Contributor

dulek commented Feb 8, 2024

/lgtm

@jichenjc, @kayrus, @zetaab, could you take a look here? I'm not that experienced with Helm to be confident to approve this myself.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2024
@jichenjc
Copy link
Contributor

/approve
/hold

also ok to me and leave unhold to someone might have further experience on helm than me :)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 19, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 19, 2024
@zetaab
Copy link
Member

zetaab commented Feb 20, 2024

imo the change looks ok, the labels should stay as is

@zetaab
Copy link
Member

zetaab commented Feb 20, 2024

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 20, 2024
@k8s-ci-robot k8s-ci-robot merged commit d9106b3 into kubernetes:master Feb 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants