Skip to content

Commit 5c63345

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 305bcbf commit 5c63345

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
@@ -156,7 +156,6 @@ spec:
156156
type: object
157157
required:
158158
- containerImage
159-
- imagePullPolicy
160159
- insecurePull
161160
- kernelVersion
162161
- modprobe
@@ -308,7 +307,6 @@ spec:
308307
type: object
309308
required:
310309
- containerImage
311-
- imagePullPolicy
312310
- insecurePull
313311
- kernelVersion
314312
- modprobe

0 commit comments

Comments
 (0)