kapp
kapp copied to clipboard
rebaserules not being applied
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 Could you share how you are using passing these rebase rules in kapp-controller?
(Also, apologies for not being able to reply for a while, you can always reach out on the carvel slack channel for queries)