WIP: Use KUBECTL_EXTERNAL_DIFF for static diffs#558
Conversation
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
I will get to this eventually. Or more precisely, this won't be WIP anymore once I (or someone else) fixes |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
I will get to this eventually. |
|
@curusarn The Slack thread is lost, what happened in that thread? Can you please provide short summary? |
|
@dohnto I'm a little foggy on it. IIRC it was a discussion between me and @sh0rez. I primarily linked it because we were discussing whether this is a good idea and @sh0rez agreed that this is a feature/change that makes sense in Tanka. I didn't even bother making an issue for this because the thread felt like a sufficient ack from maintainers side. There was likely more context but I don't recall the details. I hope this is helpful. |
|
The thread also showed the motivation for this feature. Essentially:
|
Kubectl diff uses
KUBECTL_EXTERNAL_COMMANDfor diffing when it is set. Tanka useskubectl diffwhen diffing existing k8s resources. But it uses standarddifffor newly created or destroyed resources.For consistency, we want Tanka to respect the
KUBECTL_EXTERNAL_COMMANDenv variable when doing static diffs.Thread in Grafana Labs Slack: https://grafana.slack.com/archives/CPPEN0KMH/p1619600657038100?thread_ts=1618844404.031100&cid=CPPEN0KMH
Handling of
KUBECTL_EXTERNAL_DIFFwas picked up fromkubectlitself to achieve the exactly same behavior.Both Tanka and Kubernetes is released as Apache 2.0 so this should be okay. But IANAL.
I wanted to use
kubectl-neat-diffto test this but it can't accept files as arguments - it expects directories.I'm not sure if it's a good idea to work around
kubectl-neat-diffby preparing directories for it in Tanka.