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 (
2020 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121)
2222
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-
2623// OperatorSpec defines the desired state of Operator
2724type 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"`
3328}
3429
3530// 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 {}
4032
4133//+kubebuilder:object:root=true
4234//+kubebuilder:subresource:status
Original file line number Diff line number Diff line change @@ -35,10 +35,12 @@ spec:
3535 spec :
3636 description : OperatorSpec defines the desired state of Operator
3737 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]+)*$
4141 type : string
42+ required :
43+ - packageName
4244 type : object
4345 status :
4446 description : OperatorStatus defines the observed state of Operator
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ metadata:
1010 name : operator-sample
1111spec :
1212 # TODO(user): Add fields here
13+ packageName : my-operator
You can’t perform that action at this time.
0 commit comments