Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 909426e

Browse files
committed
Make ImageVolumeSource.Reference required via OpenAPI
OpenAPI validation does not count toward the CRD XValidation CEL budget.
1 parent da69a57 commit 909426e

File tree

5 files changed

+153
-90
lines changed

5 files changed

+153
-90
lines changed

‎config/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,6 +2629,11 @@ spec:
26292629
Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present.
26302630
IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.
26312631
Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
2632+
enum:
2633+
- Always
2634+
- Never
2635+
- IfNotPresent
2636+
maxLength: 12
26322637
type: string
26332638
reference:
26342639
description: |-
@@ -2638,7 +2643,10 @@ spec:
26382643
More info: https://kubernetes.io/docs/concepts/containers/images
26392644
This field is optional to allow higher level config management to default or override
26402645
container images in workload controllers like Deployments and StatefulSets.
2646+
minLength: 1
26412647
type: string
2648+
required:
2649+
- reference
26422650
type: object
26432651
name:
26442652
description: |-
@@ -2659,11 +2667,8 @@ spec:
26592667
x-kubernetes-validations:
26602668
- message: you must set only one of image or claimName
26612669
rule: has(self.claimName) != has(self.image)
2662-
- message: readOnly cannot be set false when using an ImageVolumeSource
2670+
- message: image volumes must be readOnly
26632671
rule: '!has(self.image) || !has(self.readOnly) || self.readOnly'
2664-
- message: if using an ImageVolumeSource, you must set a reference
2665-
rule: '!has(self.image) || (self.?image.reference.hasValue()
2666-
&& self.image.reference.size() > 0)'
26672672
maxItems: 10
26682673
type: array
26692674
x-kubernetes-list-map-keys:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /