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) show dryrun #306

Merged
merged 1 commit into from
Nov 30, 2024
Merged

(feat) show dryrun #306

merged 1 commit into from
Nov 30, 2024

Conversation

gianlucam76
Copy link
Member

Add option to display full diff.

sveltosctl show dryrun
+-----------------------------+--------------------------+-----------+-----------------------------+--------+--------------------------------+----------------------------------------+
|           CLUSTER           |      RESOURCE TYPE       | NAMESPACE |            NAME             | ACTION |            MESSAGE             |                PROFILE                 |
+-----------------------------+--------------------------+-----------+-----------------------------+--------+--------------------------------+----------------------------------------+
| default/clusterapi-workload | kyverno.io:ClusterPolicy |           | disallow-latest-tag         | Update | use --raw-diff to see full     | ClusterProfile/deploy-kyverno-policies |
|                             |                          |           |                             |        | diff                           |                                        |
| default/clusterapi-workload | kyverno.io:ClusterPolicy |           | restrict-external-ips       | Create |                                | ClusterProfile/deploy-kyverno-policies |
| default/clusterapi-workload | kyverno.io:ClusterPolicy |           | disallow-empty-ingress-host | Delete |                                | ClusterProfile/deploy-kyverno-policies |
+-----------------------------+--------------------------+-----------+-----------------------------+--------+--------------------------------+----------------------------------------+
sveltosctl show dryrun --raw-diff
--- deployed: ClusterPolicy disallow-latest-tag
+++ proposed: 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 this cluster.
                 pattern:
                     spec:
                         containers:

Add option to display full diff.

```
sveltosctl show dryrun
+-----------------------------+--------------------------+-----------+-----------------------------+--------+--------------------------------+----------------------------------------+
|           CLUSTER           |      RESOURCE TYPE       | NAMESPACE |            NAME             | ACTION |            MESSAGE             |                PROFILE                 |
+-----------------------------+--------------------------+-----------+-----------------------------+--------+--------------------------------+----------------------------------------+
| default/clusterapi-workload | kyverno.io:ClusterPolicy |           | disallow-latest-tag         | Update | use --raw-diff to see full     | ClusterProfile/deploy-kyverno-policies |
|                             |                          |           |                             |        | diff                           |                                        |
| default/clusterapi-workload | kyverno.io:ClusterPolicy |           | restrict-external-ips       | Create |                                | ClusterProfile/deploy-kyverno-policies |
| default/clusterapi-workload | kyverno.io:ClusterPolicy |           | disallow-empty-ingress-host | Delete |                                | ClusterProfile/deploy-kyverno-policies |
+-----------------------------+--------------------------+-----------+-----------------------------+--------+--------------------------------+----------------------------------------+
```

```
sveltosctl show dryrun --raw-diff
--- deployed: ClusterPolicy disallow-latest-tag
+++ proposed: 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 this cluster.
                 pattern:
                     spec:
                         containers:
```
@gianlucam76 gianlucam76 merged commit f45a474 into projectsveltos:main Nov 30, 2024
2 checks passed
@gianlucam76 gianlucam76 deleted the diff branch November 30, 2024 14:38
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