Skip to content

Commit

Permalink
stable-2.13.5 (#11041)
Browse files Browse the repository at this point in the history
This stable release fixes a memory leak in the multicluster extension and fixes
an issue where the proxy was failing certain requests when running in ingress
mode.

* Fixed a memory leak in the service mirror controller
* Fixed an issue where the proxy would fail requests that were missing the
  `l5d-dst-override` header when run in ingress mode

Signed-off-by: Alex Leong <[email protected]>
Co-authored-by: Alejandro Pedraza <[email protected]>
  • Loading branch information
adleong and alpeb authored Jun 22, 2023
1 parent dc18965 commit da70f77
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ jobs:
- rsa-ca
- helm-upgrade
- uninstall
- upgrade-edge
# - upgrade-edge
- upgrade-stable
continue-on-error: true
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion .proxy-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.203.0
v2.203.1
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changes

## stable-2.13.5

This stable release fixes a memory leak in the multicluster extension and fixes
an issue where the proxy was failing certain requests when running in ingress
mode.

* Fixed a memory leak in the service mirror controller
* Fixed an issue where the proxy would fail requests that were missing the
`l5d-dst-override` header when run in ingress mode

## stable-2.13.4

This stable release fixes a few issues in the proxy and in the outbound policy
Expand Down
2 changes: 1 addition & 1 deletion charts/linkerd-control-plane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
- name: partials
version: 0.1.0
repository: file://../partials
version: 1.12.4
version: 1.12.5
icon: https://linkerd.io/images/logo-only-200h.png
maintainers:
- name: Linkerd authors
Expand Down
2 changes: 1 addition & 1 deletion charts/linkerd-control-plane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Linkerd gives you observability, reliability, and security
for your microservices — with no code change required.

![Version: 1.12.4](https://img.shields.io/badge/Version-1.12.4-informational?style=flat-square)
![Version: 1.12.5](https://img.shields.io/badge/Version-1.12.5-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: edge-XX.X.X](https://img.shields.io/badge/AppVersion-edge--XX.X.X-informational?style=flat-square)

Expand Down
2 changes: 1 addition & 1 deletion jaeger/charts/linkerd-jaeger/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ kubeVersion: ">=1.21.0-0"
name: linkerd-jaeger
sources:
- https://github.com/linkerd/linkerd2/
version: 30.8.4
version: 30.8.5
icon: https://linkerd.io/images/logo-only-200h.png
maintainers:
- name: Linkerd authors
Expand Down
2 changes: 1 addition & 1 deletion jaeger/charts/linkerd-jaeger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Linkerd-Jaeger extension adds distributed tracing to Linkerd using
OpenCensus and Jaeger.

![Version: 30.8.4](https://img.shields.io/badge/Version-30.8.4-informational?style=flat-square)
![Version: 30.8.5](https://img.shields.io/badge/Version-30.8.5-informational?style=flat-square)

![AppVersion: edge-XX.X.X](https://img.shields.io/badge/AppVersion-edge--XX.X.X-informational?style=flat-square)

Expand Down
2 changes: 1 addition & 1 deletion multicluster/charts/linkerd-multicluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ kubeVersion: ">=1.21.0-0"
name: "linkerd-multicluster"
sources:
- https://github.com/linkerd/linkerd2/
version: 30.7.4
version: 30.7.5
icon: https://linkerd.io/images/logo-only-200h.png
maintainers:
- name: Linkerd authors
Expand Down
2 changes: 1 addition & 1 deletion multicluster/charts/linkerd-multicluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Linkerd-Multicluster extension contains resources to support multicluster
linking to remote clusters

![Version: 30.7.4](https://img.shields.io/badge/Version-30.7.4-informational?style=flat-square)
![Version: 30.7.5](https://img.shields.io/badge/Version-30.7.5-informational?style=flat-square)

![AppVersion: edge-XX.X.X](https://img.shields.io/badge/AppVersion-edge--XX.X.X-informational?style=flat-square)

Expand Down
34 changes: 31 additions & 3 deletions multicluster/service-mirror/cluster_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type (
remoteAPIClient *k8s.API
localAPIClient *k8s.API
stopper chan struct{}
eventBroadcaster record.EventBroadcaster
recorder record.EventRecorder
log *logging.Entry
eventsQueue workqueue.RateLimitingInterface
Expand All @@ -51,6 +52,14 @@ type (
gatewayAlive bool
liveness chan bool
headlessServicesEnabled bool

informerHandlers
}

informerHandlers struct {
svcHandler cache.ResourceEventHandlerRegistration
epHandler cache.ResourceEventHandlerRegistration
nsHandler cache.ResourceEventHandlerRegistration
}

// RemoteServiceCreated is generated whenever a remote service is created Observing
Expand Down Expand Up @@ -184,6 +193,7 @@ func NewRemoteClusterServiceWatcher(
remoteAPIClient: remoteAPI,
localAPIClient: localAPI,
stopper: stopper,
eventBroadcaster: eventBroadcaster,
recorder: recorder,
log: logging.WithFields(logging.Fields{
"cluster": clusterName,
Expand Down Expand Up @@ -781,7 +791,8 @@ func (rcsw *RemoteClusterServiceWatcher) processEvents(ctx context.Context) {
func (rcsw *RemoteClusterServiceWatcher) Start(ctx context.Context) error {
rcsw.remoteAPIClient.Sync(rcsw.stopper)
rcsw.eventsQueue.Add(&OrphanedServicesGcTriggered{})
_, err := rcsw.remoteAPIClient.Svc().Informer().AddEventHandler(
var err error
rcsw.svcHandler, err = rcsw.remoteAPIClient.Svc().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
AddFunc: func(svc interface{}) {
rcsw.eventsQueue.Add(&OnAddCalled{svc.(*corev1.Service)})
Expand Down Expand Up @@ -811,7 +822,7 @@ func (rcsw *RemoteClusterServiceWatcher) Start(ctx context.Context) error {
return err
}

_, err = rcsw.remoteAPIClient.Endpoint().Informer().AddEventHandler(
rcsw.epHandler, err = rcsw.remoteAPIClient.Endpoint().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
// AddFunc only relevant for exported headless endpoints
AddFunc: func(obj interface{}) {
Expand Down Expand Up @@ -851,7 +862,7 @@ func (rcsw *RemoteClusterServiceWatcher) Start(ctx context.Context) error {
return err
}

_, err = rcsw.localAPIClient.NS().Informer().AddEventHandler(
rcsw.nsHandler, err = rcsw.localAPIClient.NS().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
rcsw.eventsQueue.Add(&OnLocalNamespaceAdded{obj.(*corev1.Namespace)})
Expand Down Expand Up @@ -897,6 +908,23 @@ func (rcsw *RemoteClusterServiceWatcher) Stop(cleanupState bool) {
rcsw.eventsQueue.Add(&ClusterUnregistered{})
}
rcsw.eventsQueue.ShutDown()
rcsw.eventBroadcaster.Shutdown()

if rcsw.svcHandler != nil {
if err := rcsw.remoteAPIClient.Svc().Informer().RemoveEventHandler(rcsw.svcHandler); err != nil {
rcsw.log.Warnf("error removing service informer handler: %s", err)
}
}
if rcsw.epHandler != nil {
if err := rcsw.remoteAPIClient.Endpoint().Informer().RemoveEventHandler(rcsw.epHandler); err != nil {
rcsw.log.Warnf("error removing service informer handler: %s", err)
}
}
if rcsw.nsHandler != nil {
if err := rcsw.localAPIClient.NS().Informer().RemoveEventHandler(rcsw.nsHandler); err != nil {
rcsw.log.Warnf("error removing service informer handler: %s", err)
}
}
}

func (rcsw *RemoteClusterServiceWatcher) resolveGatewayAddress() ([]corev1.EndpointAddress, error) {
Expand Down
1 change: 1 addition & 0 deletions multicluster/service-mirror/probe_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (pw *ProbeWorker) run() {
probeTickerPeriod := pw.probeSpec.Period
maxJitter := pw.probeSpec.Period / 10 // max jitter is 10% of period
probeTicker := NewTicker(probeTickerPeriod, maxJitter)
defer probeTicker.Stop()

probeLoop:
for {
Expand Down
2 changes: 1 addition & 1 deletion viz/charts/linkerd-viz/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ kubeVersion: ">=1.21.0-0"
name: "linkerd-viz"
sources:
- https://github.com/linkerd/linkerd2/
version: 30.8.4
version: 30.8.5
icon: https://linkerd.io/images/logo-only-200h.png
maintainers:
- name: Linkerd authors
Expand Down
2 changes: 1 addition & 1 deletion viz/charts/linkerd-viz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Linkerd-Viz extension contains observability and visualization
components for Linkerd.

![Version: 30.8.4](https://img.shields.io/badge/Version-30.8.4-informational?style=flat-square)
![Version: 30.8.5](https://img.shields.io/badge/Version-30.8.5-informational?style=flat-square)

![AppVersion: edge-XX.X.X](https://img.shields.io/badge/AppVersion-edge--XX.X.X-informational?style=flat-square)

Expand Down

0 comments on commit da70f77

Please sign in to comment.