Skip to content

Commit 70cf784

Browse files
sstarcherShane Starcher
andauthored
feat(helm): allow cni updateStrategy to be configurable (#13562)
* [feat] allow cni updateStrategy to be configurable * For users with large clusters rollout of the cni can take a bit of time. This will allow them to configure a faster rollout of the cni resources. #13031 Signed-off-by: Shane Starcher <[email protected]> * add update strategy for cli Signed-off-by: Shane Starcher <[email protected]> --------- Signed-off-by: Shane Starcher <[email protected]> Co-authored-by: Shane Starcher <[email protected]>
1 parent 5c3053b commit 70cf784

File tree

3 files changed

+35
-32
lines changed

3 files changed

+35
-32
lines changed

charts/linkerd2-cni/templates/cni-plugin.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,7 @@ spec:
199199
selector:
200200
matchLabels:
201201
k8s-app: linkerd-cni
202-
updateStrategy:
203-
type: RollingUpdate
204-
rollingUpdate:
205-
maxUnavailable: 1
202+
updateStrategy: {{ .Values.updateStrategy | toYaml | nindent 4 }}
206203
template:
207204
metadata:
208205
labels:

charts/linkerd2-cni/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ disableIPv6: true
3939
priorityClassName: ""
4040
# -- Specifies the number of old ReplicaSets to retain to allow rollback.
4141
revisionHistoryLimit: 10
42+
# -- Specifies the update strategy for how the new pods are rolled out
43+
updateStrategy:
44+
type: RollingUpdate
45+
rollingUpdate:
46+
maxUnavailable: 1
4247

4348
# -- Add a PSP resource and bind it to the linkerd-cni ServiceAccounts.
4449
# Note PSP has been deprecated since k8s v1.21

pkg/charts/cni/values.go

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,34 +46,35 @@ type RepairController struct {
4646

4747
// Values contains the top-level elements in the cni Helm chart
4848
type Values struct {
49-
InboundProxyPort uint `json:"inboundProxyPort"`
50-
OutboundProxyPort uint `json:"outboundProxyPort"`
51-
IgnoreInboundPorts string `json:"ignoreInboundPorts"`
52-
IgnoreOutboundPorts string `json:"ignoreOutboundPorts"`
53-
CliVersion string `json:"cliVersion"`
54-
Image Image `json:"image"`
55-
LogLevel string `json:"logLevel"`
56-
PortsToRedirect string `json:"portsToRedirect"`
57-
ProxyUID int64 `json:"proxyUID"`
58-
ProxyGID int64 `json:"proxyGID"`
59-
DestCNINetDir string `json:"destCNINetDir"`
60-
DestCNIBinDir string `json:"destCNIBinDir"`
61-
UseWaitFlag bool `json:"useWaitFlag"`
62-
PriorityClassName string `json:"priorityClassName"`
63-
ProxyAdminPort string `json:"proxyAdminPort"`
64-
ProxyControlPort string `json:"proxyControlPort"`
65-
Tolerations []interface{} `json:"tolerations"`
66-
PodLabels map[string]string `json:"podLabels"`
67-
CommonLabels map[string]string `json:"commonLabels"`
68-
ImagePullSecrets []map[string]string `json:"imagePullSecrets"`
69-
ExtraInitContainers []interface{} `json:"extraInitContainers"`
70-
IptablesMode string `json:"iptablesMode"`
71-
DisableIPv6 bool `json:"disableIPv6"`
72-
EnablePSP bool `json:"enablePSP"`
73-
Privileged bool `json:"privileged"`
74-
Resources Resources `json:"resources"`
75-
RepairController RepairController `json:"repairController"`
76-
RevisionHistoryLimit uint `json:"revisionHistoryLimit"`
49+
InboundProxyPort uint `json:"inboundProxyPort"`
50+
OutboundProxyPort uint `json:"outboundProxyPort"`
51+
IgnoreInboundPorts string `json:"ignoreInboundPorts"`
52+
IgnoreOutboundPorts string `json:"ignoreOutboundPorts"`
53+
CliVersion string `json:"cliVersion"`
54+
Image Image `json:"image"`
55+
LogLevel string `json:"logLevel"`
56+
PortsToRedirect string `json:"portsToRedirect"`
57+
ProxyUID int64 `json:"proxyUID"`
58+
ProxyGID int64 `json:"proxyGID"`
59+
DestCNINetDir string `json:"destCNINetDir"`
60+
DestCNIBinDir string `json:"destCNIBinDir"`
61+
UseWaitFlag bool `json:"useWaitFlag"`
62+
PriorityClassName string `json:"priorityClassName"`
63+
ProxyAdminPort string `json:"proxyAdminPort"`
64+
ProxyControlPort string `json:"proxyControlPort"`
65+
Tolerations []interface{} `json:"tolerations"`
66+
PodLabels map[string]string `json:"podLabels"`
67+
CommonLabels map[string]string `json:"commonLabels"`
68+
ImagePullSecrets []map[string]string `json:"imagePullSecrets"`
69+
ExtraInitContainers []interface{} `json:"extraInitContainers"`
70+
IptablesMode string `json:"iptablesMode"`
71+
DisableIPv6 bool `json:"disableIPv6"`
72+
EnablePSP bool `json:"enablePSP"`
73+
Privileged bool `json:"privileged"`
74+
Resources Resources `json:"resources"`
75+
RepairController RepairController `json:"repairController"`
76+
RevisionHistoryLimit uint `json:"revisionHistoryLimit"`
77+
UpdateStrategy map[string]interface{} `json:"updateStrategy"`
7778
}
7879

7980
// NewValues returns a new instance of the Values type.

0 commit comments

Comments
 (0)