Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) Don't track certain resources for configuration drift #614

Merged
merged 1 commit into from
Jul 2, 2024
Merged

(feat) Don't track certain resources for configuration drift #614

merged 1 commit into from
Jul 2, 2024

Conversation

gianlucam76
Copy link
Member

When resource has annotation projectsveltos.io/driftDetectionIgnore set, in ContinuousWithDriftDetection mode, the resource won't be tracked for configuration drift.

Story

When resource has annotation projectsveltos.io/driftDetectionIgnore set,
in ContinuousWithDriftDetection mode, the resource won't be tracked for
configuration drift.

Patches can be used to add annotation. For instance

```yaml
apiVersion: config.projectsveltos.io/v1beta1
kind: ClusterProfile
metadata:
  name: deploy-kyverno
spec:
  clusterSelector:
    matchLabels:
      env: fv
  syncMode: ContinuousWithDriftDetection
  helmCharts:
  - repositoryURL:    https://kyverno.github.io/kyverno/
    repositoryName:   kyverno
    chartName:        kyverno/kyverno
    chartVersion:     v3.1.4
    releaseName:      kyverno-latest
    releaseNamespace: kyverno
    helmChartAction:  Install
  patches:
  - target:
      group: apps
      version: v1
      kind: Deployment
      name: "kyverno-admission-controller"
    patch: |
      - op: add
        path: /metadata/annotations/projectsveltos.io~1driftDetectionIgnore
        value: "ok"
```

[Story](#612)
@gianlucam76 gianlucam76 merged commit 3112fbc into projectsveltos:dev Jul 2, 2024
5 checks passed
@gianlucam76 gianlucam76 deleted the drift-detection branch July 2, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant