Skip to content

Commit

Permalink
Merge pull request #1372 from flanksource/insecure-skip-verify
Browse files Browse the repository at this point in the history
feat: add upstream-insecure-skip-verify arg
  • Loading branch information
moshloop authored Oct 23, 2023
2 parents 3a618b3 + c4c814a commit b2acc04
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ spec:
{{- if .Values.upstream.password }}
- --upstream-password={{ .Values.upstream.password }}
{{- end}}
{{- if .Values.upstream.insecureSkipVerify}}
- --upstream-insecure-skip-verify=true
{{- end}}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down
1 change: 1 addition & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ upstream:
host: ""
user: ""
password: ""
insecureSkipVerify: false
# Alternative to inlining values, secret must contain: UPSTREAM_NAME, UPSTREAM_USER, UPSTREAM_PASSWORD & UPSTREAM_HOST
secretKeyRef:
name:
Expand Down
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func ServerFlags(flags *pflag.FlagSet) {
flags.StringVar(&canary.UpstreamConf.Username, "upstream-user", os.Getenv("UPSTREAM_USER"), "upstream username")
flags.StringVar(&canary.UpstreamConf.Password, "upstream-password", os.Getenv("UPSTREAM_PASSWORD"), "upstream password")
flags.StringVar(&canary.UpstreamConf.AgentName, "agent-name", os.Getenv("UPSTREAM_NAME"), "name of this agent")
flags.BoolVar(&canary.UpstreamConf.InsecureSkipVerify, "upstream-insecure-skip-verify", os.Getenv("UPSTREAM_INSECURE_SKIP_VERIFY") == "true", "Skip TLS verification on the upstream servers certificate")
}

func readFromEnv(v string) string {
Expand Down

0 comments on commit b2acc04

Please sign in to comment.