This repository was archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 173
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
ksonnet changes objects even in dry-run mode #615
Copy link
Copy link
Closed
Description
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
What happened:
I ran ks apply prod --dry-run. Despite the --dry-run flag, ksonnet added labels and annotations to some cluster objects:
app.kubernetes.io/deploy-manager=ksonnet
ksonnet.io/managed={"pristine":"H4sIAAAAAAAA/3yPP0sEMRDFez/Gq+OtZyWpLS2sbOSK2eywBvNnyIwHuuS7SxQXRbgyvLzfb94GkvjETWMt8CARnc7HmY1u4fAaywKPe5ZU3zMXg0Nmo4
WM4DcUygyPudbMjcqK7qDCYWSNJcVACn90UE4crLYRZLLw8kAz...
What you expected to happen:
I expected no changes whatsoever to be made to the cluster in dry-run mode.
How to reproduce it (as minimally and precisely as possible):
Do a ks apply ENV --dry-run to objects which have not been managed by ksonnet before.
Anything else we need to know?:
In:
func (a *Apply) handleObject(co clientOpts, obj *unstructured.Unstructured) (string, error) {
if err := tagManaged(obj); err != nil {
return "", errors.Wrap(err, "tagging ksonnet managed object")
}it looks as if the call to tagManaged() should be wrapped with if !a.DryRun { ... }.
Environment:
- ksonnet version (use
ks version):
ksonnet version: 0.11.0
jsonnet version: v0.10.0
client-go version:
- Kubernetes version (use
kubectl version):
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.1", GitCommit:"d4ab47518836c750f9949b9e0d387f20fb92260b", GitTreeState:"clean", BuildDate:"2018-04-13T22:28:25Z", GoVersion:"go1.9.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.2-gke.1", GitCommit:"75d2af854b1df023c7ce10a8795b85d3dd1f8d37", GitTreeState:"clean", BuildDate:"2018-05-10T17:23:18Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels