-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make service mirror controller per target cluster #4710
Merged
+1,476
−2,518
Merged
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c244df0
Add Link CRD
adleong 8782484
Move service mirror to link command
adleong c5fa0e5
Service mirror can read Link object
adleong 127f3f0
Basic service mirroring functionality works
adleong 0dedf33
cleanup
adleong f03e6ef
Gateway metrics now working
adleong a7a8b86
Update multicluster checks
adleong 6876595
Update integration tests
adleong a913f8f
Integration tests pass
adleong 7a60e70
Cherry-pick PR #4740 to pick up fix for clusters that don't support e…
adleong bf489b2
Review feedback
adleong 474b083
Resolve merge conflicts
adleong f4f62e7
Fix assignment to nil map
adleong d4fc5ee
Add --registry flag to multicluster link command
adleong cb24531
Restart link watches
adleong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it is worth getting rid of this retry mechanism alltogether. Frankly in practice I have not seen it pull its weight. I think this was a bit of overengineering on my end. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this refactor mostly didn't touch the event processing loop. we can think about removing it, but I don't think that change has to be tied to this refactor.