From 3c1fe494e539cdfcc494eb5a67b402eddf44e7ee Mon Sep 17 00:00:00 2001 From: Jorge Morales Pou Date: Fri, 3 May 2024 11:50:51 +0200 Subject: [PATCH] Fine tunning kapp rules --- .../src/bundle/config/kapp/kapp-config.yaml | 17 +++++------------ .../src/bundle/config/kapp/kapp-config.yaml | 19 ++----------------- 2 files changed, 7 insertions(+), 29 deletions(-) diff --git a/overlays/gitops-app/src/bundle/config/kapp/kapp-config.yaml b/overlays/gitops-app/src/bundle/config/kapp/kapp-config.yaml index d20355d..86f24b9 100644 --- a/overlays/gitops-app/src/bundle/config/kapp/kapp-config.yaml +++ b/overlays/gitops-app/src/bundle/config/kapp/kapp-config.yaml @@ -6,23 +6,16 @@ rebaseRules: type: copy sources: [existing, new] resourceMatchers: - - apiVersionKindMatcher: { apiVersion: training.educates.dev/v1beta1, kind: TrainingPortal } - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretCopier } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretInjector } - paths: - [metadata, annotations, "kopf.zalando.org/last-handled-configuration"] - - [status] type: copy sources: [existing] resourceMatchers: - - apiVersionKindMatcher: { apiVersion: training.educates.dev/v1beta1, kind: TrainingPortal } - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretCopier } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretInjector } -diffAgainstLastAppliedFieldExclusionRules: - - paths: - - [metadata, annotations, "kopf.zalando.org/last-handled-configuration"] - - [status] + - paths: + - [spec, syncPeriod] + type: copy + sources: [existing, new] resourceMatchers: - - apiVersionKindMatcher: { apiVersion: training.educates.dev/v1beta1, kind: TrainingPortal } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretCopier } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretInjector } + - apiVersionKindMatcher: { apiVersion: kappctrl.k14s.io/v1alpha1, kind: App } diff --git a/overlays/portal-app/src/bundle/config/kapp/kapp-config.yaml b/overlays/portal-app/src/bundle/config/kapp/kapp-config.yaml index d20355d..fd33520 100644 --- a/overlays/portal-app/src/bundle/config/kapp/kapp-config.yaml +++ b/overlays/portal-app/src/bundle/config/kapp/kapp-config.yaml @@ -1,28 +1,13 @@ apiVersion: kapp.k14s.io/v1alpha1 kind: Config rebaseRules: - - paths: - - [spec, rules, { allIndexes: true }, reclaimPolicy] - type: copy - sources: [existing, new] - resourceMatchers: - - apiVersionKindMatcher: { apiVersion: training.educates.dev/v1beta1, kind: TrainingPortal } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretCopier } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretInjector } - paths: - [metadata, annotations, "kopf.zalando.org/last-handled-configuration"] - - [status] type: copy sources: [existing] resourceMatchers: - apiVersionKindMatcher: { apiVersion: training.educates.dev/v1beta1, kind: TrainingPortal } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretCopier } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretInjector } -diffAgainstLastAppliedFieldExclusionRules: - - paths: - - [metadata, annotations, "kopf.zalando.org/last-handled-configuration"] - - [status] +diffAgainstExistingFieldExclusionRules: + - path: [status] resourceMatchers: - apiVersionKindMatcher: { apiVersion: training.educates.dev/v1beta1, kind: TrainingPortal } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretCopier } - - apiVersionKindMatcher: { apiVersion: secrets.educates.dev/v1beta1, kind: SecretInjector }