github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/milvus/templates/clusterdefinition.yaml (about) 1 --- 2 apiVersion: apps.kubeblocks.io/v1alpha1 3 kind: ClusterDefinition 4 metadata: 5 name: milvus 6 labels: 7 {{- include "milvus.labels" . | nindent 4 }} 8 spec: 9 connectionCredential: 10 username: root 11 password: "$(RANDOM_PASSWD)" 12 endpoint: "$(SVC_FQDN):$(SVC_PORT_tcp-milvus)" 13 host: "$(SVC_FQDN)" 14 port: "$(SVC_PORT_tcp-milvus)" 15 accesskey: minioadmin 16 secretkey: minioadmin 17 componentDefs: 18 - name: milvus 19 workloadType: Stateful 20 characterType: milvus 21 probes: 22 monitor: 23 builtIn: false 24 exporterConfig: 25 scrapePath: /metrics 26 scrapePort: 9187 27 logConfigs: 28 configSpecs: 29 - name: milvus-config-template 30 templateRef: milvus-config-template 31 volumeName: milvus-config 32 namespace: {{.Release.Namespace}} 33 service: 34 ports: 35 - name: tcp-milvus 36 port: 19530 37 targetPort: tcp-milvus 38 volumeTypes: 39 - name: data 40 type: data 41 podSpec: 42 securityContext: 43 fsGroup: 1001 44 containers: 45 - name: milvus 46 imagePullPolicy: {{default .Values.images.pullPolicy "IfNotPresent"}} 47 securityContext: 48 runAsUser: 0 49 livenessProbe: 50 failureThreshold: 3 51 httpGet: 52 path: /healthz 53 port: 9091 54 scheme: HTTP 55 periodSeconds: 15 56 successThreshold: 1 57 timeoutSeconds: 10 58 readinessProbe: 59 failureThreshold: 2 60 httpGet: 61 path: /healthz 62 port: 9091 63 scheme: HTTP 64 initialDelaySeconds: 5 65 periodSeconds: 15 66 successThreshold: 1 67 timeoutSeconds: 3 68 startupProbe: 69 failureThreshold: 18 70 httpGet: 71 path: /healthz 72 port: 9091 73 scheme: HTTP 74 periodSeconds: 10 75 successThreshold: 1 76 timeoutSeconds: 3 77 terminationMessagePath: /dev/termination-log 78 terminationMessagePolicy: File 79 volumeMounts: 80 - mountPath: /milvus/configs/user.yaml 81 name: milvus-config 82 readOnly: true 83 subPath: user.yaml 84 - mountPath: /milvus/tools 85 name: tools 86 - mountPath: /var/lib/milvus 87 name: data 88 dnsPolicy: ClusterFirst 89 enableServiceLinks: true 90 ports: 91 - name: tcp-milvus 92 containerPort: 19530 93 - name: tcp-metrics 94 containerPort: 9091 95 args: 96 - /milvus/tools/run.sh 97 - milvus 98 - run 99 - standalone 100 env: 101 - name: CACHE_SIZE 102 valueFrom: 103 resourceFieldRef: 104 divisor: 1Gi 105 resource: limits.memory 106 - name: MINIO_ACCESS_KEY 107 valueFrom: 108 secretKeyRef: 109 key: accesskey 110 name: $(CONN_CREDENTIAL_SECRET_NAME) 111 optional: false 112 - name: MINIO_SECRET_KEY 113 valueFrom: 114 secretKeyRef: 115 key: secretkey 116 name: $(CONN_CREDENTIAL_SECRET_NAME) 117 optional: false 118 initContainers: 119 - name: milvus-init 120 command: 121 - /cp 122 - /run.sh,/merge 123 - /milvus/tools/run.sh,/milvus/tools/merge 124 image: milvusdb/milvus-operator:v0.7.8 125 imagePullPolicy: {{default .Values.images.pullPolicy "IfNotPresent"}} 126 terminationMessagePath: /dev/termination-log 127 terminationMessagePolicy: File 128 volumeMounts: 129 - mountPath: /milvus/tools 130 name: tools 131 serviceAccountName: default 132 terminationGracePeriodSeconds: 300 133 volumes: 134 - emptyDir: {} 135 name: tools 136 137 - name: etcd 138 workloadType: Stateful 139 characterType: etcd 140 probes: 141 logconfigs: 142 configSpecs: 143 scriptsSpecs: 144 podSpec: 145 initContainers: 146 - name: volume-permissions 147 imagePullPolicy: {{default .Values.images.pullPolicy "IfNotPresent"}} 148 command: 149 - /bin/bash 150 - -ec 151 - | 152 chown -R 1001:1001 /bitnami/etcd 153 securityContext: 154 runAsUser: 0 155 volumeMounts: 156 - name: data 157 mountPath: /bitnami/etcd 158 containers: 159 - name: etcd 160 imagePullPolicy: {{default .Values.images.pullPolicy "IfNotPresent"}} 161 securityContext: 162 runAsNonRoot: true 163 runAsUser: 1001 164 livenessProbe: 165 exec: 166 command: 167 - /opt/bitnami/scripts/etcd/healthcheck.sh 168 failureThreshold: 5 169 initialDelaySeconds: 60 170 periodSeconds: 30 171 successThreshold: 1 172 timeoutSeconds: 5 173 readinessProbe: 174 exec: 175 command: 176 - /opt/bitnami/scripts/etcd/healthcheck.sh 177 failureThreshold: 5 178 initialDelaySeconds: 60 179 periodSeconds: 10 180 successThreshold: 1 181 timeoutSeconds: 5 182 terminationMessagePath: /dev/termination-log 183 terminationMessagePolicy: File 184 volumeMounts: 185 - mountPath: /bitnami/etcd 186 name: data 187 dnsPolicy: ClusterFirst 188 ports: 189 - name: client 190 containerPort: 2379 191 - name: peer 192 containerPort: 2380 193 env: 194 - name: BITNAMI_DEBUG 195 value: "false" 196 - name: MY_POD_IP 197 valueFrom: 198 fieldRef: 199 apiVersion: v1 200 fieldPath: status.podIP 201 - name: MY_POD_NAME 202 valueFrom: 203 fieldRef: 204 apiVersion: v1 205 fieldPath: metadata.name 206 - name: ETCDCTL_API 207 value: "3" 208 - name: ETCD_ON_K8S 209 value: "yes" 210 - name: ETCD_START_FROM_SNAPSHOT 211 value: "no" 212 - name: ETCD_DISASTER_RECOVERY 213 value: "no" 214 - name: ETCD_NAME 215 value: $(MY_POD_NAME) 216 - name: ETCD_DATA_DIR 217 value: /bitnami/etcd/data 218 - name: ETCD_LOG_LEVEL 219 value: info 220 - name: ALLOW_NONE_AUTHENTICATION 221 value: "yes" 222 - name: ETCD_ADVERTISE_CLIENT_URLS 223 value: http://$(MY_POD_NAME).$(KB_CLUSTER_COMP_NAME)-headless.$(KB_NAMESPACE).svc.cluster.local:2379 224 - name: ETCD_LISTEN_CLIENT_URLS 225 value: http://0.0.0.0:2379 226 - name: ETCD_INITIAL_ADVERTISE_PEER_URLS 227 value: http://$(MY_POD_NAME).$(KB_CLUSTER_COMP_NAME)-headless.$(KB_NAMESPACE).svc.cluster.local:2380 228 - name: ETCD_LISTEN_PEER_URLS 229 value: http://0.0.0.0:2380 230 - name: ETCD_AUTO_COMPACTION_MODE 231 value: revision 232 - name: ETCD_AUTO_COMPACTION_RETENTION 233 value: "1000" 234 - name: ETCD_QUOTA_BACKEND_BYTES 235 value: "4294967296" 236 - name: ETCD_HEARTBEAT_INTERVAL 237 value: "500" 238 - name: ETCD_ELECTION_TIMEOUT 239 value: "2500" 240 241 - name: minio 242 workloadType: Stateful 243 characterType: minio 244 probes: 245 logconfigs: 246 configSpecs: 247 scriptsSpecs: 248 service: 249 ports: 250 - name: http 251 port: 9000 252 targetPort: 9000 253 volumeTypes: 254 - name: data 255 type: data 256 podSpec: 257 initContainers: 258 - name: volume-permissions 259 imagePullPolicy: {{default .Values.images.pullPolicy "IfNotPresent"}} 260 command: 261 - /bin/bash 262 - -ec 263 - | 264 chown -R 1000:1000 /export 265 securityContext: 266 runAsUser: 0 267 volumeMounts: 268 - name: data 269 mountPath: /export 270 containers: 271 - name: minio 272 imagePullPolicy: {{default .Values.images.pullPolicy "IfNotPresent"}} 273 securityContext: 274 fsGroup: 1000 275 runAsGroup: 1000 276 runAsUser: 1000 277 livenessProbe: 278 failureThreshold: 5 279 httpGet: 280 path: /minio/health/live 281 port: 9000 282 scheme: HTTP 283 initialDelaySeconds: 5 284 periodSeconds: 5 285 successThreshold: 1 286 timeoutSeconds: 5 287 readinessProbe: 288 failureThreshold: 5 289 initialDelaySeconds: 5 290 periodSeconds: 5 291 successThreshold: 1 292 tcpSocket: 293 port: 9000 294 timeoutSeconds: 1 295 startupProbe: 296 failureThreshold: 60 297 periodSeconds: 10 298 successThreshold: 1 299 tcpSocket: 300 port: 9000 301 timeoutSeconds: 5 302 terminationMessagePath: /dev/termination-log 303 terminationMessagePolicy: File 304 serviceAccountName: "$(KB_CLUSTER_NAME-minio)" 305 volumeMounts: 306 - mountPath: /export 307 name: data 308 volumes: 309 - name: minio-user 310 secret: 311 defaultMode: 420 312 secretName: $(CONN_CREDENTIAL_SECRET_NAME) 313 command: 314 - /bin/sh 315 - -ce 316 - /usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs/ server /export 317 env: 318 - name: MINIO_ACCESS_KEY 319 valueFrom: 320 secretKeyRef: 321 key: accesskey 322 name: $(CONN_CREDENTIAL_SECRET_NAME) 323 optional: false 324 - name: MINIO_SECRET_KEY 325 valueFrom: 326 secretKeyRef: 327 key: secretkey 328 name: $(CONN_CREDENTIAL_SECRET_NAME) 329 optional: false 330