From 6a0341b430688d480eaa212930b8ac191323afdf Mon Sep 17 00:00:00 2001 From: dbw7 Date: Mon, 26 Aug 2024 09:43:21 -0400 Subject: [PATCH] Modify Helm backOffLimit (#542) change helm back-off limit --- RELEASE_NOTES.md | 1 + pkg/combustion/kubernetes_test.go | 1 + pkg/registry/helm_crd.go | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 49936002..2c70b1ee 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,6 +6,7 @@ * Improved Kubernetes definition validation * Allow RKE2 deployments with Calico, Cilium and Multus on aarch64 platforms +* Helm chart installation backOffLimit changed from 1000(default) to 20 * Improved Kubernetes resource installation handling * Ensure that kernel arguments are applied during firstboot when kexec is used in ISO installations diff --git a/pkg/combustion/kubernetes_test.go b/pkg/combustion/kubernetes_test.go index 71d1c922..09ace3aa 100644 --- a/pkg/combustion/kubernetes_test.go +++ b/pkg/combustion/kubernetes_test.go @@ -719,6 +719,7 @@ spec: chartContent: some-content targetNamespace: web createNamespace: true + backOffLimit: 20 ` b, err = os.ReadFile(chartPath) require.NoError(t, err) diff --git a/pkg/registry/helm_crd.go b/pkg/registry/helm_crd.go index 2ac8b146..2f974953 100644 --- a/pkg/registry/helm_crd.go +++ b/pkg/registry/helm_crd.go @@ -10,6 +10,7 @@ const ( helmChartAPIVersion = "helm.cattle.io/v1" helmChartKind = "HelmChart" helmChartSource = "edge-image-builder" + helmBackoffLimit = 20 ) type HelmCRD struct { @@ -26,6 +27,7 @@ type HelmCRD struct { ChartContent string `yaml:"chartContent"` TargetNamespace string `yaml:"targetNamespace,omitempty"` CreateNamespace bool `yaml:"createNamespace,omitempty"` + BackOffLimit int `yaml:"backOffLimit"` } `yaml:"spec"` } @@ -53,12 +55,14 @@ func NewHelmCRD(chart *image.HelmChart, chartContent, valuesContent, repositoryU ChartContent string `yaml:"chartContent"` TargetNamespace string `yaml:"targetNamespace,omitempty"` CreateNamespace bool `yaml:"createNamespace,omitempty"` + BackOffLimit int `yaml:"backOffLimit"` }{ Version: chart.Version, ValuesContent: valuesContent, ChartContent: chartContent, TargetNamespace: chart.TargetNamespace, CreateNamespace: chart.CreateNamespace, + BackOffLimit: helmBackoffLimit, }, } }