Skip to content

Commit 633db0f

Browse files
yevgeny-shnaidmank8s-ci-robot
authored andcommitted
Making ImagePullPolicy in NMC optional
Currently ImagePullPolicy has a kubebuilder instruction for default value, which automatically makes it a required field. In previous version, this field was optional, meaning: when upgrading KMM operator, the upgrade will fail , since NMC object will be missing the required field This commit keep the default value, but makes this field optional, in order to solve the upgrade issue
1 parent e63298a commit 633db0f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

api/v1beta1/nodemodulesconfig_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type ModuleConfig struct {
2525
KernelVersion string `json:"kernelVersion"`
2626
ContainerImage string `json:"containerImage"`
2727
// +kubebuilder:default=IfNotPresent
28+
//+optional
2829
ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy"`
2930
// When InsecurePull is true, the container image can be pulled without TLS.
3031
InsecurePull bool `json:"insecurePull"`

config/crd/bases/kmm.sigs.x-k8s.io_nodemodulesconfigs.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ spec:
194194
type: array
195195
required:
196196
- containerImage
197-
- imagePullPolicy
198197
- insecurePull
199198
- kernelVersion
200199
- modprobe
@@ -384,7 +383,6 @@ spec:
384383
type: array
385384
required:
386385
- containerImage
387-
- imagePullPolicy
388386
- insecurePull
389387
- kernelVersion
390388
- modprobe

0 commit comments

Comments
 (0)