From eb036aeb2ab88a0cca75a0f2b16a8d80345a6ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20N=C3=A4gele?= Date: Mon, 15 Feb 2021 23:41:17 +0100 Subject: [PATCH] Use create --save-config=false (#9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Reinhard Nägele --- .github/workflows/ci.yaml | 7 +++---- go.mod | 2 +- main.go | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 68873bc..32fc6f8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,11 +16,11 @@ jobs: uses: actions/checkout@v1 - name: Setup Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2 with: - go-version: "1.14" + go-version: 1.15 - - uses: actions/cache@v1 + - uses: actions/cache@v2 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -30,7 +30,6 @@ jobs: - name: Install tools run: | ./setup.sh - echo "::add-path::$(go env GOPATH)/bin" - name: Check License Headers run: mage -v checkLicenseHeaders diff --git a/go.mod b/go.mod index bdc1924..dcc46f0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/craftypath/kubectl-sops -go 1.14 +go 1.15 require ( github.com/craftypath/sops-operator v0.7.0 diff --git a/main.go b/main.go index 72f5e74..12dae74 100644 --- a/main.go +++ b/main.go @@ -111,7 +111,7 @@ func applySopsSecret(config *config, sopsSecret *v1alpha1.SopsSecret) error { } args := []string{ - "apply", + "create", "--save-config=false", } if config.dryRun { if config.dryRunType != "" { @@ -208,7 +208,6 @@ func parseArgs(args []string) *config { config.dryRun = true if submatch[1] != "" { config.dryRunType = submatch[1] - continue } else { if len(args) > i+1 { nextArg := args[i+1] @@ -217,8 +216,8 @@ func parseArgs(args []string) *config { i++ } } - continue } + continue } config.kubectlArgs = append(config.kubectlArgs, arg)