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): track full diff for resources #862

Merged

Conversation

gianlucam76
Copy link
Member

When in DryRun mode, Sveltos creates a ClusterReport containing the list of changes compared to current configuration. For raw Kubernetes resources this includes listing:

  1. resources that would be created
  2. resources that would be deleted
  3. resources that would be updated

Sveltos now provides a more granular view of proposed changes during Dry Run mode for updates. A detailed diff highlighting exact changes, such as added, modified, or removed fields.

Example:

    resourceReports:
    - action: Update
      message: |
        --- ClusterPolicy disallow-latest-tag
        +++ ClusterPolicy disallow-latest-tag
        @@ -49,7 +49,7 @@
                       name: validate-image-tag
                       skipBackgroundRequests: true
                       validate:
        -                message: Using a mutable image tag e.g. 'latest' is not allowed.
        +                message: Using a mutable image tag e.g. 'latest' is not allowed in produdction clusters.
                         pattern:
                             spec:

@gianlucam76 gianlucam76 force-pushed the more-template-functions branch 2 times, most recently from fe62ea1 to 3918c9b Compare November 29, 2024 14:54
When in DryRun mode, Sveltos creates a ClusterReport containing the
list of changes compared to current configuration.
For raw Kubernetes resources this includes listing:
1. resources that would be created
2. resources that would be deleted
3. resources that would be updated

Sveltos now provides a more granular view of proposed changes during Dry Run mode
for updates. A detailed diff highlighting exact changes, such as added, modified,
or removed fields.

Example:

```yaml
    resourceReports:
    - action: Update
      message: |
        --- ClusterPolicy disallow-latest-tag
        +++ ClusterPolicy disallow-latest-tag
        @@ -49,7 +49,7 @@
                       name: validate-image-tag
                       skipBackgroundRequests: true
                       validate:
        -                message: Using a mutable image tag e.g. 'latest' is not allowed.
        +                message: Using a mutable image tag e.g. 'latest' is not allowed in produdction clusters.
                         pattern:
                             spec:
```
@gianlucam76 gianlucam76 force-pushed the more-template-functions branch from 3918c9b to 9487bb8 Compare November 29, 2024 17:04
@gianlucam76 gianlucam76 merged commit b3b0e95 into projectsveltos:main Nov 29, 2024
5 checks passed
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