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 merge annotation function #776

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Conversation

SchSeba
Copy link
Collaborator

@SchSeba SchSeba commented Sep 18, 2024

if the current obj as annotation and the updated doesn't we still want to add the ones from the current object

Copy link

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@coveralls
Copy link

coveralls commented Sep 18, 2024

Pull Request Test Coverage Report for Build 10939403064

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 45.034%

Files with Coverage Reduction New Missed Lines %
controllers/drain_controller.go 3 67.42%
Totals Coverage Status
Change from base Build 10935762250: -0.02%
Covered Lines: 6625
Relevant Lines: 14711

💛 - Coveralls

Copy link
Member

@zeeke zeeke left a comment

Choose a reason for hiding this comment

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

The gist here is: that operator should never remove a label/annotation from its managed object, right?
I guess this is because annotations and labels may come from the user.

pkg/apply/merge_test.go Outdated Show resolved Hide resolved
if the current obj as annotation and the updated doesn't we still want
to add the ones from the current object

Signed-off-by: Sebastian Sch <[email protected]>
@SchSeba
Copy link
Collaborator Author

SchSeba commented Sep 19, 2024

Right or from operators.

Where I was able to find this issue is in openshift we have an operator to generate the internal pull secret for every service account

apiVersion: v1
imagePullSecrets:
- name: network-resources-injector-sa-dockercfg-46j2c
kind: ServiceAccount
metadata:
  annotations:
    openshift.io/internal-registry-pull-secret-ref: network-resources-injector-sa-dockercfg-46j2c
creationTimestamp: "2024-09-16T12:15:10Z"
  name: network-resources-injector-sa
  namespace: openshift-sriov-network-operator
  ownerReferences:
  - apiVersion: sriovnetwork.openshift.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: SriovOperatorConfig
    name: default
    uid: 745df61d-68d7-4e97-a399-389bae71b7ba
  resourceVersion: "28652"
  uid: 6fe1b49e-943f-4c95-92aa-5cf0ab322151
secrets:
- name: network-resources-injector-sa-dockercfg-46j2c

without this change everytime we did a reconcile we remove this on and the openshift operator was creating a new imagepullSecret

after a few days this was running the number of secrets was huge

Copy link
Member

@zeeke zeeke left a comment

Choose a reason for hiding this comment

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

Thanks for explaining. LGTM!

Copy link
Collaborator

@ykulazhenkov ykulazhenkov left a comment

Choose a reason for hiding this comment

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

LGTM

@zeeke zeeke merged commit e2d0611 into k8snetworkplumbingwg:master Sep 20, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants