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

rebaserules not being applied #868

Open
vivekskrishna opened this issue Nov 28, 2023 · 2 comments
Open

rebaserules not being applied #868

vivekskrishna opened this issue Nov 28, 2023 · 2 comments
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution

Comments

@vivekskrishna
Copy link

I see that kapp has a default rebase rule for annotations as follows

Be specific about annotations to be applied

  • path: [metadata, annotations]
    type: remove
    resourceMatchers:
    • allMatcher: {}
  • path: [metadata, annotations]
    type: copy
    sources: [new]
    resourceMatchers:
    • allMatcher: {}

i want to overwrite the behavior where i want to accept annotations added by other ways to resources managed by kapp-controller and so added following config in a yaml file along with other resource definitions packed as a imgpkg.

apiVersion: kapp.k14s.io/v1alpha1
kind: Config
rebaseRules:

  • path: [metadata, annotations]
    type: copy
    sources: [existing, new]
    resourceMatchers:
    • allMatcher: {}

But kapp-controller still tries to remove the extra annotations added which will be rejected by our custom opa controller.
<> annotations/labels <> cannot be deleted

Can you please let me now if i am doing something wrong and also if there is any way i can overwrite the default rebaserules globally and not in individual apps.

@vivekskrishna vivekskrishna added the carvel triage This issue has not yet been reviewed for validity label Nov 28, 2023
@praveenrewar
Copy link
Member

@vivekskrishna Could you share how you are using passing these rebase rules in kapp-controller?

@praveenrewar
Copy link
Member

(Also, apologies for not being able to reply for a while, you can always reach out on the carvel slack channel for queries)

@renuy renuy added discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution and removed carvel triage This issue has not yet been reviewed for validity labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution
Projects
Status: To Triage
Development

No branches or pull requests

3 participants