vmware-archive / kubecfg

A tool for managing complex enterprise Kubernetes environments as code.
Apache License 2.0
728 stars 62 forks source link

diff subcommand should ignore gc tag #316

Open kgtw opened 2 years ago

kgtw commented 2 years ago

We run the diff subcommand during CI process involved with PR reviews, which comments back the diff as a PR comment in github.

When this happens we are getting false/positives because in some cases the only difference is the gc tag.

"metadata": {
-      "annotations": {
-       "kubecfg.ksonnet.io/garbage-collect-tag": "my-service",
-      },
-      "labels": {
-       "kubecfg.ksonnet.io/garbage-collect-tag": "my-service",
-      },

Either the diff subcommand should ignore the gc tag entirely, or the option to provide it should be made available to avoid such instances of this happening.

mkmik commented 2 years ago

which --diff-strategy are you using?

kgtw commented 2 years ago

diff --diff-strategy last-applied