mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-22 07:51:01 +02:00
feat: helmfile template (#284)
`helmfile template` runs `helm template` over releases within the helmfiles, and provide you a stream of generated yaml documents of Kubernetes resources via stdout. Resolves #283
This commit is contained in:
committed by
KUOKA Yusuke
parent
8a90e5320c
commit
93c5d4c219
+8
-1
@@ -6,9 +6,10 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"sync"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
"sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -143,6 +144,12 @@ func (helm *execer) DecryptSecret(name string) (string, error) {
|
||||
return tmpFile.Name(), err
|
||||
}
|
||||
|
||||
func (helm *execer) TemplateRelease(chart string, flags ...string) error {
|
||||
out, err := helm.exec(append([]string{"template", chart}, flags...)...)
|
||||
helm.write(out)
|
||||
return err
|
||||
}
|
||||
|
||||
func (helm *execer) DiffRelease(name, chart string, flags ...string) error {
|
||||
helm.logger.Infof("Comparing %v %v", name, chart)
|
||||
out, err := helm.exec(append([]string{"diff", "upgrade", "--allow-unreleased", name, chart}, flags...)...)
|
||||
|
||||
Reference in New Issue
Block a user