MCPcopy Index your code
hub / github.com/databus23/helm-diff / writeExistingValues

Method writeExistingValues

cmd/helm.go:427–445  ·  view source on GitHub ↗
(f *os.File, all bool)

Source from the content-addressed store, hash-verified

425}
426
427func (d *diffCmd) writeExistingValues(f *os.File, all bool) error {
428 args := []string{"get", "values", d.release, "--output", "yaml"}
429 if all {
430 args = append(args, "--all")
431 }
432 if d.namespace != "" {
433 args = append(args, "--namespace", d.namespace)
434 }
435 if d.kubeContext != "" {
436 args = append(args, "--kube-context", d.kubeContext)
437 }
438 cmd := exec.Command(os.Getenv("HELM_BIN"), args...)
439 debugPrint("Executing %s", strings.Join(cmd.Args, " "))
440 defer func() {
441 _ = f.Close()
442 }()
443 cmd.Stdout = f
444 return cmd.Run()
445}
446
447func extractManifestFromHelmUpgradeDryRunOutput(s []byte, noHooks bool) []byte {
448 if len(s) == 0 {

Callers 1

templateMethod · 0.95

Calls 1

debugPrintFunction · 0.85

Tested by

no test coverage detected