forked from linkerd/linkerd2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make service mirror controller per target cluster (linkerd#4710)
This PR removes the service mirror controller from `linkerd mc install` to `linkerd mc link`, as described in linkerd/rfc#31. For fuller context, please see that RFC. Basic multicluster functionality works here including: * `linkerd mc install` installs the Link CRD but not any service mirror controllers * `linkerd mc link` creates a Link resource and installs a service mirror controller which uses that Link * The service mirror controller creates and manages mirror services, a gateway mirror, and their endpoints. * The `linkerd mc gateways` command lists all linked target clusters, their liveliness, and probe latences. * The `linkerd check` multicluster checks have been updated for the new architecture. Several checks have been rendered obsolete by the new architecture and have been removed. The following are known issues requiring further work: * the service mirror controller uses the existing `mirror.linkerd.io/gateway-name` and `mirror.linkerd.io/gateway-ns` annotations to select which services to mirror. it does not yet support configuring a label selector. * an unlink command is needed for removing multicluster links: see linkerd#4707 * an mc uninstall command is needed for uninstalling the multicluster addon: see linkerd#4708 Signed-off-by: Alex Leong <[email protected]> Signed-off-by: Eric Solomon <[email protected]>
- Loading branch information
Showing
33 changed files
with
1,476 additions
and
2,518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
OWNERS | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
appVersion: edge-XX.X.X | ||
description: A helm chart containing the resources to enable mirroring of services from a remote cluster | ||
kubeVersion: ">=1.13.0-0" | ||
icon: https://linkerd.io/images/logo-only-200h.png | ||
name: "linkerd2-multicluster-link" | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
# Linkerd2-multicluster-link Helm Chart | ||
|
||
Linkerd is a *service mesh*, designed to give platform-wide observability, | ||
reliability, and security without requiring configuration or code changes. This | ||
chart provides the components needed to enable communication between clusters. | ||
|
||
## Configuration | ||
|
||
The following table lists the configurable parameters of the | ||
linkerd2-multicluster chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
|---------------------------------|---------------------------------------------------------------------------------------------|----------------------------------------------| | ||
|`controllerComponentLabel` | Control plane label. Do not edit |`linkerd.io/control-plane-component` | | ||
|`controllerImage` | Docker image for the Service mirror component (uses the Linkerd controller image) |`gcr.io/linkerd-io/controller` | | ||
|`controllerImageVersion` | Tag for the Service Mirror container Docker image |`latest version` | | ||
|`createdByAnnotation` | Annotation label for the proxy create. Do not edit. |`linkerd.io/created-by` | | ||
|`gateway` | If the gateway component should be installed |`true` | | ||
|`gatewayLocalProbePath` | The path that will be used by the local liveness checks to ensure the gateway is alive |`/health-local` | | ||
|`gatewayLocalProbePort` | The port that will be used by the local liveness checks to ensure the gateway is alive |`8888` | | ||
|`gatewayName` | The name of the gateway that will be installed |`linkerd-gateway` | | ||
|`gatewayNginxImage` | The Nginx image |`nginx` | | ||
|`gatewayNginxImageVersion` | The version of the Nginx image |`1.17` | | ||
|`gatewayPort` | The port on which all the gateway will accept incoming traffic |`4143` | | ||
|`gatewayProbePath` | The path that will be used by remote clusters for determining whether the gateway is alive |`/health` | | ||
|`gatewayProbePort` | The port used for liveliness probing |`4181` | | ||
|`gatewayProbeSeconds` | The interval (in seconds) between liveness probes |`3` | | ||
|`identityTrustDomain` | Trust domain used for identity of the existing linkerd installation |`cluster.local` | | ||
|`installNamespace` | If the namespace should be installed |`true` | | ||
|`linkerdNamespace` | The namespace of the existing Linkerd installation |`linkerd` | | ||
|`linkerdVersion` | Control plane version | latest version | | ||
|`namespace` | Service Mirror component namespace |`linkerd-multicluster` | | ||
|`proxyOutboundPort` | The port on which the proxy accepts outbound traffic |`4140` | | ||
|`remoteMirrorServiceAccountName` | The name of the service account used to allow remote clusters to mirror local services |`linkerd-service-mirror-remote-access-default`| | ||
|`remoteMirrorServiceAccount` | If the remote mirror service account should be installed |`true` | | ||
|`serviceMirror` | If the service mirror component should be installed |`true` | | ||
|`logLevel` | Log level for the Multicluster components |`info` | | ||
|`serviceMirrorRetryLimit` | Number of times update from the remote cluster is allowed to be requeued (retried) |`3` | | ||
|`serviceMirrorUID` | User id under which the Service Mirror shall be ran |`2103` | |
14 changes: 14 additions & 0 deletions
14
charts/linkerd2-multicluster-link/templates/gateway-mirror.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: probe-gateway-{{.Values.targetClusterName}} | ||
namespace: {{.Values.namespace}} | ||
labels: | ||
mirror.linkerd.io/mirrored-gateway: "true" | ||
mirror.linkerd.io/cluster-name: {{.Values.targetClusterName}} | ||
spec: | ||
ports: | ||
- name: mc-probe | ||
port: {{.Values.gatewayProbePort}} | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
controllerComponentLabel: linkerd.io/control-plane-component | ||
controllerImage: gcr.io/linkerd-io/controller | ||
controllerImageVersion: linkerdVersionValue | ||
createdByAnnotation: linkerd.io/created-by | ||
gatewayProbePort: 4181 | ||
namespace: linkerd-multicluster | ||
logLevel: info | ||
serviceMirrorRetryLimit: 3 | ||
serviceMirrorUID: 2103 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: v1 | ||
appVersion: edge-XX.X.X | ||
description: A helm chart containing the resources to enable mirroring of services on remote clusters | ||
description: A helm chart containing the resources to support multicluster linking to remote clusters | ||
kubeVersion: ">=1.13.0-0" | ||
icon: https://linkerd.io/images/logo-only-200h.png | ||
name: "linkerd2-multicluster" | ||
version: 0.1.0 | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
### | ||
### Link CRD | ||
### | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: links.multicluster.linkerd.io | ||
annotations: | ||
{{.Values.createdByAnnotation}}: {{default (printf "linkerd/helm %s" .Values.linkerdVersion) .Values.cliVersion}} | ||
spec: | ||
group: multicluster.linkerd.io | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true | ||
scope: Namespaced | ||
names: | ||
plural: links | ||
singular: link | ||
kind: Link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.