Skip to content

Commit e1458e9

Browse files
authored
Merge pull request #11 from datainfrahq/deepstorage
Deepstorage and Fixes
2 parents 4b426d1 + aef2b06 commit e1458e9

File tree

17 files changed

+1889
-56
lines changed

17 files changed

+1889
-56
lines changed

Makefile

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,35 +162,55 @@ $(ENVTEST): $(LOCALBIN)
162162

163163
ZK_OPERATOR_VERSION = 0.2.15
164164
ZK_VERSION = 0.2.15
165+
PINOT_OPERATOR_NAMESPACE=pinot-operator
166+
MINIO_OPERATOR_NAMESPACE=minio-operator
167+
ZOOKEEPER_OPERATOR_NAMESPACE=zookeeper-operator
168+
PINOT_CLUSTER_NAMESPACE=pinot
165169

166170
.PHONY: helm-install-pinot-operator
167171
helm-install-pinot-operator: ## helm upgrade/install
168172
helm upgrade --install \
169-
--namespace pinot-operator \
173+
--namespace ${PINOT_OPERATOR_NAMESPACE} \
170174
--create-namespace \
171-
pinot-operator helm/pinot-operator
175+
${PINOT_OPERATOR_NAMESPACE} helm/pinot-operator
172176

173177
.PHONY: helm-install-zk-operator
174178
helm-install-zk-operator: ## helm upgrade/install
175179
helm repo add pravega https://charts.pravega.io
176180
helm repo update pravega
177181
helm upgrade --install \
178-
--namespace zookeeper-operator \
182+
--namespace ${ZOOKEEPER_OPERATOR_NAMESPACE} \
179183
--create-namespace \
180-
zk-operator pravega/zookeeper-operator \
184+
${ZOOKEEPER_OPERATOR_NAMESPACE} pravega/zookeeper-operator \
181185
--version=${ZK_OPERATOR_VERSION}
182186
helm upgrade --install zk-pinot \
183187
pravega/zookeeper \
184-
--namespace pinot \
188+
--namespace ${PINOT_CLUSTER_NAMESPACE} \
185189
--create-namespace \
186190
--version=${ZK_VERSION} \
187191
--set replicas=1 \
188192
--set persistence.storageClassName=${STORAGE_CLASS_NAME}
189193

190194
.PHONY: clean
191195
clean: ## clean up getting started
192-
kubectl delete -f examples/pinot-simple.yaml -n pinot
193-
helm delete zk-pinot -n pinot
194-
helm delete pinot-operator -n pinot-operator
195-
helm delete zk-operator -n zookeeper-operator
196-
kubectl delete ns pinot-operator zookeeper-operator pinot
196+
kubectl delete -f examples/pinot-simple.yaml -n ${PINOT_CLUSTER_NAMESPACE}
197+
helm delete zk-pinot -n ${PINOT_CLUSTER_NAMESPACE}
198+
helm delete pinot-operator -n ${PINOT_OPERATOR_NAMESPACE}
199+
helm delete zk-operator -n ${ZOOKEEPER_OPERATOR_NAMESPACE}
200+
kubectl delete ns ${PINOT_OPERATOR_NAMESPACE} ${ZOOKEEPER_OPERATOR_NAMESPACE} ${PINOT_CLUSTER_NAMESPACE}
201+
202+
## Helm deploy minio operator and minio
203+
.PHONY: helm-minio-install
204+
helm-minio-install:
205+
helm repo add minio https://operator.min.io/
206+
helm repo update minio
207+
helm upgrade --install \
208+
--namespace ${MINIO_OPERATOR_NAMESPACE} \
209+
--create-namespace \
210+
${MINIO_OPERATOR_NAMESPACE} minio/operator \
211+
-f e2e/configs/minio-operator-override.yaml
212+
helm upgrade --install \
213+
--namespace ${PINOT_CLUSTER_NAMESPACE} \
214+
--create-namespace \
215+
${PINOT_CLUSTER_NAMESPACE}-minio minio/tenant \
216+
-f e2e/configs/minio-tenant-override.yaml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
Pinot Kubernetes Operator for deploying and managing heterogenous apache pinot kubernetes clusters. This operator is based on [Dsoi-Spec](https://github.com/datainfrahq/dsoi-spec) and is built using [operator-runtime](https://github.com/datainfrahq/operator-runtime). This is a radical new approach that brings ease of use and decouples application and kubernetes in a way that it becomes easier for day 2 operations. The goal of this project is to build a control plane for managing apache pinot clusters. The underlying controllers are built on conditions ie orthogonal concepts and not state machines.
2121

22-
### Getting Started
22+
### Getting Started
2323

2424
```
2525
export STORAGE_CLASS_NAME=civo-volume

api/v1beta1/pinot_types.go

Lines changed: 88 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,57 +23,109 @@ import (
2323

2424
// PinotSpec defines the desired state of Pinot
2525
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
2935
PinotNodeConfig []PinotNodeConfig `json:"pinotNodeConfig"`
30-
Nodes []NodeSpec `json:"nodes"`
36+
// +required
37+
Nodes []NodeSpec `json:"nodes"`
3138
}
3239

3340
type ExternalSpec struct {
41+
// +required
3442
Zookeeper ZookeeperSpec `json:"zookeeper"`
43+
// +optional
44+
DeepStorage DeepStorageSpec `json:"deepStorage"`
3545
}
3646

3747
type ZookeeperSpec struct {
48+
// +required
3849
Spec ZookeeperConfig `json:"spec"`
3950
}
4051

4152
type ZookeeperConfig struct {
53+
// +required
4254
ZkAddress string `json:"zkAddress"`
4355
}
4456

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+
4569
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"`
60104
}
61105

62106
type Metadata struct {
107+
// +optional
63108
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"`
65111
}
66112

67113
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"`
71120
}
72121

73122
type PinotNodeConfig struct {
74-
Name string `json:"name"`
123+
// +required
124+
Name string `json:"name"`
125+
// +required
75126
JavaOpts string `json:"java_opts"`
76-
Data string `json:"data"`
127+
// +required
128+
Data string `json:"data"`
77129
}
78130

79131
type PinotNodeType string
@@ -86,12 +138,18 @@ const (
86138
)
87139

88140
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"`
95153
}
96154

97155
// PinotStatus defines the observed state of Pinot

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 58 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)