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) dryRun message for helm charts #316

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

gianlucam76
Copy link
Member

Use --raw-diff options to display how helm charts are changing

sveltosctl show dryrun            
+--------------+--------------------------+-----------+-----------------------------+---------------+--------------------------------+----------------------------------------+
|   CLUSTER    |      RESOURCE TYPE       | NAMESPACE |            NAME             |    ACTION     |            MESSAGE             |                PROFILE                 |
+--------------+--------------------------+-----------+-----------------------------+---------------+--------------------------------+----------------------------------------+
| civo/cluster | helm release             | kyverno   | kyverno-latest              | Update Values | use --raw-diff to see full     | ClusterProfile/deploy-kyverno          |
|              |                          |           |                             |               | diff for helm values           |                                        |
| civo/cluster | kyverno.io:ClusterPolicy |           | disallow-latest-tag         | Update        | use --raw-diff to see full     | ClusterProfile/deploy-kyverno-policies |
|              |                          |           |                             |               | diff                           |                                        |
| civo/cluster | kyverno.io:ClusterPolicy |           | restrict-external-ips       | Create        |                                | ClusterProfile/deploy-kyverno-policies |
| civo/cluster | kyverno.io:ClusterPolicy |           | disallow-empty-ingress-host | Delete        |                                | ClusterProfile/deploy-kyverno-policies |
| gke/cluster  | helm release             | kyverno   | kyverno-latest              | Update Values | use --raw-diff to see full     | ClusterProfile/deploy-kyverno          |
|              |                          |           |                             |               | diff for helm values           |                                        |
| gke/cluster  | kyverno.io:ClusterPolicy |           | disallow-latest-tag         | Update        | use --raw-diff to see full     | ClusterProfile/deploy-kyverno-policies |
|              |                          |           |                             |               | diff                           |                                        |
| gke/cluster  | kyverno.io:ClusterPolicy |           | restrict-external-ips       | Create        |                                | ClusterProfile/deploy-kyverno-policies |
| gke/cluster  | kyverno.io:ClusterPolicy |           | disallow-empty-ingress-host | Delete        |                                | ClusterProfile/deploy-kyverno-policies |
+--------------+--------------------------+-----------+-----------------------------+---------------+--------------------------------+----------------------------------------+

with `--raw-diff`` option

sveltosctl show dryrun  --raw-diff
Profile: ClusterProfile:deploy-kyverno Cluster: civo/cluster
--- deployed values
+++ proposed values
@@ -1,4 +1,4 @@
 admissionController:
-    replicas: 1
+    replicas: 3
 backgroundController:
-    replicas: 1
+    replicas: 3

Profile: ClusterProfile:deploy-kyverno-policies Cluster: civo/cluster
--- deployed: ClusterPolicy disallow-latest-tag
+++ proposed: ClusterPolicy disallow-latest-tag
@@ -49,10 +49,10 @@
               name: validate-image-tag
               skipBackgroundRequests: true
               validate:
-                message: Using a mutable image tag e.g. 'latest' is not allowed in this cluster.
+                message: Using a mutable image tag e.g. 'latest' is not allowed.
                 pattern:
                     spec:
                         containers:
                             - image: '!*:latest'
-        validationFailureAction: enforce
+        validationFailureAction: audit
     status: ""

Profile: ClusterProfile:deploy-kyverno Cluster: gke/cluster
--- deployed values
+++ proposed values
@@ -1,4 +1,4 @@
 admissionController:
-    replicas: 1
+    replicas: 3
 backgroundController:
-    replicas: 1
+    replicas: 3

Profile: ClusterProfile:deploy-kyverno-policies Cluster: gke/cluster
--- deployed: ClusterPolicy disallow-latest-tag
+++ proposed: ClusterPolicy disallow-latest-tag
@@ -49,10 +49,10 @@
               name: validate-image-tag
               skipBackgroundRequests: true
               validate:
-                message: Using a mutable image tag e.g. 'latest' is not allowed in this cluster.
+                message: Using a mutable image tag e.g. 'latest' is not allowed.
                 pattern:
                     spec:
                         containers:
                             - image: '!*:latest'
-        validationFailureAction: enforce
+        validationFailureAction: audit
     status: ""

Use `--raw-diff` options to display how helm charts are changing
@gianlucam76 gianlucam76 merged commit 6b73921 into projectsveltos:main Dec 5, 2024
2 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