diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 9032e2ff3..688d05b21 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -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}} @@ -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}} diff --git a/chart/values.yaml b/chart/values.yaml index 582e07858..3adea1544 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -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: diff --git a/cmd/root.go b/cmd/root.go index 1fbb0697f..d412a0d87 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -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") }