Minor fixes
This commit is contained in:
parent
8e7a8998d3
commit
cb8445666a
@ -117,16 +117,16 @@ func Sync(definedWorkdirPath, sshKeyPath string, conf *config.Config, dry bool,
|
||||
|
||||
for _, release := range conf.Releases {
|
||||
|
||||
// if len(diffArg) > 0 {
|
||||
// _, err := hh.PullChart(workdirPath, release.ToHelmReleaseData())
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// if err := hh.RenderChart(workdirPath, release.ToHelmReleaseData()); err != nil {
|
||||
// return err
|
||||
// }
|
||||
|
||||
// }
|
||||
// if len(diffArg) > 0 {
|
||||
// _, err := hh.PullChart(workdirPath, release.ToHelmReleaseData())
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// if err := hh.RenderChart(workdirPath, release.ToHelmReleaseData()); err != nil {
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
if err := release.ValuesHandler(configPath); err != nil {
|
||||
return err
|
||||
|
@ -344,6 +344,9 @@ func SyncValues(currentRelease, wishedRelease *release.Release, secDirPath strin
|
||||
|
||||
func SyncSecrets(currentRelease, wishedRelease *release.Release, workdirPath, sopsBin string) error {
|
||||
secretsDirPath := fmt.Sprintf("%s/src/secrets", workdirPath)
|
||||
if err := os.MkdirAll(secretsDirPath, os.ModePerm); err != nil {
|
||||
return err
|
||||
}
|
||||
if currentRelease != nil {
|
||||
for _, secrets := range currentRelease.DestSecrets {
|
||||
secretsFilePath := fmt.Sprintf("%s/%s", secretsDirPath, secrets.DestPath)
|
||||
@ -358,9 +361,6 @@ func SyncSecrets(currentRelease, wishedRelease *release.Release, workdirPath, so
|
||||
// Prepare a dir for secrets
|
||||
secretsFilePath := fmt.Sprintf("%s/%s", secretsDirPath, secrets.DestPath)
|
||||
logrus.Infof("trying to create secrets file: %s", secretsFilePath)
|
||||
if err := os.MkdirAll(secretsDirPath, os.ModePerm); err != nil {
|
||||
return err
|
||||
}
|
||||
var secretsFile *os.File
|
||||
if _, err := os.Stat(secretsFilePath); err == nil {
|
||||
secretsFile, err = os.Open(secretsFilePath)
|
||||
|
Loading…
Reference in New Issue
Block a user