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) dry run: helm charts #882

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

gianlucam76
Copy link
Member

Before this PR, Sveltos' DryRun mode wrt Helm charts had limitations:

  • Helm Chart Upgrades and Removals: Sveltos could detect whether a Helm chart would be upgraded or removed.
  • Identical Chart Versions: If the deployed and proposed Helm chart versions were the same, Sveltos reported no changes, even if the Helm values differed.

This PR enhances Sveltos' DryRun mode by:

  • Detecting Value Differences: When the deployed and proposed Helm chart versions are identical, Sveltos now compares the Helm values used in deployment with those proposed in the profile.

  • Detailed Diff Reporting: If differences are found, Sveltos provides a detailed diff of the values, highlighting specific changes:

    - action: Update Values
      chartName: kyverno-latest
      chartVersion: v3.2.6
      message: |
        --- deployed
        +++ proposed
        @@ -1,8 +1,6 @@
         admissionController:
        -    replicas: 3
        +    replicas: 5
         backgroundController:
        -    replicas: 1
        +    replicas: 3
         cleanupController:
             replicas: 1
        -reportsController:
        -    replicas: 1

Before this PR, Sveltos' DryRun mode wrt Helm charts had limitations:

- Helm Chart Upgrades and Removals: Sveltos could detect whether a Helm chart
would be upgraded or removed.
- Identical Chart Versions: If the deployed and proposed Helm chart versions were
the same, Sveltos reported no changes, even if the Helm values differed.

This PR enhances Sveltos' DryRun mode by:

- **Detecting Value Differences**: When the deployed and proposed Helm chart
versions are identical, Sveltos now compares the Helm values used in deployment
with those proposed in the profile.

- **Detailed Diff Reporting**: If differences are found, Sveltos provides a detailed
diff of the values, highlighting specific changes:

```
    - action: Update Values
      chartName: kyverno-latest
      chartVersion: v3.2.6
      message: |
        --- deployed
        +++ proposed
        @@ -1,8 +1,6 @@
         admissionController:
        -    replicas: 3
        +    replicas: 5
         backgroundController:
        -    replicas: 1
        +    replicas: 3
         cleanupController:
             replicas: 1
        -reportsController:
        -    replicas: 1
```
@gianlucam76 gianlucam76 merged commit 4416b0b into projectsveltos:main Dec 4, 2024
5 checks passed
@gianlucam76 gianlucam76 deleted the disable-caching branch December 4, 2024 17:15
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