Skip to content

Commit 37cd7cc

Browse files
ybettank8s-ci-robot
authored andcommitted
Fixing the GCDelay configuration option default value documentation.
Setting it to `0s` instead of `0` to emphasise the `time.Duration` type instead of a normal `int` which will result in a user error. Also, explicitly set the `GCDelay` default value so we have all default values in a single place for clarity. Signed-off-by: Yoni Bettan <[email protected]>
1 parent da46a78 commit 37cd7cc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/mkdocs/documentation/configure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Default value: `:8081`.
4040
Defines the duration for which successful build pods should be preserved before they are deleted.
4141
Refer to the Go [`ParseDuration`](https://pkg.go.dev/time#ParseDuration) function documentation to understand valid
4242
values for this setting.
43-
Default value: `0`.
43+
Default value: `0s`.
4444

4545
#### `leaderElection.enabled`
4646

internal/config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ func (ch *configHelper) decodeStrictYAMLIntoConfig(yamlData []byte, config *Conf
166166

167167
func (ch *configHelper) newDefaultConfig(isHubConfig bool) *Config {
168168
leaderElectionResourceID := "kmm.sigs.x-k8s.io"
169+
gcDelay, _ := time.ParseDuration("0s")
169170
if isHubConfig {
170171
leaderElectionResourceID = "kmm-hub.sigs.x-k8s.io"
171172
}
@@ -186,5 +187,8 @@ func (ch *configHelper) newDefaultConfig(isHubConfig bool) *Config {
186187
SELinuxType: "spc_t",
187188
FirmwareHostPath: ptr.To("/lib/firmware"),
188189
},
190+
Job: Job{
191+
GCDelay: gcDelay,
192+
},
189193
}
190194
}

0 commit comments

Comments
 (0)