carvel-dev / carvel-dev/kapp

rebaserules not being applied

Open
#868 2 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
Go
Stars
1.1k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.