Skip to content

Commit

Permalink
stable-2.14.9
Browse files Browse the repository at this point in the history
This stable release adds a cni-repair-controller which fixes the issue of
injected pods that cannot acquire proper network config because linkerd-cni
and/or the cluster's network CNI haven't fully started ([#11699]). It also
fixes a bug in the destination controller where having a large number of
Server resources could cause the destination controller to use an excessive
amount of CPU ([#11907]). Finally, it fixes a conflict with tap resource
shortnames which was causing warnings from kubectl v1.29.0+ ([#11816]).

[#11699]: #11699
[#11907]: #11907
[#11816]: #11816
  • Loading branch information
adleong authored Jan 19, 2024
2 parents 3af6563 + 3469999 commit 2aae59b
Show file tree
Hide file tree
Showing 29 changed files with 178 additions and 56 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 .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
- rsa-ca
- helm-upgrade
- uninstall
- upgrade-edge
#- upgrade-edge
- upgrade-stable
timeout-minutes: 60
runs-on: ubuntu-20.04
Expand Down
14 changes: 14 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changes

## stable-2.14.9

This stable release adds a cni-repair-controller which fixes the issue of
injected pods that cannot acquire proper network config because linkerd-cni
and/or the cluster's network CNI haven't fully started ([#11699]). It also
fixes a bug in the destination controller where having a large number of
Server resources could cause the destination controller to use an excessive
amount of CPU ([#11907]). Finally, it fixes a conflict with tap resource
shortnames which was causing warnings from kubectl v1.29.0+ ([#11816]).

[#11699]: https://github.com/linkerd/linkerd2/pull/11699
[#11907]: https://github.com/linkerd/linkerd2/pull/11907
[#11816]: https://github.com/linkerd/linkerd2/pull/11816

## stable-2.14.8

This stable release fixes an issue in the control plane where discovery for pod
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.16.9
version: 1.16.10
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.16.9](https://img.shields.io/badge/Version-1.16.9-informational?style=flat-square)
![Version: 1.16.10](https://img.shields.io/badge/Version-1.16.10-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 charts/linkerd2-cni/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ description: |
kubeVersion: ">=1.21.0-0"
icon: https://linkerd.io/images/logo-only-200h.png
name: "linkerd2-cni"
version: 30.12.1
version: 30.12.2
16 changes: 13 additions & 3 deletions charts/linkerd2-cni/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Linkerd [CNI plugin](https://linkerd.io/2/features/cni/) takes care of setting
up your pod's network so incoming and outgoing traffic is proxied through the
data plane.

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

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

Expand All @@ -31,7 +31,7 @@ Kubernetes: `>=1.21.0-0`
| ignoreOutboundPorts | string | `""` | Default set of outbound ports to skip via iptables |
| image.name | string | `"cr.l5d.io/linkerd/cni-plugin"` | Docker image for the CNI plugin |
| image.pullPolicy | string | `"IfNotPresent"` | Pull policy for the linkerd-cni container |
| image.version | string | `"v1.2.2"` | Tag for the CNI container Docker image |
| image.version | string | `"v1.3.0"` | Tag for the CNI container Docker image |
| imagePullSecrets | list | `[]` | |
| inboundProxyPort | int | `4143` | Inbound port for the proxy container |
| logLevel | string | `"info"` | Log level for the CNI plugin |
Expand All @@ -43,7 +43,17 @@ Kubernetes: `>=1.21.0-0`
| proxyAdminPort | int | `4191` | Admin port for the proxy container |
| proxyControlPort | int | `4190` | Control port for the proxy container |
| proxyUID | int | `2102` | User id under which the proxy shall be ran |
| resources | object | `{"cpu":{"limit":"","request":""},"ephemeral-storage":{"limit":"","request":""},"memory":{"limit":"","request":""}}` | Resource requests and limits for linkerd-cni daemonset containers |
| repairController.enableSecurityContext | bool | `true` | Include a securityContext in the repair-controller container |
| repairController.enabled | bool | `false` | Enables the repair-controller container |
| repairController.logFormat | string | plain | Log format (`plain` or `json`) for the repair-controller container |
| repairController.logLevel | string | info | Log level for the repair-controller container |
| repairController.resources.cpu.limit | string | `""` | Maximum amount of CPU units that the repair-controller container can use |
| repairController.resources.cpu.request | string | `""` | Amount of CPU units that the repair-controller container requests |
| repairController.resources.ephemeral-storage.limit | string | `""` | Maximum amount of ephemeral storage that the repair-controller container can use |
| repairController.resources.ephemeral-storage.request | string | `""` | Amount of ephemeral storage that the repair-controller container requests |
| repairController.resources.memory.limit | string | `""` | Maximum amount of memory that the repair-controller container can use |
| repairController.resources.memory.request | string | `""` | Amount of memory that the repair-controller container requests |
| resources | object | `{"cpu":{"limit":"","request":""},"ephemeral-storage":{"limit":"","request":""},"memory":{"limit":"","request":""}}` | Resource requests and limits for linkerd-cni daemonset container |
| resources.cpu.limit | string | `""` | Maximum amount of CPU units that the cni container can use |
| resources.cpu.request | string | `""` | Amount of CPU units that the cni container requests |
| resources.ephemeral-storage.limit | string | `""` | Maximum amount of ephemeral storage that the cni container can use |
Expand Down
61 changes: 61 additions & 0 deletions charts/linkerd2-cni/templates/cni-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ rules:
- apiGroups: [""]
resources: ["pods", "nodes", "namespaces", "services"]
verbs: ["list", "get", "watch"]
{{- if .Values.repairController.enabled }}
- apiGroups: [""]
resources: ["pods"]
verbs: ["delete"]
- apiGroups: ["events.k8s.io"]
resources: ["events"]
verbs: ["create"]
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down Expand Up @@ -274,6 +282,59 @@ spec:
{{- if .Values.resources }}
{{- include "partials.resources" .Values.resources | nindent 8 }}
{{- end }}
{{- if .Values.repairController.enabled }}
# This container watches over pods whose linkerd-network-validator
# container failed, probably because of a race condition while setting up
# the CNI plugin chain, and deletes those pods so they can try acquiring a
# proper network config again
- name: repair-controller
image: {{ .Values.image.name -}}:{{- .Values.image.version }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.repairController.enableSecurityContext }}
env:
- name: LINKERD_CNI_REPAIR_CONTROLLER_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: LINKERD_CNI_REPAIR_CONTROLLER_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
command:
- /usr/lib/linkerd/linkerd-cni-repair-controller
args:
- --admin-addr=0.0.0.0:9990
- --log-format
- {{ .Values.repairController.logFormat }}
- --log-level
- {{ .Values.repairController.logLevel }}
livenessProbe:
httpGet:
path: /live
port: admin-http
readinessProbe:
failureThreshold: 7
httpGet:
path: /ready
port: admin-http
initialDelaySeconds: 10
ports:
- containerPort: 9990
name: admin-http
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
seccompProfile:
type: RuntimeDefault
{{- end }}
{{- if .Values.resources }}
{{- include "partials.resources" .Values.resources | nindent 8 }}
{{- end }}
{{- end }}
volumes:
{{- if ne .Values.destCNIBinDir .Values.destCNINetDir }}
- name: cni-bin-dir
Expand Down
54 changes: 38 additions & 16 deletions charts/linkerd2-cni/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ image:
# -- Docker image for the CNI plugin
name: "cr.l5d.io/linkerd/cni-plugin"
# -- Tag for the CNI container Docker image
version: "v1.2.2"
version: "v1.3.0"
# -- Pull policy for the linkerd-cni container
pullPolicy: IfNotPresent

Expand All @@ -71,22 +71,44 @@ imagePullSecrets: []

# -- Add additional initContainers to the daemonset
extraInitContainers: []
# - name: wait-for-other-cni
# image: busybox:1.33
# command:
# - /bin/sh
# - -xc
# - |
# for i in $(seq 1 180); do
# test -f /host/etc/cni/net.d/10-aws.conflist && exit 0
# sleep 1
# done
# exit 1
# volumeMounts:
# - mountPath: /host/etc/cni/net.d
# name: cni-net-dir

# -- Resource requests and limits for linkerd-cni daemonset containers
# The cni-repair-controller scans pods in each node to find those that have
# been injected by linkerd, and whose linkerd-network-validator container has
# failed. This is usually caused by a race between linkerd-cni and the CNI
# plugin used in the cluster. This controller deletes those failed pods so they
# can restart and rety re-acquiring a proper network config.
repairController:
# -- Enables the repair-controller container
enabled: false

# -- Log level for the repair-controller container
# @default -- info
logLevel: info
# -- Log format (`plain` or `json`) for the repair-controller container
# @default -- plain
logFormat: plain

# -- Include a securityContext in the repair-controller container
enableSecurityContext: true

resources:
cpu:
# -- Maximum amount of CPU units that the repair-controller container can use
limit: ""
# -- Amount of CPU units that the repair-controller container requests
request: ""
memory:
# -- Maximum amount of memory that the repair-controller container can use
limit: ""
# -- Amount of memory that the repair-controller container requests
request: ""
ephemeral-storage:
# -- Maximum amount of ephemeral storage that the repair-controller container can use
limit: ""
# -- Amount of ephemeral storage that the repair-controller container requests
request: ""

# -- Resource requests and limits for linkerd-cni daemonset container
resources:
cpu:
# -- Maximum amount of CPU units that the cni container can use
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/install-cni-plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestRenderCNIPlugin(t *testing.T) {

image := cniPluginImage{
name: "my-docker-registry.io/awesome/cni-plugin-test-image",
version: "v1.2.2",
version: "v1.3.0",
pullPolicy: nil,
}
fullyConfiguredOptions := &cniPluginOptions{
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/install_cni_helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestRenderCniHelm(t *testing.T) {
"logLevel": "debug",
"image": {
"name": "cr.l5d.io/linkerd/cni-plugin",
"version": "v1.2.2"
"version": "v1.3.0"
},
"proxyUID": 1111,
"destCNINetDir": "/etc/cni/net.d-test",
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/testdata/install-cni-plugin_default.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/cmd/testdata/install-cni-plugin_skip_ports.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/cmd/testdata/install_cni_helm_default_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/cmd/testdata/install_cni_helm_override_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions controller/api/destination/watcher/endpoints_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ func (pp *portPublisher) unsubscribe(listener EndpointUpdateListener) {
}

func (pp *portPublisher) updateServer(server *v1beta1.Server, selector labels.Selector, isAdd bool) {
updated := false
for id, address := range pp.addresses.Addresses {
if address.Pod != nil && selector.Matches(labels.Set(address.Pod.Labels)) {
var portMatch bool
Expand All @@ -1205,12 +1206,18 @@ func (pp *portPublisher) updateServer(server *v1beta1.Server, selector labels.Se
} else {
address.OpaqueProtocol = false
}
pp.addresses.Addresses[id] = address
if pp.addresses.Addresses[id].OpaqueProtocol != address.OpaqueProtocol {
pp.addresses.Addresses[id] = address
updated = true
}
}
}
}
for _, listener := range pp.listeners {
listener.Add(pp.addresses)
if updated {
for _, listener := range pp.listeners {
listener.Add(pp.addresses)
}
pp.metrics.incUpdates()
}
}

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.12.9
version: 30.12.10
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.12.9](https://img.shields.io/badge/Version-30.12.9-informational?style=flat-square)
![Version: 30.12.10](https://img.shields.io/badge/Version-30.12.10-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.11.9
version: 30.11.10
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.11.9](https://img.shields.io/badge/Version-30.11.9-informational?style=flat-square)
![Version: 30.11.10](https://img.shields.io/badge/Version-30.11.10-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
Loading

0 comments on commit 2aae59b

Please sign in to comment.