new helm
This commit is contained in:
@@ -3,10 +3,11 @@ package run
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/pelotech/drone-helm3/internal/env"
|
||||
"io"
|
||||
"os"
|
||||
"text/template"
|
||||
|
||||
"github.com/pelotech/drone-helm3/internal/env"
|
||||
)
|
||||
|
||||
// InitKube is a step in a helm Plan that initializes the kubernetes config file.
|
||||
@@ -87,7 +88,7 @@ func (i *InitKube) Prepare() error {
|
||||
fmt.Fprintf(i.stderr, "kubeconfig file at %s\n", i.configFilename)
|
||||
}
|
||||
|
||||
i.configFile, err = os.Create(i.configFilename)
|
||||
i.configFile, err = os.OpenFile(i.configFilename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not open kubeconfig file for writing: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user