diff --git a/telco-ran/configuration/kube-compare-reference/functions/unordered_list.tmpl b/telco-ran/configuration/kube-compare-reference/functions/unordered_list.tmpl index cb447b156..778a3f709 100644 --- a/telco-ran/configuration/kube-compare-reference/functions/unordered_list.tmpl +++ b/telco-ran/configuration/kube-compare-reference/functions/unordered_list.tmpl @@ -69,6 +69,14 @@ {{- if hasKey $inputSystemReserved "memory" }} {{- $systemReservedMemory = printf "\"%s\"" $inputSystemReserved.memory }} {{- end }} +{{- end }} +{{- $shutdownGracePeriod := "" }} +{{- if hasKey $config "shutdownGracePeriod" }} +{{- $shutdownGracePeriod = $config.shutdownGracePeriod }} +{{- end }} +{{- $shutdownGracePeriodCriticalPods := "" }} +{{- if hasKey $config "shutdownGracePeriodCriticalPods" }} +{{- $shutdownGracePeriodCriticalPods = $config.shutdownGracePeriodCriticalPods }} {{- end }} kubeletconfig.experimental: | { @@ -76,7 +84,13 @@ "allowedUnsafeSysctls":{{ $result | toJson }}, {{- end }} {{- if $systemReservedMemory }} - "systemReserved":{"memory":{{ $systemReservedMemory }}} + "systemReserved":{"memory":{{ $systemReservedMemory }}}, + {{- end }} + {{- if $shutdownGracePeriod }} + "shutdownGracePeriod":"{{ $shutdownGracePeriod }}", + {{- end }} + {{- if $shutdownGracePeriodCriticalPods }} + "shutdownGracePeriodCriticalPods":"{{ $shutdownGracePeriodCriticalPods }}" {{- end }} } {{- end }} diff --git a/telco-ran/configuration/kube-compare-reference/hack/arch/aarch64.yaml b/telco-ran/configuration/kube-compare-reference/hack/arch/aarch64.yaml index 46e7b0bf4..8c5dbb694 100644 --- a/telco-ran/configuration/kube-compare-reference/hack/arch/aarch64.yaml +++ b/telco-ran/configuration/kube-compare-reference/hack/arch/aarch64.yaml @@ -3,7 +3,9 @@ node_tuning_operator_PerformanceProfile: annotations: kubeletconfig.experimental: | { - "systemReserved":{"memory":"11Gi"} + "systemReserved":{"memory":"11Gi"}, + "shutdownGracePeriod":"30s", + "shutdownGracePeriodCriticalPods":"10s" } spec: additionalKernelArgs: diff --git a/telco-ran/configuration/kube-compare-reference/hack/arch/x86_64.yaml b/telco-ran/configuration/kube-compare-reference/hack/arch/x86_64.yaml index c4c9fea17..9b3e9a425 100644 --- a/telco-ran/configuration/kube-compare-reference/hack/arch/x86_64.yaml +++ b/telco-ran/configuration/kube-compare-reference/hack/arch/x86_64.yaml @@ -3,7 +3,9 @@ node_tuning_operator_PerformanceProfile: annotations: kubeletconfig.experimental: | { - "systemReserved":{"memory":"11Gi"} + "systemReserved":{"memory":"11Gi"}, + "shutdownGracePeriod":"30s", + "shutdownGracePeriodCriticalPods":"10s" } spec: additionalKernelArgs: diff --git a/telco-ran/configuration/source-crs/node-tuning-operator/aarch64/PerformanceProfile-SetSelector.yaml b/telco-ran/configuration/source-crs/node-tuning-operator/aarch64/PerformanceProfile-SetSelector.yaml index 67c1026ae..385800aa6 100644 --- a/telco-ran/configuration/source-crs/node-tuning-operator/aarch64/PerformanceProfile-SetSelector.yaml +++ b/telco-ran/configuration/source-crs/node-tuning-operator/aarch64/PerformanceProfile-SetSelector.yaml @@ -10,9 +10,13 @@ metadata: ran.openshift.io/ztp-deploy-wave: "10" ran.openshift.io/reference-configuration: "ran-du.redhat.com" # systemReserved: when used, it should be tailored for each environment. + # shutdownGracePeriod: enables kubelet GracefulNodeShutdown to reduce + # IBU upgrade downtime. Non-critical pods get 20s, critical pods get 10s. kubeletconfig.experimental: | { - "systemReserved":{"memory":"11Gi"} + "systemReserved":{"memory":"11Gi"}, + "shutdownGracePeriod":"30s", + "shutdownGracePeriodCriticalPods":"10s" } spec: # Note: The defaults here are for Grace Hopper systems. Other systems may alternative PCI or iommu settings such as: diff --git a/telco-ran/configuration/source-crs/node-tuning-operator/aarch64/PerformanceProfile.yaml b/telco-ran/configuration/source-crs/node-tuning-operator/aarch64/PerformanceProfile.yaml index f10404f82..68f3bf571 100644 --- a/telco-ran/configuration/source-crs/node-tuning-operator/aarch64/PerformanceProfile.yaml +++ b/telco-ran/configuration/source-crs/node-tuning-operator/aarch64/PerformanceProfile.yaml @@ -10,9 +10,13 @@ metadata: ran.openshift.io/ztp-deploy-wave: "10" ran.openshift.io/reference-configuration: "ran-du.redhat.com" # systemReserved: when used, it should be tailored for each environment. + # shutdownGracePeriod: enables kubelet GracefulNodeShutdown to reduce + # IBU upgrade downtime. Non-critical pods get 20s, critical pods get 10s. kubeletconfig.experimental: | { - "systemReserved":{"memory":"11Gi"} + "systemReserved":{"memory":"11Gi"}, + "shutdownGracePeriod":"30s", + "shutdownGracePeriodCriticalPods":"10s" } spec: # Note: The defaults here are for Grace Hopper systems. Other systems may alternative PCI or iommu settings such as: diff --git a/telco-ran/configuration/source-crs/node-tuning-operator/x86_64/PerformanceProfile-SetSelector.yaml b/telco-ran/configuration/source-crs/node-tuning-operator/x86_64/PerformanceProfile-SetSelector.yaml index d49119f19..148d1b150 100644 --- a/telco-ran/configuration/source-crs/node-tuning-operator/x86_64/PerformanceProfile-SetSelector.yaml +++ b/telco-ran/configuration/source-crs/node-tuning-operator/x86_64/PerformanceProfile-SetSelector.yaml @@ -10,9 +10,13 @@ metadata: ran.openshift.io/ztp-deploy-wave: "10" ran.openshift.io/reference-configuration: "ran-du.redhat.com" # systemReserved: when used, it should be tailored for each environment. + # shutdownGracePeriod: enables kubelet GracefulNodeShutdown to reduce + # IBU upgrade downtime. Non-critical pods get 20s, critical pods get 10s. kubeletconfig.experimental: | { - "systemReserved":{"memory":"11Gi"} + "systemReserved":{"memory":"11Gi"}, + "shutdownGracePeriod":"30s", + "shutdownGracePeriodCriticalPods":"10s" } spec: # Optional kernel arguments: diff --git a/telco-ran/configuration/source-crs/node-tuning-operator/x86_64/PerformanceProfile.yaml b/telco-ran/configuration/source-crs/node-tuning-operator/x86_64/PerformanceProfile.yaml index 079224dac..edce0f307 100644 --- a/telco-ran/configuration/source-crs/node-tuning-operator/x86_64/PerformanceProfile.yaml +++ b/telco-ran/configuration/source-crs/node-tuning-operator/x86_64/PerformanceProfile.yaml @@ -10,9 +10,13 @@ metadata: ran.openshift.io/ztp-deploy-wave: "10" ran.openshift.io/reference-configuration: "ran-du.redhat.com" # systemReserved: when used, it should be tailored for each environment. + # shutdownGracePeriod: enables kubelet GracefulNodeShutdown to reduce + # IBU upgrade downtime. Non-critical pods get 20s, critical pods get 10s. kubeletconfig.experimental: | { - "systemReserved":{"memory":"11Gi"} + "systemReserved":{"memory":"11Gi"}, + "shutdownGracePeriod":"30s", + "shutdownGracePeriodCriticalPods":"10s" } spec: # Optional kernel arguments: