github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/risingwave/templates/clusterdefinition.yaml (about) 1 apiVersion: apps.kubeblocks.io/v1alpha1 2 kind: ClusterDefinition 3 metadata: 4 name: risingwave 5 labels: 6 {{- include "risingwave.labels" . | nindent 4 }} 7 spec: 8 type: risingwave 9 connectionCredential: 10 username: "root" 11 password: "" 12 endpoint: "$(SVC_FQDN):$(SVC_PORT_svc)" 13 componentDefs: 14 - name: frontend 15 workloadType: Stateless 16 characterType: frontend 17 statelessSpec: 18 updateStrategy: 19 type: Recreate 20 componentDefRef: 21 - componentDefName: meta 22 componentRefEnv: 23 - name: metaSvc 24 valueFrom: 25 type: ServiceRef 26 monitor: 27 builtIn: true 28 exporterConfig: 29 scrapePort: metrics 30 scrapePath: /metrics 31 configSpecs: 32 - name: risingwave-configuration 33 templateRef: {{ include "risingwave.name" . }}-conf-tpl 34 namespace: {{ .Release.Namespace }} 35 volumeName: risingwave-configuration 36 service: 37 ports: 38 - port: 4567 39 targetPort: svc 40 name: svc 41 - port: 8080 42 targetPort: metrics 43 name: metrics 44 podSpec: 45 containers: 46 - name: frontend 47 securityContext: 48 allowPrivilegeEscalation: false 49 capabilities: 50 drop: 51 - ALL 52 privileged: false 53 command: 54 - /risingwave/bin/risingwave 55 - frontend-node 56 env: 57 - name: RUST_BACKTRACE 58 value: "1" 59 - name: RW_LISTEN_ADDR 60 value: "0.0.0.0:4567" 61 - name: RW_CONFIG_PATH 62 value: /risingwave/config/risingwave.toml 63 - name: RW_ADVERTISE_ADDR 64 value: "$(KB_POD_NAME):4567" 65 - name: RW_META_ADDR 66 value: load-balance+http://$(metaSvc)-headless:5690 67 - name: RW_METRICS_LEVEL 68 value: "1" 69 - name: RW_PROMETHEUS_LISTENER_ADDR 70 value: "0.0.0.0:8080" 71 ports: 72 - containerPort: 4567 73 name: svc 74 protocol: TCP 75 - containerPort: 8080 76 name: metrics 77 protocol: TCP 78 volumeMounts: 79 - name: risingwave-configuration 80 mountPath: /risingwave/config 81 livenessProbe: 82 failureThreshold: 3 83 tcpSocket: 84 port: svc 85 initialDelaySeconds: 5 86 periodSeconds: 10 87 successThreshold: 1 88 timeoutSeconds: 30 89 readinessProbe: 90 failureThreshold: 3 91 tcpSocket: 92 port: svc 93 initialDelaySeconds: 5 94 periodSeconds: 10 95 successThreshold: 1 96 timeoutSeconds: 30 97 resources: 98 requests: 99 cpu: 100m 100 memory: 256Mi 101 - name: meta 102 workloadType: Stateful 103 characterType: meta 104 statefulSpec: 105 updateStrategy: BestEffortParallel 106 componentDefRef: 107 - componentDefName: connector 108 componentRefEnv: 109 - name: connectorSvc 110 valueFrom: 111 type: ServiceRef 112 monitor: 113 builtIn: true 114 exporterConfig: 115 scrapePort: metrics 116 scrapePath: /metrics 117 configSpecs: 118 - name: risingwave-configuration 119 templateRef: {{ include "risingwave.name" . }}-conf-tpl 120 namespace: {{ .Release.Namespace }} 121 volumeName: risingwave-configuration 122 service: 123 ports: 124 - port: 5690 125 targetPort: svc 126 name: svc 127 - port: 5691 128 targetPort: dashboard 129 name: dashboard 130 - port: 1250 131 targetPort: metrics 132 name: metrics 133 podSpec: 134 containers: 135 - name: meta 136 securityContext: 137 allowPrivilegeEscalation: false 138 capabilities: 139 drop: 140 - ALL 141 privileged: false 142 command: 143 - /risingwave/bin/risingwave 144 - meta-node 145 env: 146 - name: RUST_BACKTRACE 147 value: "1" 148 - name: RW_CONFIG_PATH 149 value: /risingwave/config/risingwave.toml 150 - name: RW_LISTEN_ADDR 151 value: 0.0.0.0:5690 152 - name: RW_ADVERTISE_ADDR 153 value: $(KB_POD_FQDN):5690 154 - name: RW_DASHBOARD_HOST 155 value: 0.0.0.0:5691 156 - name: RW_PROMETHEUS_HOST 157 value: 0.0.0.0:1250 158 - name: RW_CONNECTOR_RPC_ENDPOINT 159 value: $(connectorSvc):50051 160 - name: RW_BACKEND 161 value: etcd 162 ports: 163 - containerPort: 5690 164 name: svc 165 protocol: TCP 166 - containerPort: 5691 167 name: dashboard 168 protocol: TCP 169 - containerPort: 1250 170 name: metrics 171 protocol: TCP 172 volumeMounts: 173 - name: risingwave-configuration 174 mountPath: /risingwave/config 175 livenessProbe: 176 failureThreshold: 3 177 tcpSocket: 178 port: svc 179 initialDelaySeconds: 5 180 periodSeconds: 10 181 successThreshold: 1 182 timeoutSeconds: 30 183 readinessProbe: 184 failureThreshold: 3 185 tcpSocket: 186 port: svc 187 initialDelaySeconds: 5 188 periodSeconds: 10 189 successThreshold: 1 190 timeoutSeconds: 30 191 resources: 192 requests: 193 cpu: 100m 194 memory: 256Mi 195 - name: compactor 196 workloadType: Stateless 197 characterType: compactor 198 statelessSpec: 199 updateStrategy: 200 type: Recreate 201 componentDefRef: 202 - componentDefName: meta 203 componentRefEnv: 204 - name: metaSvc 205 valueFrom: 206 type: ServiceRef 207 monitor: 208 builtIn: true 209 exporterConfig: 210 scrapePort: metrics 211 scrapePath: /metrics 212 configSpecs: 213 - name: risingwave-configuration 214 templateRef: {{ include "risingwave.name" . }}-conf-tpl 215 namespace: {{ .Release.Namespace }} 216 volumeName: risingwave-configuration 217 service: 218 ports: 219 - port: 6660 220 targetPort: svc 221 name: svc 222 - port: 1260 223 targetPort: metrics 224 name: metrics 225 podSpec: 226 containers: 227 - name: compactor 228 securityContext: 229 allowPrivilegeEscalation: false 230 capabilities: 231 drop: 232 - ALL 233 privileged: false 234 command: 235 - /risingwave/bin/risingwave 236 - compactor-node 237 env: 238 - name: RUST_BACKTRACE 239 value: "1" 240 - name: RW_CONFIG_PATH 241 value: /risingwave/config/risingwave.toml 242 - name: RW_LISTEN_ADDR 243 value: 0.0.0.0:6660 244 - name: RW_ADVERTISE_ADDR 245 value: $(KB_POD_IP):6660 246 - name: RW_PROMETHEUS_LISTENER_ADDR 247 value: 0.0.0.0:1260 248 - name: RW_META_ADDR 249 value: load-balance+http://$(metaSvc)-headless:5690 250 - name: RW_METRICS_LEVEL 251 value: "1" 252 ports: 253 - containerPort: 6660 254 name: svc 255 protocol: TCP 256 - containerPort: 1260 257 name: metrics 258 protocol: TCP 259 volumeMounts: 260 - name: risingwave-configuration 261 mountPath: /risingwave/config 262 livenessProbe: 263 failureThreshold: 3 264 tcpSocket: 265 port: svc 266 initialDelaySeconds: 5 267 periodSeconds: 10 268 successThreshold: 1 269 timeoutSeconds: 30 270 readinessProbe: 271 failureThreshold: 3 272 tcpSocket: 273 port: svc 274 initialDelaySeconds: 5 275 periodSeconds: 10 276 successThreshold: 1 277 timeoutSeconds: 30 278 resources: 279 requests: 280 cpu: 100m 281 memory: 256Mi 282 - name: compute 283 workloadType: Stateful 284 characterType: compute 285 statefulSpec: 286 updateStrategy: BestEffortParallel 287 componentDefRef: 288 - componentDefName: meta 289 componentRefEnv: 290 - name: metaSvc 291 valueFrom: 292 type: ServiceRef 293 - componentDefName: connector 294 componentRefEnv: 295 - name: connectorSvc 296 valueFrom: 297 type: ServiceRef 298 monitor: 299 builtIn: true 300 exporterConfig: 301 scrapePort: metrics 302 scrapePath: /metrics 303 configSpecs: 304 - name: risingwave-configuration 305 templateRef: {{ include "risingwave.name" . }}-conf-tpl 306 namespace: {{ .Release.Namespace }} 307 volumeName: risingwave-configuration 308 - name: risingwave-compute-envs 309 templateRef: {{ include "risingwave.name" . }}-compute-envs-tpl 310 namespace: {{ .Release.Namespace }} 311 volumeName: risingwave-compute-envs 312 asEnvFrom: 313 - compute 314 service: 315 ports: 316 - port: 5688 317 targetPort: svc 318 name: svc 319 - port: 1222 320 targetPort: metrics 321 name: metrics 322 podSpec: 323 containers: 324 - name: compute 325 securityContext: 326 allowPrivilegeEscalation: false 327 capabilities: 328 drop: 329 - ALL 330 privileged: false 331 command: 332 - /risingwave/bin/risingwave 333 - compute-node 334 env: 335 - name: RUST_BACKTRACE 336 value: "1" 337 - name: RW_CONFIG_PATH 338 value: /risingwave/config/risingwave.toml 339 - name: RW_LISTEN_ADDR 340 value: 0.0.0.0:5688 341 - name: RW_ADVERTISE_ADDR 342 value: $(KB_POD_FQDN):5688 343 - name: RW_META_ADDR 344 value: load-balance+http://$(metaSvc)-headless:5690 345 - name: RW_METRICS_LEVEL 346 value: "1" 347 - name: RW_CONNECTOR_RPC_ENDPOINT 348 value: $(connectorSvc):50051 349 - name: RW_PROMETHEUS_LISTENER_ADDR 350 value: 0.0.0.0:1222 351 ports: 352 - containerPort: 5688 353 name: svc 354 protocol: TCP 355 - containerPort: 1222 356 name: metrics 357 protocol: TCP 358 volumeMounts: 359 - name: risingwave-configuration 360 mountPath: /risingwave/config 361 livenessProbe: 362 failureThreshold: 3 363 tcpSocket: 364 port: svc 365 initialDelaySeconds: 5 366 periodSeconds: 10 367 successThreshold: 1 368 timeoutSeconds: 30 369 readinessProbe: 370 failureThreshold: 3 371 tcpSocket: 372 port: svc 373 initialDelaySeconds: 5 374 periodSeconds: 10 375 successThreshold: 1 376 timeoutSeconds: 30 377 resources: 378 requests: 379 cpu: 100m 380 memory: 256Mi 381 - name: connector 382 workloadType: Stateless 383 characterType: connector 384 statelessSpec: 385 updateStrategy: 386 type: Recreate 387 monitor: 388 builtIn: false 389 exporterConfig: 390 scrapePort: metrics 391 scrapePath: /metrics 392 configSpecs: 393 - name: risingwave-configuration 394 templateRef: {{ include "risingwave.name" . }}-conf-tpl 395 namespace: {{ .Release.Namespace }} 396 volumeName: risingwave-configuration 397 - name: risingwave-connector-envs 398 templateRef: {{ include "risingwave.name" . }}-connector-envs-tpl 399 namespace: {{ .Release.Namespace }} 400 volumeName: risingwave-connector-envs 401 asEnvFrom: 402 - connector 403 service: 404 ports: 405 - port: 50051 406 targetPort: svc 407 name: svc 408 - port: 50052 409 targetPort: metrics 410 name: metrics 411 podSpec: 412 containers: 413 - name: connector 414 securityContext: 415 allowPrivilegeEscalation: false 416 capabilities: 417 drop: 418 - ALL 419 privileged: false 420 command: 421 - /risingwave/bin/connector-node/start-service.sh 422 args: 423 - -p 424 - "50051" 425 env: 426 - name: RW_CONNECTOR_NODE_PROMETHEUS_PORT 427 value: "50052" 428 ports: 429 - containerPort: 50051 430 name: svc 431 protocol: TCP 432 - containerPort: 50052 433 name: metrics 434 protocol: TCP 435 volumeMounts: 436 - name: risingwave-configuration 437 mountPath: /risingwave/config 438 livenessProbe: 439 failureThreshold: 5 440 tcpSocket: 441 port: svc 442 initialDelaySeconds: 5 443 periodSeconds: 10 444 successThreshold: 1 445 timeoutSeconds: 30 446 readinessProbe: 447 failureThreshold: 5 448 tcpSocket: 449 port: svc 450 initialDelaySeconds: 5 451 periodSeconds: 10 452 successThreshold: 1 453 timeoutSeconds: 30 454 resources: 455 requests: 456 cpu: 100m 457 memory: 256Mi