Skip to content

Commit

Permalink
add default secretgen rebase rule for secrets (#284)
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitriy Kalinin <[email protected]>
  • Loading branch information
cppforlife and Dmitriy Kalinin authored Aug 23, 2021
1 parent a85ae04 commit d362816
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/kapp/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,23 @@ rebaseRules:
resourceMatchers:
- apiVersionKindMatcher: {apiVersion: v1, kind: ServiceAccount}
# Secretgen populates secret data for annotated secrets
- paths:
- [data, .dockerconfigjson]
- [metadata, annotations, secretgen.carvel.dev/status]
type: copy
sources: [existing, new]
resourceMatchers:
- andMatcher:
matchers:
- apiVersionKindMatcher: {apiVersion: v1, kind: Secret}
- hasAnnotationMatcher:
keys: [secretgen.carvel.dev/image-pull-secret]
- notMatcher:
matcher:
hasAnnotationMatcher:
keys: [kapp.k14s.io/disable-default-secretgen-rebase-rules]
diffAgainstLastAppliedFieldExclusionRules:
- path: [metadata, annotations, "deployment.kubernetes.io/revision"]
resourceMatchers: *appsV1DeploymentWithRevAnnKey
Expand Down

0 comments on commit d362816

Please sign in to comment.