-
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
Fix service mirror controller warnings for remote-discover services #11251
Conversation
@@ -894,6 +894,10 @@ func (rcsw *RemoteClusterServiceWatcher) Start(ctx context.Context) error { | |||
rcsw.log.Debugf("skipped processing endpoints object %s/%s: missing %s label", epNew.Namespace, epNew.Name, consts.DefaultExportedServiceSelector) | |||
return | |||
} | |||
if rcsw.isRemoteDiscovery(epNew.Labels) { |
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.
Do the endpoints of an exported service have the exported label on them? Typically, the user would only label the exported service. Does the endpoints controller copy this label to the endpoints or something like that?
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.
Yup, it appears labels are copied into the endpoints automatically:
$ k -n emojivoto expose pod web-8559b97f7c-pk6xq --port 80
service/web-8559b97f7c-pk6xq exposed
$ k -n emojivoto label svc/web-8559b97f7c-pk6xq mirror.linkerd.io/exported=remote-discovery
$ k -n emojivoto get ep web-8559b97f7c-pk6xq -ojson | jq .metadata.labels
{
"app": "web-svc",
"linkerd.io/control-plane-ns": "linkerd",
"linkerd.io/proxy-deployment": "web",
"linkerd.io/workload-ns": "emojivoto",
"mirror.linkerd.io/exported": "remote-discovery",
"pod-template-hash": "8559b97f7c",
"version": "v11"
}
Warnings were getting generated in the service mirror controller during repairEndpoints and when reacting to Endpoints updates on the target cluster. Fixed that, while refactored the `isRemoteDiscovery` function to be more generic.
9be6686
to
c99c550
Compare
This is a release candidate for stable-2.14.0; we encourage you to help trying it out! This edge release contains a number of improvements over the multi-cluster features introduced in the last edge release supporting flat networks. It also hardens the containers security stance by removing write access to the root filesystem. * Enhanced `linkerd multicluster link` to allow clusters to be linked without a gateway ([#11226]) * Added cluster store size gauge metric ([#11256]) * Disabled local traffic policy for remote discovery ([#11257]) * Fixed various innocuous multi-cluster warnings ([#11251], [#11246], [#11253]) * Set `readOnlyRootFilesystem: true` in all the containers, as they don't require write permissions ([#11221]; fixes [#11142]) (thanks @mikutas!)
This is a release candidate for stable-2.14.0; we encourage you to help trying it out! This edge release contains a number of improvements over the multi-cluster features introduced in the last edge release supporting flat networks. It also hardens the containers security stance by removing write access to the root filesystem. * Enhanced `linkerd multicluster link` to allow clusters to be linked without a gateway ([#11226]) * Added cluster store size gauge metric ([#11256]) * Disabled local traffic policy for remote discovery ([#11257]) * Fixed various innocuous multi-cluster warnings ([#11251], [#11246], [#11253]) * Set `readOnlyRootFilesystem: true` in all the containers, as they don't require write permissions ([#11221]; fixes [#11142]) (thanks @mikutas!)
Warnings were getting generated in the service mirror controller during repairEndpoints and when reacting to Endpoints updates on the target cluster. Fixed that, while refactored the
isRemoteDiscovery
function to be more generic.