@@ -23,57 +23,109 @@ import (
23
23
24
24
// PinotSpec defines the desired state of Pinot
25
25
type PinotSpec struct {
26
- DeploymentOrder []PinotNodeType `json:"deploymentOrder"`
27
- External ExternalSpec `json:"external,omitempty"`
28
- K8sConfig []K8sConfig `json:"k8sConfig"`
26
+ // +optional
27
+ Plugins []string `json:"plugins"`
28
+ // +required
29
+ DeploymentOrder []PinotNodeType `json:"deploymentOrder"`
30
+ // +required
31
+ External ExternalSpec `json:"external,omitempty"`
32
+ // +required
33
+ K8sConfig []K8sConfig `json:"k8sConfig"`
34
+ // +required
29
35
PinotNodeConfig []PinotNodeConfig `json:"pinotNodeConfig"`
30
- Nodes []NodeSpec `json:"nodes"`
36
+ // +required
37
+ Nodes []NodeSpec `json:"nodes"`
31
38
}
32
39
33
40
type ExternalSpec struct {
41
+ // +required
34
42
Zookeeper ZookeeperSpec `json:"zookeeper"`
43
+ // +optional
44
+ DeepStorage DeepStorageSpec `json:"deepStorage"`
35
45
}
36
46
37
47
type ZookeeperSpec struct {
48
+ // +required
38
49
Spec ZookeeperConfig `json:"spec"`
39
50
}
40
51
41
52
type ZookeeperConfig struct {
53
+ // +required
42
54
ZkAddress string `json:"zkAddress"`
43
55
}
44
56
57
+ type DeepStorageSpec struct {
58
+ // +optional
59
+ Spec []DeepStorageConfig `json:"spec"`
60
+ }
61
+
62
+ type DeepStorageConfig struct {
63
+ // +optional
64
+ NodeType PinotNodeType `json:"nodeType"`
65
+ // +optional
66
+ Data string `json:"data"`
67
+ }
68
+
45
69
type K8sConfig struct {
46
- Name string `json:"name"`
47
- Volumes []v1.Volume `json:"volumes,omitempty"`
48
- Port []v1.ContainerPort `json:"port"`
49
- VolumeMount []v1.VolumeMount `json:"volumeMount,omitempty"`
50
- Image string `json:"image"`
51
- ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"`
52
- ServiceAccountName string `json:"serviceAccountName,omitempty"`
53
- Env []v1.EnvVar `json:"env,omitempty"`
54
- Tolerations []v1.Toleration `json:"tolerations,omitempty"`
55
- PodMetadata Metadata `json:"podMetadata,omitempty"`
56
- StorageConfig []StorageConfig `json:"storageConfig,omitempty"`
57
- NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
58
- Service * v1.ServiceSpec `json:"service,omitempty"`
59
- Resources v1.ResourceRequirements `json:"resources,omitempty"`
70
+ // +required
71
+ Name string `json:"name"`
72
+ // +optional
73
+ Volumes []v1.Volume `json:"volumes,omitempty"`
74
+ // +required
75
+ Port []v1.ContainerPort `json:"port"`
76
+ // +optional
77
+ VolumeMount []v1.VolumeMount `json:"volumeMount,omitempty"`
78
+ // +required
79
+ Image string `json:"image"`
80
+ // +optional
81
+ ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"`
82
+ // +optional
83
+ ServiceAccountName string `json:"serviceAccountName,omitempty"`
84
+ // +optional
85
+ Env []v1.EnvVar `json:"env,omitempty"`
86
+ // +optional
87
+ Tolerations []v1.Toleration `json:"tolerations,omitempty"`
88
+ // +optional
89
+ PodMetadata Metadata `json:"podMetadata,omitempty"`
90
+ // +optional
91
+ StorageConfig []StorageConfig `json:"storageConfig,omitempty"`
92
+ // +optional
93
+ NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
94
+ // +optional
95
+ Service * v1.ServiceSpec `json:"service,omitempty"`
96
+ // +optional
97
+ LivenessProbe * v1.Probe `json:"livenessProbe,omitempty"`
98
+ // +optional
99
+ ReadinessProbe * v1.Probe `json:"readinessProbe,omitempty"`
100
+ // +optional
101
+ StartUpProbe * v1.Probe `json:"startUpProbe,omitempty"`
102
+ // +optional
103
+ Resources v1.ResourceRequirements `json:"resources,omitempty"`
60
104
}
61
105
62
106
type Metadata struct {
107
+ // +optional
63
108
Annotations map [string ]string `json:"annotations,omitempty"`
64
- Labels map [string ]string `json:"labels,omitempty"`
109
+ // +optional
110
+ Labels map [string ]string `json:"labels,omitempty"`
65
111
}
66
112
67
113
type StorageConfig struct {
68
- Name string `json:"name"`
69
- MountPath string `json:"mountPath"`
70
- PvcSpec v1.PersistentVolumeClaimSpec `json:"spec"`
114
+ // +required
115
+ Name string `json:"name"`
116
+ // +required
117
+ MountPath string `json:"mountPath"`
118
+ // +required
119
+ PvcSpec v1.PersistentVolumeClaimSpec `json:"spec"`
71
120
}
72
121
73
122
type PinotNodeConfig struct {
74
- Name string `json:"name"`
123
+ // +required
124
+ Name string `json:"name"`
125
+ // +required
75
126
JavaOpts string `json:"java_opts"`
76
- Data string `json:"data"`
127
+ // +required
128
+ Data string `json:"data"`
77
129
}
78
130
79
131
type PinotNodeType string
@@ -86,12 +138,18 @@ const (
86
138
)
87
139
88
140
type NodeSpec struct {
89
- Name string `json:"name"`
90
- Kind string `json:"kind"`
91
- NodeType PinotNodeType `json:"nodeType"`
92
- Replicas int `json:"replicas"`
93
- K8sConfig string `json:"k8sConfig"`
94
- PinotNodeConfig string `json:"pinotNodeConfig"`
141
+ // +required
142
+ Name string `json:"name"`
143
+ // +required
144
+ Kind string `json:"kind"`
145
+ // +required
146
+ NodeType PinotNodeType `json:"nodeType"`
147
+ // +required
148
+ Replicas int `json:"replicas"`
149
+ // +required
150
+ K8sConfig string `json:"k8sConfig"`
151
+ // +required
152
+ PinotNodeConfig string `json:"pinotNodeConfig"`
95
153
}
96
154
97
155
// PinotStatus defines the observed state of Pinot
0 commit comments