Skip to content

Commit

Permalink
Merge pull request #1660 from flanksource/agent-chart-updates
Browse files Browse the repository at this point in the history
chore: standardize agent chart values
  • Loading branch information
moshloop authored Feb 7, 2024
2 parents ffbf795 + 0bbe688 commit 654f7cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ spec:
- --{{$k}}={{$v}}
{{- end }}
{{- if .Values.upstream.enabled }}
- --agent-name={{ .Values.upstream.agentName }}
{{- if .Values.upstream.host }}
- --upstream-host={{ .Values.upstream.host }}
{{- end}}
Expand All @@ -151,6 +150,9 @@ spec:
{{- if .Values.upstream.password }}
- --upstream-password={{ .Values.upstream.password }}
{{- end}}
{{- if .Values.upstream.agentName }}
- --agent-name={{ .Values.upstream.agentName }}
{{- end}}
{{- if .Values.upstream.insecureSkipVerify}}
- --upstream-insecure-skip-verify=true
{{- end}}
Expand Down
4 changes: 2 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ data:

upstream:
enabled: false
agentName: default-agent
agentName: ""
host: ""
user: ""
password: ""
insecureSkipVerify: false
# Alternative to inlining values, secret must contain: UPSTREAM_NAME, UPSTREAM_USER, UPSTREAM_PASSWORD & UPSTREAM_HOST
# Alternative to inlining values, secret must contain: AGENT_NAME, UPSTREAM_USER, UPSTREAM_PASSWORD & UPSTREAM_HOST
secretKeyRef:
name:

Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func ServerFlags(flags *pflag.FlagSet) {
flags.StringVar(&canary.UpstreamConf.Host, "upstream-host", os.Getenv("UPSTREAM_HOST"), "central canary checker instance to push/pull canaries")
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.StringVar(&canary.UpstreamConf.AgentName, "agent-name", os.Getenv("AGENT_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")
}

Expand Down

0 comments on commit 654f7cd

Please sign in to comment.