File tree Expand file tree Collapse file tree 9 files changed +45
-4
lines changed
pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/internal/templates/api
project-v3-with-deploy-image
project-v4-with-deploy-image Expand file tree Collapse file tree 9 files changed +45
-4
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ type {{ .Resource.Kind }}Spec struct {
77
77
// Important: Run "make" to regenerate code after modifying this file
78
78
79
79
// Size defines the number of {{ .Resource.Kind }} instances
80
+ // The following markers will use OpenAPI v3 schema to validate the value
81
+ // More info: https://book.kubebuilder.io/reference/markers/crd-validation.html
82
+ // +kubebuilder:validation:Minimum=1
83
+ // +kubebuilder:validation:Maximum=3
84
+ // +kubebuilder:validation:ExclusiveMaximum=false
80
85
Size int32 ` + "`" + `json:"size,omitempty"` + "`" + `
81
86
82
87
{{ if not (isEmptyStr .Port) -}}
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ type BusyboxSpec struct {
29
29
// Important: Run "make" to regenerate code after modifying this file
30
30
31
31
// Size defines the number of Busybox instances
32
+ // The following markers will use OpenAPI v3 schema to validate the value
33
+ // More info: https://book.kubebuilder.io/reference/markers/crd-validation.html
34
+ // +kubebuilder:validation:Minimum=1
35
+ // +kubebuilder:validation:Maximum=3
36
+ // +kubebuilder:validation:ExclusiveMaximum=false
32
37
Size int32 `json:"size,omitempty"`
33
38
}
34
39
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ type MemcachedSpec struct {
29
29
// Important: Run "make" to regenerate code after modifying this file
30
30
31
31
// Size defines the number of Memcached instances
32
+ // The following markers will use OpenAPI v3 schema to validate the value
33
+ // More info: https://book.kubebuilder.io/reference/markers/crd-validation.html
34
+ // +kubebuilder:validation:Minimum=1
35
+ // +kubebuilder:validation:Maximum=3
36
+ // +kubebuilder:validation:ExclusiveMaximum=false
32
37
Size int32 `json:"size,omitempty"`
33
38
34
39
// Port defines the port that will be used to init the container with the image
Original file line number Diff line number Diff line change 36
36
description : BusyboxSpec defines the desired state of Busybox
37
37
properties :
38
38
size :
39
- description : Size defines the number of Busybox instances
39
+ description : ' Size defines the number of Busybox instances The following
40
+ markers will use OpenAPI v3 schema to validate the value More info:
41
+ https://book.kubebuilder.io/reference/markers/crd-validation.html'
40
42
format : int32
43
+ maximum : 3
44
+ minimum : 1
41
45
type : integer
42
46
type : object
43
47
status :
Original file line number Diff line number Diff line change 41
41
format : int32
42
42
type : integer
43
43
size :
44
- description : Size defines the number of Memcached instances
44
+ description : ' Size defines the number of Memcached instances The following
45
+ markers will use OpenAPI v3 schema to validate the value More info:
46
+ https://book.kubebuilder.io/reference/markers/crd-validation.html'
45
47
format : int32
48
+ maximum : 3
49
+ minimum : 1
46
50
type : integer
47
51
type : object
48
52
status :
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ type BusyboxSpec struct {
29
29
// Important: Run "make" to regenerate code after modifying this file
30
30
31
31
// Size defines the number of Busybox instances
32
+ // The following markers will use OpenAPI v3 schema to validate the value
33
+ // More info: https://book.kubebuilder.io/reference/markers/crd-validation.html
34
+ // +kubebuilder:validation:Minimum=1
35
+ // +kubebuilder:validation:Maximum=3
36
+ // +kubebuilder:validation:ExclusiveMaximum=false
32
37
Size int32 `json:"size,omitempty"`
33
38
}
34
39
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ type MemcachedSpec struct {
29
29
// Important: Run "make" to regenerate code after modifying this file
30
30
31
31
// Size defines the number of Memcached instances
32
+ // The following markers will use OpenAPI v3 schema to validate the value
33
+ // More info: https://book.kubebuilder.io/reference/markers/crd-validation.html
34
+ // +kubebuilder:validation:Minimum=1
35
+ // +kubebuilder:validation:Maximum=3
36
+ // +kubebuilder:validation:ExclusiveMaximum=false
32
37
Size int32 `json:"size,omitempty"`
33
38
34
39
// Port defines the port that will be used to init the container with the image
Original file line number Diff line number Diff line change 36
36
description : BusyboxSpec defines the desired state of Busybox
37
37
properties :
38
38
size :
39
- description : Size defines the number of Busybox instances
39
+ description : ' Size defines the number of Busybox instances The following
40
+ markers will use OpenAPI v3 schema to validate the value More info:
41
+ https://book.kubebuilder.io/reference/markers/crd-validation.html'
40
42
format : int32
43
+ maximum : 3
44
+ minimum : 1
41
45
type : integer
42
46
type : object
43
47
status :
Original file line number Diff line number Diff line change 41
41
format : int32
42
42
type : integer
43
43
size :
44
- description : Size defines the number of Memcached instances
44
+ description : ' Size defines the number of Memcached instances The following
45
+ markers will use OpenAPI v3 schema to validate the value More info:
46
+ https://book.kubebuilder.io/reference/markers/crd-validation.html'
45
47
format : int32
48
+ maximum : 3
49
+ minimum : 1
46
50
type : integer
47
51
type : object
48
52
status :
You can’t perform that action at this time.
0 commit comments