Browse Source

Add support for `set` kubeyaml subcommand

Hidde Beydals 4 months ago
parent
commit
51bbd5da40
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      cluster/kubernetes/kubeyaml.go

+ 7
- 0
cluster/kubernetes/kubeyaml.go View File

@@ -26,6 +26,13 @@ func (k KubeYAML) Annotate(in []byte, ns, kind, name string, policies ...string)
26 26
 	return execKubeyaml(in, args)
27 27
 }
28 28
 
29
+// Set calls the kubeyaml subcommand `set` with the arguments given.
30
+func (k KubeYAML) Set(in []byte, ns, kind, name string, values ...string) ([]byte, error) {
31
+	args := []string{"set", "--namespace", ns, "--kind", kind, "--name", name}
32
+	args = append(args, values...)
33
+	return execKubeyaml(in, args)
34
+}
35
+
29 36
 func execKubeyaml(in []byte, args []string) ([]byte, error) {
30 37
 	cmd := exec.Command("kubeyaml", args...)
31 38
 	out := &bytes.Buffer{}

Loading…
Cancel
Save