File tree Expand file tree Collapse file tree 3 files changed +10
-15
lines changed Expand file tree Collapse file tree 3 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -20,23 +20,15 @@ import (
20
20
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21
21
)
22
22
23
- // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
24
- // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
25
-
26
23
// OperatorSpec defines the desired state of Operator
27
24
type OperatorSpec struct {
28
- // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
29
- // Important: Run "make" to regenerate code after modifying this file
30
-
31
- // Foo is an example field of Operator. Edit operator_types.go to remove/update
32
- Foo string `json:"foo,omitempty"`
25
+ //+kubebuilder:validation:MaxLength:=48
26
+ //+kubebuilder:validation:Pattern:=^[a-z0-9]+(-[a-z0-9]+)*$
27
+ PackageName string `json:"packageName"`
33
28
}
34
29
35
30
// OperatorStatus defines the observed state of Operator
36
- type OperatorStatus struct {
37
- // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
38
- // Important: Run "make" to regenerate code after modifying this file
39
- }
31
+ type OperatorStatus struct {}
40
32
41
33
//+kubebuilder:object:root=true
42
34
//+kubebuilder:subresource:status
Original file line number Diff line number Diff line change @@ -35,10 +35,12 @@ spec:
35
35
spec :
36
36
description : OperatorSpec defines the desired state of Operator
37
37
properties :
38
- foo :
39
- description : Foo is an example field of Operator. Edit operator_types.go
40
- to remove/update
38
+ packageName :
39
+ maxLength : 48
40
+ pattern : ^[a-z0-9]+(-[a-z0-9]+)*$
41
41
type : string
42
+ required :
43
+ - packageName
42
44
type : object
43
45
status :
44
46
description : OperatorStatus defines the observed state of Operator
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ metadata:
10
10
name : operator-sample
11
11
spec :
12
12
# TODO(user): Add fields here
13
+ packageName : my-operator
You can’t perform that action at this time.
0 commit comments