Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ spec:
{{- with .Values.gateway.serviceExternalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- if (and $setNodePorts .Values.gateway.healthCheckNodePort) }}
healthCheckNodePort: {{ .Values.gateway.healthCheckNodePort }}
{{- end }}
{{- if .Values.gateway.loadBalancerClass }}
loadBalancerClass: {{ .Values.gateway.loadBalancerClass }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions multicluster/charts/linkerd-multicluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ gateway:
serviceType: LoadBalancer
# nodePort -- Set the gateway nodePort (for LoadBalancer or NodePort) to a specific value
# nodePort:
# healthCheckNodePort -- Set the healthCheckNodePort on the gateway service
# (only applicable when externalTrafficPolicy is set to Local and service type is LoadBalancer or NodePort)
# healthCheckNodePort:
probe:
# -- The path that will be used by remote clusters for determining whether the
# gateway is alive
Expand Down
2 changes: 2 additions & 0 deletions multicluster/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ A full list of configurable values can be found at https://github.com/linkerd/li
cmd.Flags().Uint32Var(&options.gateway.Probe.Port, "gateway-probe-port", options.gateway.Probe.Port, "The liveness check port of the gateway")
cmd.Flags().BoolVar(&options.remoteMirrorCredentials, "service-mirror-credentials", options.remoteMirrorCredentials, "Whether to install the service account which can be used by service mirror components in source clusters to discover exported services")
cmd.Flags().StringVar(&options.gateway.ServiceType, "gateway-service-type", options.gateway.ServiceType, "Overwrite Service type for gateway service")
cmd.Flags().Uint32Var(&options.gateway.HealthCheckNodePort, "gateway-healthcheck-nodeport", options.gateway.HealthCheckNodePort, "Set the healthCheckNodePort on the gateway service (only used when externalTrafficPolicy is Local)")
cmd.Flags().BoolVar(&ha, "ha", false, `Install multicluster extension in High Availability mode.`)
cmd.Flags().DurationVar(&wait, "wait", 300*time.Second, "Wait for core control-plane components to be available")
cmd.Flags().BoolVar(&ignoreCluster, "ignore-cluster", false,
Expand Down Expand Up @@ -253,6 +254,7 @@ func buildMulticlusterInstallValues(ctx context.Context, opts *multiclusterInsta
defaults.LinkerdVersion = version.Version
defaults.RemoteMirrorServiceAccount = opts.remoteMirrorCredentials
defaults.Gateway.ServiceType = opts.gateway.ServiceType
defaults.Gateway.HealthCheckNodePort = opts.gateway.HealthCheckNodePort

if ignoreCluster {
return defaults, nil
Expand Down
11 changes: 11 additions & 0 deletions multicluster/cmd/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ func TestRender(t *testing.T) {
nil,
"install_ha.golden",
},
{
map[string]interface{}{
"gateway": map[string]interface{}{
"serviceType": "LoadBalancer",
"serviceExternalTrafficPolicy": "Local",
"healthCheckNodePort": 30000,
},
},
nil,
"install_healthcheck_nodeport.golden",
},
}

for i, tc := range testCases {
Expand Down
Loading