Skip to content

Commit 777962a

Browse files
feat: BackoffLimit skal kunne være 0
Før defaultet vi til 6, som gjorde at man ikke kunne skru av backoff retries. kubernetes/kubernetes#67859 (comment) fixes #599 Co-authored-by: Christian Chavez <[email protected]>
1 parent 5b4d8be commit 777962a

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/magiconair/properties v1.8.9
1515
github.com/mitchellh/hashstructure v1.1.0
1616
github.com/mitchellh/mapstructure v1.5.0
17-
github.com/nais/liberator v0.0.0-20250314120052-1cb863cb99a7
17+
github.com/nais/liberator v0.0.0-20250318133902-16463bfb012c
1818
github.com/novln/docker-parser v1.0.0
1919
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0
2020
github.com/prometheus/client_golang v1.21.0
@@ -94,7 +94,7 @@ require (
9494
github.com/spf13/cast v1.7.1 // indirect
9595
github.com/spf13/cobra v1.8.1 // indirect
9696
github.com/subosito/gotenv v1.6.0 // indirect
97-
github.com/vektra/mockery/v2 v2.53.1 // indirect
97+
github.com/vektra/mockery/v2 v2.53.2 // indirect
9898
github.com/x448/float16 v0.8.4 // indirect
9999
go.uber.org/multierr v1.11.0 // indirect
100100
golang.org/x/crypto v0.35.0 // indirect

go.sum

+6-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
145145
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
146146
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
147147
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
148-
github.com/nais/liberator v0.0.0-20250313145220-cef67aaac1ec h1:yidGE+umTNmfQEFB9L10ghrBsS4RR+IvP9zpa7PKuh4=
149-
github.com/nais/liberator v0.0.0-20250313145220-cef67aaac1ec/go.mod h1:SbK/LANhG/ha3buL5qVZfXnGVxI1wzpeXra1fR8irj0=
150148
github.com/nais/liberator v0.0.0-20250314120052-1cb863cb99a7 h1:rmmO4eqET25nuPlpT8JpHVDuFgpKuV44ZRRIC3dAUxs=
151149
github.com/nais/liberator v0.0.0-20250314120052-1cb863cb99a7/go.mod h1:SbK/LANhG/ha3buL5qVZfXnGVxI1wzpeXra1fR8irj0=
150+
github.com/nais/liberator v0.0.0-20250314133115-a00f5ff69f28 h1:864h9YsqoH2EKGKYtkHLM86gok8OpHxDzWEyIztQBgs=
151+
github.com/nais/liberator v0.0.0-20250314133115-a00f5ff69f28/go.mod h1:F3YcGoCG6HAyX5R2tgGH79/R0LBAU2xtRgRaveSXKiA=
152+
github.com/nais/liberator v0.0.0-20250318133902-16463bfb012c h1:rX9eQ5Ie+mesMLZaYVo2YXPYI4RT0b42QS5UHFsVM0U=
153+
github.com/nais/liberator v0.0.0-20250318133902-16463bfb012c/go.mod h1:F3YcGoCG6HAyX5R2tgGH79/R0LBAU2xtRgRaveSXKiA=
152154
github.com/novln/docker-parser v1.0.0 h1:PjEBd9QnKixcWczNGyEdfUrP6GR0YUilAqG7Wksg3uc=
153155
github.com/novln/docker-parser v1.0.0/go.mod h1:oCeM32fsoUwkwByB5wVjsrsVQySzPWkl3JdlTn1txpE=
154156
github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM=
@@ -215,8 +217,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
215217
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
216218
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
217219
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
218-
github.com/vektra/mockery/v2 v2.53.1 h1:nXP4LsUbuzpR1zA1JWN4E4bGiyPBBCZkICkU4DT2BEg=
219-
github.com/vektra/mockery/v2 v2.53.1/go.mod h1:UJT+mgXhCcOCHXTnM5cJHCZL+d76BYB+EbY1sFztEB8=
220+
github.com/vektra/mockery/v2 v2.53.2 h1:4G/4fl9x722Yb8hLqH1YU3XZNRJFwl5KUMvpkmAyuC8=
221+
github.com/vektra/mockery/v2 v2.53.2/go.mod h1:UJT+mgXhCcOCHXTnM5cJHCZL+d76BYB+EbY1sFztEB8=
220222
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
221223
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
222224
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

pkg/resourcecreator/batch/job.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88

99
"github.com/nais/naiserator/pkg/resourcecreator/pod"
1010
"github.com/nais/naiserator/pkg/resourcecreator/resource"
11-
"github.com/nais/naiserator/pkg/util"
1211
)
1312

1413
type Config interface {
@@ -24,7 +23,7 @@ func CreateJobSpec(naisjob *nais_io_v1.Naisjob, ast *resource.Ast, cfg Config) (
2423

2524
jobSpec := batchv1.JobSpec{
2625
ActiveDeadlineSeconds: naisjob.Spec.ActiveDeadlineSeconds,
27-
BackoffLimit: util.Int32p(naisjob.Spec.BackoffLimit),
26+
BackoffLimit: naisjob.Spec.BackoffLimit,
2827
Completions: naisjob.Spec.Completions,
2928
Parallelism: naisjob.Spec.Parallelism,
3029
Template: corev1.PodTemplateSpec{

0 commit comments

Comments
 (0)