Skip to content

Commit

Permalink
Comment for the DisableExternalProfiles option
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sim <[email protected]>
  • Loading branch information
Ivan Sim committed Mar 26, 2019
1 parent 5822eea commit 0b7c992
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cli/cmd/inject.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ func (options *injectOptions) fetchConfigsOrDefault() (*config.All, error) {
return api.Config(context.Background(), &public.Empty{})
}

// overrideConfigs uses command-line overrides to update the provided configs
// overrideConfigs uses command-line overrides to update the provided configs.
// the overrideAnnotations map keeps track of which config are overridden, by
// storing the corresponding annotations and values.
func (options *injectOptions) overrideConfigs(configs *config.All, overrideAnnotations map[string]string) {
if len(options.ignoreInboundPorts) > 0 {
configs.Proxy.IgnoreInboundPorts = toPorts(options.ignoreInboundPorts)
Expand Down Expand Up @@ -344,6 +346,9 @@ func (options *injectOptions) overrideConfigs(configs *config.All, overrideAnnot
overrideAnnotations[k8s.ProxyLogLevelAnnotation] = options.proxyLogLevel
}

// keep track of this option because its true/false value results in different
// values being assigned to the LINKERD2_PROXY_DESTINATION_PROFILE_SUFFIXES
// env var. Its annotation is added only if its value is true.
configs.Proxy.DisableExternalProfiles = options.disableExternalProfiles
if options.disableExternalProfiles {
overrideAnnotations[k8s.ProxyDisableExternalProfilesAnnotation] = "true"
Expand Down

0 comments on commit 0b7c992

Please sign in to comment.