Skip to content

Commit 4ac2be3

Browse files
yevgeny-shnaidmank8s-ci-robot
authored andcommitted
Adding pull policy specification to the MIC CRD
This policy will be used by the image puller pod. Currently image puller pod uses IfNotPresent, which may create a discrepance with worker pod whcih uses the pull policy of the KMM Module. So, image may be present on the node, but not in repo, and in that case , image puller will be successful, while worker will fail with pull policy Always
1 parent 54a3c54 commit 4ac2be3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

api/v1beta1/moduleimagesconfig_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ type ModuleImagesConfigSpec struct {
6767
// ImageRepoSecret contains pull secret for the image's repo, if needed
6868
// +optional
6969
ImageRepoSecret *v1.LocalObjectReference `json:"imageRepoSecret,omitempty"`
70+
71+
// +kubebuilder:default=IfNotPresent
72+
// ImagePullPolicy defines the pull policy used for verifying the presence of the image
73+
//+optional
74+
ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy"`
7075
}
7176

7277
type ModuleImageState struct {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ spec:
4444
ModuleImagesConfigSpec describes the images of the Module whose status needs to be verified
4545
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
4646
properties:
47+
imagePullPolicy:
48+
default: IfNotPresent
49+
description: ImagePullPolicy defines the pull policy used for verifying
50+
the presence of the image
51+
type: string
4752
imageRepoSecret:
4853
description: ImageRepoSecret contains pull secret for the image's
4954
repo, if needed

0 commit comments

Comments
 (0)