diff --git a/charts/linkerd2-cni/templates/cni-plugin.yaml b/charts/linkerd2-cni/templates/cni-plugin.yaml index 3862740ee9983..e7afc4323354a 100644 --- a/charts/linkerd2-cni/templates/cni-plugin.yaml +++ b/charts/linkerd2-cni/templates/cni-plugin.yaml @@ -199,10 +199,7 @@ spec: selector: matchLabels: k8s-app: linkerd-cni - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 + updateStrategy: {{ .Values.updateStrategy | toYaml | nindent 4 }} template: metadata: labels: diff --git a/charts/linkerd2-cni/values.yaml b/charts/linkerd2-cni/values.yaml index d9fc1398b5cf5..33a3c5a206f54 100644 --- a/charts/linkerd2-cni/values.yaml +++ b/charts/linkerd2-cni/values.yaml @@ -39,6 +39,11 @@ disableIPv6: true priorityClassName: "" # -- Specifies the number of old ReplicaSets to retain to allow rollback. revisionHistoryLimit: 10 +# -- Specifies the update strategy for how the new pods are rolled out +updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 # -- Add a PSP resource and bind it to the linkerd-cni ServiceAccounts. # Note PSP has been deprecated since k8s v1.21 diff --git a/pkg/charts/cni/values.go b/pkg/charts/cni/values.go index 19b48b387e995..935cd331cff85 100644 --- a/pkg/charts/cni/values.go +++ b/pkg/charts/cni/values.go @@ -46,34 +46,35 @@ type RepairController struct { // Values contains the top-level elements in the cni Helm chart type Values struct { - InboundProxyPort uint `json:"inboundProxyPort"` - OutboundProxyPort uint `json:"outboundProxyPort"` - IgnoreInboundPorts string `json:"ignoreInboundPorts"` - IgnoreOutboundPorts string `json:"ignoreOutboundPorts"` - CliVersion string `json:"cliVersion"` - Image Image `json:"image"` - LogLevel string `json:"logLevel"` - PortsToRedirect string `json:"portsToRedirect"` - ProxyUID int64 `json:"proxyUID"` - ProxyGID int64 `json:"proxyGID"` - DestCNINetDir string `json:"destCNINetDir"` - DestCNIBinDir string `json:"destCNIBinDir"` - UseWaitFlag bool `json:"useWaitFlag"` - PriorityClassName string `json:"priorityClassName"` - ProxyAdminPort string `json:"proxyAdminPort"` - ProxyControlPort string `json:"proxyControlPort"` - Tolerations []interface{} `json:"tolerations"` - PodLabels map[string]string `json:"podLabels"` - CommonLabels map[string]string `json:"commonLabels"` - ImagePullSecrets []map[string]string `json:"imagePullSecrets"` - ExtraInitContainers []interface{} `json:"extraInitContainers"` - IptablesMode string `json:"iptablesMode"` - DisableIPv6 bool `json:"disableIPv6"` - EnablePSP bool `json:"enablePSP"` - Privileged bool `json:"privileged"` - Resources Resources `json:"resources"` - RepairController RepairController `json:"repairController"` - RevisionHistoryLimit uint `json:"revisionHistoryLimit"` + InboundProxyPort uint `json:"inboundProxyPort"` + OutboundProxyPort uint `json:"outboundProxyPort"` + IgnoreInboundPorts string `json:"ignoreInboundPorts"` + IgnoreOutboundPorts string `json:"ignoreOutboundPorts"` + CliVersion string `json:"cliVersion"` + Image Image `json:"image"` + LogLevel string `json:"logLevel"` + PortsToRedirect string `json:"portsToRedirect"` + ProxyUID int64 `json:"proxyUID"` + ProxyGID int64 `json:"proxyGID"` + DestCNINetDir string `json:"destCNINetDir"` + DestCNIBinDir string `json:"destCNIBinDir"` + UseWaitFlag bool `json:"useWaitFlag"` + PriorityClassName string `json:"priorityClassName"` + ProxyAdminPort string `json:"proxyAdminPort"` + ProxyControlPort string `json:"proxyControlPort"` + Tolerations []interface{} `json:"tolerations"` + PodLabels map[string]string `json:"podLabels"` + CommonLabels map[string]string `json:"commonLabels"` + ImagePullSecrets []map[string]string `json:"imagePullSecrets"` + ExtraInitContainers []interface{} `json:"extraInitContainers"` + IptablesMode string `json:"iptablesMode"` + DisableIPv6 bool `json:"disableIPv6"` + EnablePSP bool `json:"enablePSP"` + Privileged bool `json:"privileged"` + Resources Resources `json:"resources"` + RepairController RepairController `json:"repairController"` + RevisionHistoryLimit uint `json:"revisionHistoryLimit"` + UpdateStrategy map[string]interface{} `json:"updateStrategy"` } // NewValues returns a new instance of the Values type.