Add kubebuilder example and validation
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
This commit is contained in:
parent
ba56f153aa
commit
e3545e8b2c
|
|
@ -2674,8 +2674,9 @@ spec:
|
|||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
targetPlatform:
|
||||
description: Platform specifies the target platform to build the seedimage
|
||||
for.
|
||||
description: 'Platform specifies the target platform for the built
|
||||
image. Example: linux/amd64'
|
||||
pattern: ^$|^\S+\/\S+$
|
||||
type: string
|
||||
type:
|
||||
default: iso
|
||||
|
|
|
|||
|
|
@ -54,7 +54,10 @@ type SeedImageSpec struct {
|
|||
// +kubebuilder:validation:Enum=iso;raw
|
||||
// +kubebuilder:default:=iso
|
||||
Type SeedImageType `json:"type"`
|
||||
// Platform specifies the target platform to build the seedimage for.
|
||||
// Platform specifies the target platform for the built image. Example: linux/amd64
|
||||
// +kubebuilder:example=linux/amd64
|
||||
// +kubebuilder:validation:Pattern=`^$|^\S+\/\S+$`
|
||||
// +kubebuilder:validation:Type=string
|
||||
// +optional
|
||||
TargetPlatform Platform `json:"targetPlatform"`
|
||||
// CloudConfig contains cloud-config data to be put in the generated iso.
|
||||
|
|
|
|||
|
|
@ -124,8 +124,9 @@ spec:
|
|||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
targetPlatform:
|
||||
description: Platform specifies the target platform to build the seedimage
|
||||
for.
|
||||
description: 'Platform specifies the target platform for the built
|
||||
image. Example: linux/amd64'
|
||||
pattern: ^$|^\S+\/\S+$
|
||||
type: string
|
||||
type:
|
||||
default: iso
|
||||
|
|
|
|||
Loading…
Reference in New Issue