kapp icon indicating copy to clipboard operation
kapp copied to clipboard

rebaserules not being applied

Open vivekskrishna opened this issue 1 year ago • 2 comments

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 avatar Nov 28 '23 09:11 vivekskrishna

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

praveenrewar avatar Dec 05 '23 07:12 praveenrewar

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

praveenrewar avatar Dec 05 '23 07:12 praveenrewar