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