github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/oceanbase/templates/clusterdefinition.yaml (about) 1 apiVersion: apps.kubeblocks.io/v1alpha1 2 kind: ClusterDefinition 3 metadata: 4 name: oceanbase 5 labels: 6 {{- include "oceanbase.labels" . | nindent 4 }} 7 spec: 8 connectionCredential: 9 username: root 10 password: "" 11 endpoint: "$(SVC_FQDN):$(SVC_PORT_sql)" 12 host: "$(SVC_FQDN)" 13 port: "$(SVC_PORT_sql)" 14 componentDefs: 15 - name: ob-bundle 16 characterType: oceanbase 17 workloadType: Stateful 18 service: 19 ports: 20 - name: sql 21 port: 2881 22 targetPort: 2881 23 - name: rpc 24 port: 2882 25 targetPort: 2882 26 statefulSpec: 27 minReadySeconds: 30 28 podSpec: 29 containers: 30 - name: observer-container 31 command: 32 - bash 33 - -c 34 - "./scripts/entrypoint.sh" 35 ports: 36 - containerPort: 2881 37 name: sql 38 protocol: TCP 39 - containerPort: 2882 40 name: rpc 41 protocol: TCP 42 readinessProbe: 43 failureThreshold: 10 44 initialDelaySeconds: 10 45 successThreshold: 1 46 timeoutSeconds: 5 47 exec: 48 command: 49 - cat 50 - /tmp/ready 51 resources: 52 limits: 53 cpu: "2" 54 memory: 10Gi 55 requests: 56 cpu: "2" 57 memory: 10Gi 58 volumeMounts: 59 - mountPath: /home/admin/data-file 60 name: data-file 61 - mountPath: /home/admin/data-log 62 name: data-log 63 - mountPath: /home/admin/log 64 name: log 65 workingDir: /home/admin/oceanbase 66 env: 67 - name: LD_LIBRARY_PATH 68 value: /home/admin/oceanbase/lib 69 - name: ZONE_COUNT 70 value: {{ .Values.zoneCount | quote }} 71 - name: CLUSTER_NAME 72 value: "$(KB_CLUSTER_COMP_NAME)" 73 - name: POD_IP 74 valueFrom: 75 fieldRef: 76 fieldPath: status.podIP 77 - name: DB_ROOT_PASSWORD 78 valueFrom: 79 secretKeyRef: 80 name: $(CONN_CREDENTIAL_SECRET_NAME) 81 key: password