Skip to content

Commit 8209627

Browse files
authored
fix: remove trailing whitespace and newlines from type and auth type (#543)
* fix: remove trailing whitespace and newlines from type and auth type * chore: prepare for 1.16.2 release
1 parent 6f4a0f5 commit 8209627

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

Diff for: docs/installation.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ spec:
8080
# Note the lack of the `v` prefix unlike the git tag
8181
env:
8282
- name: AVP_VERSION
83-
value: "1.16.1"
83+
value: "1.16.2"
8484
args:
8585
- >-
8686
wget -O argocd-vault-plugin
@@ -115,7 +115,7 @@ RUN apt-get update && \
115115
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
116116

117117
# Install the AVP plugin (as root so we can copy to /usr/local/bin)
118-
ENV AVP_VERSION=1.16.1
118+
ENV AVP_VERSION=1.16.2
119119
ENV BIN=argocd-vault-plugin
120120
RUN curl -L -o ${BIN} https://github.com/argoproj-labs/argocd-vault-plugin/releases/download/v${AVP_VERSION}/argocd-vault-plugin_${AVP_VERSION}_linux_amd64
121121
RUN chmod +x ${BIN}
@@ -190,7 +190,7 @@ spec:
190190
image: registry.access.redhat.com/ubi8
191191
env:
192192
- name: AVP_VERSION
193-
value: 1.16.1
193+
value: 1.16.2
194194
command: [sh, -c]
195195
args:
196196
- >-
@@ -274,7 +274,7 @@ RUN apt-get update && \
274274
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
275275
276276
# Install the AVP plugin (as root so we can copy to /usr/local/bin)
277-
ENV AVP_VERSION=1.16.1
277+
ENV AVP_VERSION=1.16.2
278278
ENV BIN=argocd-vault-plugin
279279
RUN curl -L -o ${BIN} https://github.com/argoproj-labs/argocd-vault-plugin/releases/download/v${AVP_VERSION}/argocd-vault-plugin_${AVP_VERSION}_linux_amd64
280280
RUN chmod +x ${BIN}

Diff for: manifests/cmp-configmap/argocd-repo-server-deploy.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
# Note the lack of the `v` prefix unlike the git tag
3030
env:
3131
- name: AVP_VERSION
32-
value: "1.16.1"
32+
value: "1.16.2"
3333
args:
3434
- >-
3535
wget -O argocd-vault-plugin

Diff for: manifests/cmp-sidecar/argocd-repo-server.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
image: registry.access.redhat.com/ubi8
2626
env:
2727
- name: AVP_VERSION
28-
value: 1.16.1
28+
value: 1.16.2
2929
command: [sh, -c]
3030
args:
3131
- >-

Diff for: pkg/config/config.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@ func New(v *viper.Viper, co *Options) (*Config, error) {
7272
utils.VerboseToStdErr("%s: %s\n", k, viperValue)
7373
}
7474

75-
authType := v.GetString(types.EnvAvpAuthType)
75+
authType := strings.TrimSpace(v.GetString(types.EnvAvpAuthType)) // strip whitespace and newlines
7676

7777
var auth types.AuthType
7878
var backend types.Backend
7979

80-
switch v.GetString(types.EnvAvpType) {
80+
backendType := strings.TrimSpace(v.GetString(types.EnvAvpType)) // strip whitespace and newlines
81+
82+
switch backendType {
8183
case types.VaultBackend:
8284
{
8385
apiClient, err := api.NewClient(api.DefaultConfig())

Diff for: pkg/config/config_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func TestNewConfig(t *testing.T) {
5454
},
5555
{
5656
map[string]interface{}{
57-
"AVP_TYPE": "vault",
57+
"AVP_TYPE": "vault\n",
5858
"AVP_AUTH_TYPE": "k8s",
5959
"AVP_K8S_ROLE": "role",
6060
},

0 commit comments

Comments
 (0)