From c9e28d25b285d558d1bee50548eb20799ff37278 Mon Sep 17 00:00:00 2001 From: clok Date: Thu, 11 Jan 2024 16:05:41 -0600 Subject: [PATCH 1/2] chore(ci): bump go version and all CI actions Signed-off-by: clok --- .github/workflows/lint.yml | 6 ++--- .github/workflows/release.yml | 10 +++---- .github/workflows/test.yml | 10 +++---- .github/workflows/warm.yaml | 2 +- .golangci.yml | 14 ++++++++++ go.mod | 24 +++++++++++++---- go.sum | 50 ++++++++++++++++++++--------------- 7 files changed, 76 insertions(+), 40 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5e4f357..5935ce0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,10 +3,10 @@ on: [ push, pull_request ] jobs: golangci: name: lint - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.38 + version: v1.55 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4db595a..6c154ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,24 +6,24 @@ on: - '*' env: - GO_VERSION: "1.16" + GO_VERSION: "1.18" jobs: goreleaser: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v5 with: version: latest args: release --rm-dist diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c149a0..f1a7a37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,20 +2,20 @@ on: [push, pull_request] name: test and build env: - GO_VERSION: "1.16" + GO_VERSION: "1.18" jobs: coverage: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Install Go if: success() - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Calc coverage run: | @@ -29,7 +29,7 @@ jobs: outfile: coverage.lcov - name: Coveralls - uses: coverallsapp/github-action@v1.1.2 + uses: coverallsapp/github-action@v2.2.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: coverage.lcov \ No newline at end of file diff --git a/.github/workflows/warm.yaml b/.github/workflows/warm.yaml index 1ef18db..1c9d447 100644 --- a/.github/workflows/warm.yaml +++ b/.github/workflows/warm.yaml @@ -9,7 +9,7 @@ on: jobs: build: name: Renew documentation - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Pull new module version uses: clok/go-proxy-pull-action@master \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index 848c27e..ef7150f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -19,3 +19,17 @@ linters: - golint - misspell - unconvert + +linters-settings: + depguard: + rules: + prevent_unmaintained_packages: + list-mode: lax # allow unless explicitely denied + files: + - $all + - "!$test" + allow: + - $gostd + - 'github.com/clok' + - 'github.com/urfave/cli/v2' + - 'github.com/cpuguy83/go-md2man/v2' diff --git a/go.mod b/go.mod index 5d4ccb7..fb40f7f 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,24 @@ module github.com/clok/cdocs -go 1.16 +go 1.18 require ( - github.com/clok/kemba v1.1.1 - github.com/cpuguy83/go-md2man/v2 v2.0.0 - github.com/stretchr/testify v1.7.0 - github.com/urfave/cli/v2 v2.3.0 + github.com/clok/kemba v1.2.1 + github.com/cpuguy83/go-md2man/v2 v2.0.3 + github.com/stretchr/testify v1.8.4 + github.com/urfave/cli/v2 v2.27.1 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gookit/color v1.5.4 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect + github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + golang.org/x/sys v0.10.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index b38c48f..45f4366 100644 --- a/go.sum +++ b/go.sum @@ -1,38 +1,46 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/clok/kemba v1.1.1 h1:s1G0dd7NrScBuYcBHQNzPJ1u3q/herMuY9VGYFSleTA= -github.com/clok/kemba v1.1.1/go.mod h1:rsYZSVvRq+nopEvJpMRWDV+pbg4pUKMtXjAuTLHAENQ= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/clok/kemba v1.2.1 h1:neHepMFYBCESM2jU6hJmadYBvyaGfcROYm/5psmuOXE= +github.com/clok/kemba v1.2.1/go.mod h1:WHVKL81OR2r4ELeG10aMRa2PiGqFYY2zYiCy9VnXIqY= +github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gookit/color v1.3.8 h1:w2WcSwaCa1ojRWO60Mm4GJUJomBNKR9G+x9DwaaCL1c= -github.com/gookit/color v1.3.8/go.mod h1:R3ogXq2B9rTbXoSHJ1HyUVAZ3poOJHpd9nQmyGZsfvQ= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= +github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= +github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From d43c1c407d3fb5651ecbc2b7ef9badc6b0fd254d Mon Sep 17 00:00:00 2001 From: clok Date: Thu, 11 Jan 2024 16:30:06 -0600 Subject: [PATCH 2/2] fix: broken tests Signed-off-by: clok --- .github/workflows/test.yml | 2 +- cdocs.go | 3 +- cdocs_test.go | 5 +- data/test.man | 128 ++++++++++++++++--------------------- 4 files changed, 60 insertions(+), 78 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1a7a37..1820dc3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: go test -v -covermode=count -coverprofile=coverage.out -run ^Test_ - name: Convert coverage to lcov - uses: jandelgado/gcov2lcov-action@v1.0.8 + uses: jandelgado/gcov2lcov-action@v1.0.9 with: infile: coverage.out outfile: coverage.lcov diff --git a/cdocs.go b/cdocs.go index 8f8ccde..887fc71 100644 --- a/cdocs.go +++ b/cdocs.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "os" "path/filepath" "runtime" @@ -114,7 +113,7 @@ func InstallManpageCommand(opts *InstallManpageCommandInput) (*cli.Command, erro mp, _ := ToMan(c.App) manpath := filepath.Join(path, fmt.Sprintf("%s.8", name)) kman.Printf("generated man page path: %s", manpath) - err := ioutil.WriteFile(manpath, []byte(mp), 0644) + err := os.WriteFile(manpath, []byte(mp), 0644) if err != nil { return cli.Exit(fmt.Sprintf("Unable to install man page: %e", err), 2) } diff --git a/cdocs_test.go b/cdocs_test.go index 86458b9..8c0c2fb 100644 --- a/cdocs_test.go +++ b/cdocs_test.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/stretchr/testify/assert" "github.com/urfave/cli/v2" - "io/ioutil" "os" "testing" "time" @@ -317,7 +316,7 @@ func Test_ToMarkdown(t *testing.T) { res, err := ToMarkdown(app) - data, _ := ioutil.ReadFile("data/test.md") + data, _ := os.ReadFile("data/test.md") is.Nil(err) is.Equal(res, string(data)) @@ -330,7 +329,7 @@ func Test_ToMan(t *testing.T) { res, err := ToMan(app) - data, _ := ioutil.ReadFile("data/test.man") + data, _ := os.ReadFile("data/test.man") is.Nil(err) is.Equal(res, string(data)) diff --git a/data/test.man b/data/test.man index aa352fe..b21a857 100644 --- a/data/test.man +++ b/data/test.man @@ -1,48 +1,48 @@ .nh -.TH test\-app 8 +.TH test-app 8 .SH NAME .PP -test\-app \- interact with config map and secret manager variables +test-app - interact with config map and secret manager variables .SH SYNOPSIS .PP -test\-app +test-app .SH COMMAND TREE .RS .IP \(bu 2 env, e -\[la]#env-e\[ra] +\[la]#env\-e\[ra] .RS .IP \(bu 2 diff, d -\[la]#diff-d\[ra] +\[la]#diff\-d\[ra] .RS .IP \(bu 2 namespace, ns -\[la]#namespace-ns\[ra] +\[la]#namespace\-ns\[ra] .IP \(bu 2 ansible, legacy -\[la]#ansible-legacy\[ra] +\[la]#ansible\-legacy\[ra] .RE .IP \(bu 2 view, v -\[la]#view-v\[ra] +\[la]#view\-v\[ra] .RS .IP \(bu 2 configmap, c -\[la]#configmap-c\[ra] +\[la]#configmap\-c\[ra] .IP \(bu 2 ansible, legacy -\[la]#ansible-legacy\[ra] +\[la]#ansible\-legacy\[ra] .IP \(bu 2 namespace, ns -\[la]#namespace-ns\[ra] +\[la]#namespace\-ns\[ra] .RE @@ -61,21 +61,17 @@ get .IP \(bu 2 version, v -\[la]#version-v\[ra] +\[la]#version\-v\[ra] .RE .PP \fBUsage\fP: -.PP -.RS +.EX +test-app [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] -.nf -test\-app [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] - -.fi -.RE +.EE .SH COMMANDS @@ -91,21 +87,18 @@ Print out detailed diff reports comparing local and running Pod .PP View diff of local vs. namespace -.PP -.RS - -.nf -View the diff of the local ansible\-vault encrypted Kubenetes Secret file +.EX +View the diff of the local ansible-vault encrypted Kubenetes Secret file against a given dotenv file on a pod within a namespace. The local file will use the contents of the 'data.' block. This defaults to 'data..env'. -Supported ansible\-vault encryption version: $ANSIBLE\_VAULT;1.1;AES256 +Supported ansible-vault encryption version: $ANSIBLE_VAULT;1.1;AES256 Example file structure of decrypted file: -\-\-\- +--- apiVersion: v1 kind: Secret type: Opaque @@ -115,51 +108,47 @@ data: It will then grab contents of the dotenv filr on a Pod in a given Namespace. This defaults to inspecting the '$PWD/.env on' when executing a 'cat' command. -This method uses '/bin/bash \-c' as the base command to perform inspection. +This method uses '/bin/bash -c' as the base command to perform inspection. -.fi -.RE +.EE .PP -\fB\-\-cmd\fP="": Command to inspect (default: node) +\fB--cmd\fP="": Command to inspect (default: node) .PP -\fB\-\-configmap, \-c\fP="": Path to configmap.yaml +\fB--configmap, -c\fP="": Path to configmap.yaml .PP -\fB\-\-exclude\fP="": List (csv) of specific env vars to exclude values from display. Set to \fB\fC""\fR to remove any exclusions. (default: PATH,SHLVL,HOSTNAME) +\fB--exclude\fP="": List (csv) of specific env vars to exclude values from display. Set to \fB""\fR to remove any exclusions. (default: PATH,SHLVL,HOSTNAME) .PP -\fB\-\-filter\-prefix, \-f\fP="": List of prefixes (csv) used to filter values from display. Set to \fB\fC""\fR to remove any filters. (default: npm\fI,KUBERNETES\fP,API\_PORT) +\fB--filter-prefix, -f\fP="": List of prefixes (csv) used to filter values from display. Set to \fB""\fR to remove any filters. (default: npm\fI,KUBERNETES\fP,API_PORT) .PP -\fB\-\-namespace, \-n\fP="": Kube Namespace to list Pods from for inspection +\fB--namespace, -n\fP="": Kube Namespace to list Pods from for inspection .PP -\fB\-\-secret\-suffix\fP="": Suffix used to find ENV variables that denote the Secret Manager Secrets to lookup (default: \_NAME) +\fB--secret-suffix\fP="": Suffix used to find ENV variables that denote the Secret Manager Secrets to lookup (default: _NAME) .PP -\fB\-\-secrets, \-s\fP="": Path to secrets.yml (default: .docker/secrets.yml) +\fB--secrets, -s\fP="": Path to secrets.yml (default: .docker/secrets.yml) .SS ansible, legacy .PP View diff of local (ansible encrypted) vs. namespace -.PP -.RS - -.nf -View the diff of the local ansible\-vault encrypted Kubenetes Secret file +.EX +View the diff of the local ansible-vault encrypted Kubenetes Secret file against a given dotenv file on a pod within a namespace. The local file will use the contents of the 'data.' block. This defaults to 'data..env'. -Supported ansible\-vault encryption version: $ANSIBLE\_VAULT;1.1;AES256 +Supported ansible-vault encryption version: $ANSIBLE_VAULT;1.1;AES256 Example file structure of decrypted file: -\-\-\- +--- apiVersion: v1 kind: Secret type: Opaque @@ -169,25 +158,24 @@ data: It will then grab contents of the dotenv filr on a Pod in a given Namespace. This defaults to inspecting the '$PWD/.env on' when executing a 'cat' command. -This method uses '/bin/bash \-c' as the base command to perform inspection. +This method uses '/bin/bash -c' as the base command to perform inspection. -.fi -.RE +.EE .PP -\fB\-\-accessor, \-a\fP="": Accessor key to pull data out of Data block. (default: .env) +\fB--accessor, -a\fP="": Accessor key to pull data out of Data block. (default: .env) .PP -\fB\-\-dotenv\fP="": Path to \fB\fC\&.env\fR file on Pod (default: $PWD/.env) +\fB--dotenv\fP="": Path to \fB\&.env\fR file on Pod (default: $PWD/.env) .PP -\fB\-\-encrypted\-env\-file, \-e\fP="": Path to encrypted Kube Secret file +\fB--encrypted-env-file, -e\fP="": Path to encrypted Kube Secret file .PP -\fB\-\-namespace, \-n\fP="": Kube Namespace list Pods from for inspection +\fB--namespace, -n\fP="": Kube Namespace list Pods from for inspection .PP -\fB\-\-vault\-password\-file\fP="": vault password file \fB\fCVAULT\_PASSWORD\_FILE\fR +\fB--vault-password-file\fP="": vault password file \fBVAULT_PASSWORD_FILE\fR .SS view, v .PP @@ -206,17 +194,17 @@ A single line of UsageText .RE .PP -\fB\-\-configmap, \-c\fP="": Path to configmap.yaml +\fB--configmap, -c\fP="": Path to configmap.yaml .PP -\fB\-\-secret\-suffix\fP="": Suffix used to find ENV variables that denote the Secret Manager Secrets to lookup (default: \_NAME) +\fB--secret-suffix\fP="": Suffix used to find ENV variables that denote the Secret Manager Secrets to lookup (default: _NAME) .PP -\fB\-\-secrets, \-s\fP="": Path to secrets.yml (default: .docker/secrets.yml) +\fB--secrets, -s\fP="": Path to secrets.yml (default: .docker/secrets.yml) .SS ansible, legacy .PP -View env values from ansible\-vault encrypted Secret file. +View env values from ansible-vault encrypted Secret file. .PP .RS @@ -227,33 +215,30 @@ A single line of UsageText .RE .PP -\fB\-\-accessor, \-a\fP="": Accessor key to pull data out of Data block. (default: .env) +\fB--accessor, -a\fP="": Accessor key to pull data out of Data block. (default: .env) .PP -\fB\-\-encrypted\-env\-file, \-e\fP="": Path to encrypted Kube Secret file +\fB--encrypted-env-file, -e\fP="": Path to encrypted Kube Secret file .PP -\fB\-\-vault\-password\-file\fP="": vault password file \fB\fCVAULT\_PASSWORD\_FILE\fR +\fB--vault-password-file\fP="": vault password file \fBVAULT_PASSWORD_FILE\fR .SS namespace, ns .PP Interact with env on a running Pod within a Namespace -.PP -.RS - -.nf -View the diff of the local ansible\-vault encrypted Kubenetes Secret file +.EX +View the diff of the local ansible-vault encrypted Kubenetes Secret file against a given dotenv file on a pod within a namespace. The local file will use the contents of the 'data.' block. This defaults to 'data..env'. -Supported ansible\-vault encryption version: $ANSIBLE\_VAULT;1.1;AES256 +Supported ansible-vault encryption version: $ANSIBLE_VAULT;1.1;AES256 Example file structure of decrypted file: -\-\-\- +--- apiVersion: v1 kind: Secret type: Opaque @@ -263,22 +248,21 @@ data: It will then grab contents of the dotenv filr on a Pod in a given Namespace. This defaults to inspecting the '$PWD/.env on' when executing a 'cat' command. -This method uses '/bin/bash \-c' as the base command to perform inspection. +This method uses '/bin/bash -c' as the base command to perform inspection. -.fi -.RE +.EE .PP -\fB\-\-cmd\fP="": Command to inspect (default: node) +\fB--cmd\fP="": Command to inspect (default: node) .PP -\fB\-\-exclude\fP="": List (csv) of specific env vars to exclude values from display. Set to \fB\fC""\fR to remove any exclusions. (default: PATH,SHLVL,HOSTNAME) +\fB--exclude\fP="": List (csv) of specific env vars to exclude values from display. Set to \fB""\fR to remove any exclusions. (default: PATH,SHLVL,HOSTNAME) .PP -\fB\-\-filter\-prefix, \-f\fP="": List of prefixes (csv) used to filter values from display. Set to \fB\fC""\fR to remove any filters. (default: npm\fI,KUBERNETES\fP,API\_PORT) +\fB--filter-prefix, -f\fP="": List of prefixes (csv) used to filter values from display. Set to \fB""\fR to remove any filters. (default: npm\fI,KUBERNETES\fP,API_PORT) .PP -\fB\-\-namespace, \-n\fP="": Kube Namespace list Pods from +\fB--namespace, -n\fP="": Kube Namespace list Pods from .SH s3 .PP