Skip to content

Commit

Permalink
Making ImagePullPolicy in NMC optional
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yevgeny-shnaidman authored and k8s-ci-robot committed Dec 10, 2024
1 parent e63298a commit 633db0f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions api/v1beta1/nodemodulesconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type ModuleConfig struct {
KernelVersion string `json:"kernelVersion"`
ContainerImage string `json:"containerImage"`
// +kubebuilder:default=IfNotPresent
//+optional
ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy"`
// When InsecurePull is true, the container image can be pulled without TLS.
InsecurePull bool `json:"insecurePull"`
Expand Down
2 changes: 0 additions & 2 deletions config/crd/bases/kmm.sigs.x-k8s.io_nodemodulesconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ spec:
type: array
required:
- containerImage
- imagePullPolicy
- insecurePull
- kernelVersion
- modprobe
Expand Down Expand Up @@ -384,7 +383,6 @@ spec:
type: array
required:
- containerImage
- imagePullPolicy
- insecurePull
- kernelVersion
- modprobe
Expand Down

0 comments on commit 633db0f

Please sign in to comment.