@@ -155,6 +155,25 @@ type KubeletConfiguration struct {
155
155
// pulls to burst to this number, while still not exceeding registryPullQPS.
156
156
// Only used if registryPullQPS > 0.
157
157
RegistryBurst int32
158
+ // imagePullCredentialsVerificationPolicy determines how credentials should be
159
+ // verified when pod requests an image that is already present on the node:
160
+ // - NeverVerify
161
+ // - anyone on a node can use any image present on the node
162
+ // - NeverVerifyPreloadedImages
163
+ // - images that were pulled to the node by something else than the kubelet
164
+ // can be used without reverifying pull credentials
165
+ // - NeverVerifyAllowlistedImages
166
+ // - like "NeverVerifyPreloadedImages" but only node images from
167
+ // `preloadedImagesVerificationAllowlist` don't require reverification
168
+ // - AlwaysVerify
169
+ // - all images require credential reverification
170
+ ImagePullCredentialsVerificationPolicy string
171
+ // preloadedImagesVerificationAllowlist specifies a list of images that are
172
+ // exempted from credential reverification for the "NeverVerifyAllowlistedImages"
173
+ // `imagePullCredentialsVerificationPolicy`.
174
+ // The list accepts a full path segment wildcard suffix "/*".
175
+ // Only use image specs without an image tag or digest.
176
+ PreloadedImagesVerificationAllowlist []string
158
177
// eventRecordQPS is the maximum event creations per second. If 0, there
159
178
// is no limit enforced.
160
179
EventRecordQPS int32
@@ -770,6 +789,25 @@ type CrashLoopBackOffConfig struct {
770
789
MaxContainerRestartPeriod * metav1.Duration
771
790
}
772
791
792
+ // ImagePullCredentialsVerificationPolicy is an enum for the policy that is enforced
793
+ // when pod is requesting an image that appears on the system
794
+ type ImagePullCredentialsVerificationPolicy string
795
+
796
+ const (
797
+ // NeverVerify will never require credential verification for images that
798
+ // already exist on the node
799
+ NeverVerify ImagePullCredentialsVerificationPolicy = "NeverVerify"
800
+ // NeverVerifyPreloadedImages does not require credential verification for images
801
+ // pulled outside the kubelet process
802
+ NeverVerifyPreloadedImages ImagePullCredentialsVerificationPolicy = "NeverVerifyPreloadedImages"
803
+ // NeverVerifyAllowlistedImages does not require credential verification for
804
+ // a list of images that were pulled outside the kubelet process
805
+ NeverVerifyAllowlistedImages ImagePullCredentialsVerificationPolicy = "NeverVerifyAllowlistedImages"
806
+ // AlwaysVerify requires credential verification for accessing any image on the
807
+ // node irregardless how it was pulled
808
+ AlwaysVerify ImagePullCredentialsVerificationPolicy = "AlwaysVerify"
809
+ )
810
+
773
811
// ImagePullIntent is a record of the kubelet attempting to pull an image.
774
812
//
775
813
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
0 commit comments