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

Start release v0.26.0 #482

Merged
merged 4 commits into from
Mar 5, 2024
Merged

Start release v0.26.0 #482

merged 4 commits into from
Mar 5, 2024

Conversation

gianlucam76
Copy link
Member

No description provided.

mgianluc and others added 4 commits February 24, 2024 01:03
If extraLabels or extraAnnotations are defined, always set this.

Following ClusterProfile

```yaml
apiVersion: config.projectsveltos.io/v1alpha1
kind: ClusterProfile
metadata:
  labels:
    version: 1.0.0
  name: kyverno
spec:
  clusterSelector: env=fv
  syncMode: ContinuousWithDriftDetection
  extraLabels:
    version: 1.0.0
    field: extraLabels
  extraAnnotations:
    version: 1.0.0
    field: extraAnnotations
  helmCharts:
    - repositoryURL:    https://kyverno.github.io/kyverno/
      repositoryName:   kyverno
      chartName:        kyverno/kyverno
      chartVersion:     v3.1.1
      releaseName:      kyverno-latest
      releaseNamespace: kyverno
      helmChartAction:  Install
      values: |
        customLabels:
          version: 1.0.0
          field: customLabels
```

has extraLabels overriding a label set by helm chart itself.
If we don't always try to set extraLabels and extraAnnotations following scenario
would be broken:

1. deploy clusterProfile => all kyverno resources have label __field: extraLabels__
2. modify a resource directly in the managed cluster => this will cause a reconcilation (configuration drift detected)
3. helm set label __field: customLabels__.

Previoulsy code would not reset label __field: extraLabels__ because nothing had changed in extraLabels configuration.

This PR fixes that by always setting extraLabels and extraAnnotations irrespective of what happened in previous
reconciliations.
@gianlucam76 gianlucam76 merged commit 8ce1f2e into projectsveltos:dev Mar 5, 2024
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