From 106f3897341bdf7f17d481e2ac5f920065d1134e Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Thu, 15 Aug 2024 16:19:13 -0500 Subject: [PATCH 1/2] use sed to remove field with gotemplate in kubelet.yaml. the addition of the template prevents yq from recognizing the contents as yaml, halting the rebase Signed-off-by: Jon Cope --- scripts/auto-rebase/rebase.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/auto-rebase/rebase.sh b/scripts/auto-rebase/rebase.sh index cff00a4a997..54d947cd33d 100755 --- a/scripts/auto-rebase/rebase.sh +++ b/scripts/auto-rebase/rebase.sh @@ -565,6 +565,12 @@ update_openshift_manifests() { title "Modifying OpenShift manifests" #-- Kubelet ------------------------------------------- + + # The tlsCipherSuites field was change from a scalar value to gotemplate which broke the yaml formatting and + # confused yq. Before processing, delete the offending go templated field. + # https://github.com/openshift/machine-config-operator/commit/3b979e1ddf2a6e2c3e9b4a7872e31db888da1d57 + sed -in '/tlsCipherSuites:/,/{{- end }}/d' "${REPOROOT}/assets/core/kubelet.yaml" + # Drop MCO's boilerplate and keep KubeletConfiguration only yq -i '.contents.inline' "${REPOROOT}/assets/core/kubelet.yaml" From e67f2fbc5179b1654a5d6ef47645f8e1c93c8515 Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Fri, 16 Aug 2024 15:32:34 -0500 Subject: [PATCH 2/2] accidently renamed the kubelet file, fixed Signed-off-by: Jon Cope --- scripts/auto-rebase/rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/auto-rebase/rebase.sh b/scripts/auto-rebase/rebase.sh index 54d947cd33d..2d4ddb29a3e 100755 --- a/scripts/auto-rebase/rebase.sh +++ b/scripts/auto-rebase/rebase.sh @@ -569,7 +569,7 @@ update_openshift_manifests() { # The tlsCipherSuites field was change from a scalar value to gotemplate which broke the yaml formatting and # confused yq. Before processing, delete the offending go templated field. # https://github.com/openshift/machine-config-operator/commit/3b979e1ddf2a6e2c3e9b4a7872e31db888da1d57 - sed -in '/tlsCipherSuites:/,/{{- end }}/d' "${REPOROOT}/assets/core/kubelet.yaml" + sed -n -i '/tlsCipherSuites:/,/{{- end }}/d' "${REPOROOT}/assets/core/kubelet.yaml" # Drop MCO's boilerplate and keep KubeletConfiguration only yq -i '.contents.inline' "${REPOROOT}/assets/core/kubelet.yaml"