Update Program.cs (#240)

This commit is contained in:
Daniel Semedo
2019-02-13 03:40:09 -02:00
committed by Kubernetes Prow Robot
parent 9f1669b0cb
commit a349292fc2

View File

@@ -20,12 +20,12 @@ namespace patch
var name = pod.Metadata.Name;
PrintLabels(pod);
var newlables = new Dictionary<string, string>(pod.Metadata.Labels)
var newlabels = new Dictionary<string, string>(pod.Metadata.Labels)
{
["test"] = "test"
};
var patch = new JsonPatchDocument<V1Pod>();
patch.Replace(e => e.Metadata.Labels, newlables);
patch.Replace(e => e.Metadata.Labels, newlabels);
client.PatchNamespacedPod(new V1Patch(patch), name, "default");
PrintLabels(client.ReadNamespacedPod(name, "default"));