parent
							
								
									b3ebd4cdd0
								
							
						
					
					
						commit
						0c8a89cbaf
					
				| 
						 | 
					@ -8,6 +8,7 @@ import (
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"go.uber.org/zap"
 | 
						"go.uber.org/zap"
 | 
				
			||||||
	"go.uber.org/zap/zapcore"
 | 
						"go.uber.org/zap/zapcore"
 | 
				
			||||||
 | 
						"sync"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
| 
						 | 
					@ -20,6 +21,7 @@ type execer struct {
 | 
				
			||||||
	logger          *zap.SugaredLogger
 | 
						logger          *zap.SugaredLogger
 | 
				
			||||||
	kubeContext     string
 | 
						kubeContext     string
 | 
				
			||||||
	extra           []string
 | 
						extra           []string
 | 
				
			||||||
 | 
						decryptionMutex sync.Mutex
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func NewLogger(writer io.Writer, logLevel string) *zap.SugaredLogger {
 | 
					func NewLogger(writer io.Writer, logLevel string) *zap.SugaredLogger {
 | 
				
			||||||
| 
						 | 
					@ -101,6 +103,10 @@ func (helm *execer) ReleaseStatus(name string) error {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (helm *execer) DecryptSecret(name string) (string, error) {
 | 
					func (helm *execer) DecryptSecret(name string) (string, error) {
 | 
				
			||||||
 | 
						// Prevents https://github.com/roboll/helmfile/issues/258
 | 
				
			||||||
 | 
						helm.decryptionMutex.Lock()
 | 
				
			||||||
 | 
						defer helm.decryptionMutex.Unlock()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	helm.logger.Infof("Decrypting secret %v", name)
 | 
						helm.logger.Infof("Decrypting secret %v", name)
 | 
				
			||||||
	out, err := helm.exec(append([]string{"secrets", "dec", name})...)
 | 
						out, err := helm.exec(append([]string{"secrets", "dec", name})...)
 | 
				
			||||||
	helm.write(out)
 | 
						helm.write(out)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue