Skip to content

Commit 368b638

Browse files
authored
Add support for remote discovery (#11224)
Adds support for remote discovery to the destination controller. When the destination controller gets a `Get` request for a Service with the `multicluster.linkerd.io/remote-discovery` label, this is an indication that the destination controller should discover the endpoints for this service from a remote cluster. The destination controller will look for a remote cluster which has been linked to it (using the `linkerd multicluster link` command) with that name. It will look at the `multicluster.linkerd.io/remote-discovery` label for the service name to look up in that cluster. It then streams back the endpoint data for that remote service. Since we now have multiple client-go informers for the same resource types (one for the local cluster and one for each linked remote cluster) we add a `cluster` label onto the prometheus metrics for the informers and EndpointWatchers to ensure that each of these components' metrics are correctly tracked and don't overwrite each other. --------- Signed-off-by: Alex Leong <[email protected]>
1 parent 49f9a61 commit 368b638

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1097
-145
lines changed

charts/linkerd-control-plane/templates/destination-rbac.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,42 @@ subjects:
264264
- kind: ServiceAccount
265265
name: linkerd-destination
266266
namespace: {{.Release.Namespace}}
267+
---
268+
apiVersion: rbac.authorization.k8s.io/v1
269+
kind: Role
270+
metadata:
271+
name: remote-discovery
272+
namespace: {{.Release.Namespace}}
273+
labels:
274+
app.kubernetes.io/part-of: Linkerd
275+
linkerd.io/control-plane-component: destination
276+
linkerd.io/control-plane-ns: {{.Release.Namespace}}
277+
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
278+
rules:
279+
- apiGroups:
280+
- ""
281+
resources:
282+
- secrets
283+
verbs:
284+
- get
285+
- list
286+
- watch
287+
---
288+
apiVersion: rbac.authorization.k8s.io/v1
289+
kind: RoleBinding
290+
metadata:
291+
name: linkerd-destination-remote-discovery
292+
namespace: {{.Release.Namespace}}
293+
labels:
294+
app.kubernetes.io/part-of: Linkerd
295+
linkerd.io/control-plane-component: destination
296+
linkerd.io/control-plane-ns: {{.Release.Namespace}}
297+
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
298+
roleRef:
299+
apiGroup: rbac.authorization.k8s.io
300+
kind: Role
301+
name: remote-discovery
302+
subjects:
303+
- kind: ServiceAccount
304+
name: linkerd-destination
305+
namespace: {{.Release.Namespace}}

cli/cmd/testdata/install_controlplane_tracing_output.golden

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_custom_domain.golden

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_custom_registry.golden

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_default.golden

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_default_override_dst_get_nets.golden

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_default_token.golden

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_ha_output.golden

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/cmd/testdata/install_ha_with_overrides_output.golden

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)