github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/qdrant/templates/clusterdefinition.yaml (about) 1 --- 2 apiVersion: apps.kubeblocks.io/v1alpha1 3 kind: ClusterDefinition 4 metadata: 5 name: qdrant 6 labels: 7 {{- include "qdrant.labels" . | nindent 4 }} 8 spec: 9 type: qdrant 10 connectionCredential: 11 username: root 12 password: "$(RANDOM_PASSWD)" 13 endpoint: "$(SVC_FQDN):$(SVC_PORT_tcp-qdrant)" 14 host: "$(SVC_FQDN)" 15 port: "$(SVC_PORT_tcp-qdrant)" 16 componentDefs: 17 - name: qdrant 18 workloadType: Stateful 19 characterType: qdrant 20 probes: 21 monitor: 22 builtIn: false 23 exporterConfig: 24 scrapePath: /metrics 25 scrapePort: 6333 26 logConfigs: 27 scriptSpecs: 28 - name: qdrant-scripts 29 templateRef: qdrant-scripts 30 namespace: {{ .Release.Namespace }} 31 volumeName: scripts 32 defaultMode: 0555 33 configSpecs: 34 - name: qdrant-config-template 35 templateRef: qdrant-config-template 36 constraintRef: qdrant-config-constraints 37 volumeName: qdrant-config 38 namespace: {{ .Release.Namespace }} 39 service: 40 ports: 41 - name: tcp-qdrant 42 port: 6333 43 targetPort: tcp-qdrant 44 - name: grpc-qdrant 45 port: 6334 46 targetPort: grpc-qdrant 47 - name: web-ui 48 port: 3000 49 targetPort: web-ui 50 volumeTypes: 51 - name: data 52 type: data 53 podSpec: 54 securityContext: 55 fsGroup: 1001 56 initContainers: 57 - name: qdrant-tools 58 command: 59 - /bin/sh 60 - -c 61 - | 62 cp /bin/jq /qdrant/tools/jq 63 cp /bin/curl /qdrant/tools/curl 64 imagePullPolicy: {{default .Values.images.pullPolicy "IfNotPresent"}} 65 terminationMessagePath: /dev/termination-log 66 terminationMessagePolicy: File 67 volumeMounts: 68 - mountPath: /qdrant/tools 69 name: tools 70 containers: 71 - name: web-ui 72 imagePullPolicy: {{ .Values.images.pullPolicy | default "IfNotPresent" }} 73 securityContext: 74 runAsUser: 0 75 command: 76 - bash 77 - -c 78 - | 79 cd dist/ && serve 80 ports: 81 - name: web-ui 82 containerPort: 3000 83 - name: qdrant 84 imagePullPolicy: {{default .Values.images.pullPolicy "IfNotPresent"}} 85 securityContext: 86 runAsUser: 0 87 livenessProbe: 88 failureThreshold: 3 89 httpGet: 90 path: / 91 port: tcp-qdrant 92 scheme: HTTP 93 periodSeconds: 15 94 successThreshold: 1 95 timeoutSeconds: 10 96 readinessProbe: 97 exec: 98 command: 99 - /bin/sh 100 - -c 101 - | 102 consensus_status=`/qdrant/tools/curl -s http://localhost:6333/cluster | /qdrant/tools/jq -r .result.consensus_thread_status.consensus_thread_status` 103 if [ "$consensus_status" != "working" ]; then 104 echo "consensus stopped" 105 exit 1 106 fi 107 failureThreshold: 2 108 initialDelaySeconds: 5 109 periodSeconds: 15 110 successThreshold: 1 111 timeoutSeconds: 3 112 startupProbe: 113 failureThreshold: 18 114 httpGet: 115 path: / 116 port: tcp-qdrant 117 scheme: HTTP 118 periodSeconds: 10 119 successThreshold: 1 120 timeoutSeconds: 3 121 lifecycle: 122 preStop: 123 exec: 124 command: ["/qdrant/scripts/pre-stop.sh"] 125 terminationMessagePath: /dev/termination-log 126 terminationMessagePolicy: File 127 volumeMounts: 128 - mountPath: /qdrant/config/ 129 name: qdrant-config 130 - mountPath: {{ .Values.dataMountPath }} 131 name: data 132 - mountPath: /qdrant/scripts 133 name: scripts 134 - mountPath: /etc/annotations 135 name: annotations 136 - mountPath: /qdrant/tools 137 name: tools 138 dnsPolicy: ClusterFirst 139 enableServiceLinks: true 140 ports: 141 - name: tcp-qdrant 142 containerPort: 6333 143 - name: grpc-qdrant 144 containerPort: 6334 145 - name: tcp-metrics 146 containerPort: 9091 147 - name: p2p 148 containerPort: 6335 149 command: ["/bin/sh", "-c"] 150 args: ["/qdrant/scripts/setup.sh"] 151 env: 152 - name: QDRANT__TELEMETRY_DISABLED 153 value: "true" 154 - name: SERVICE_PORT 155 value: "6333" 156 volumes: 157 - name: annotations 158 downwardAPI: 159 items: 160 - path: "component-replicas" 161 fieldRef: 162 fieldPath: metadata.annotations['apps.kubeblocks.io/component-replicas'] 163 - emptyDir: {} 164 name: tools