github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/neon-cluster/templates/vm-compute-node-deploy.yaml (about) 1 apiVersion: v1 2 kind: ConfigMap 3 metadata: 4 name: compute-node-config 5 labels: 6 {{- include "neon-cluster.labels" . | nindent 4 }} 7 data: 8 {{- include "neon-cluster.extend.scripts" . | nindent 2 }} 9 10 --- 11 apiVersion: vm.neon.tech/v1 12 kind: VirtualMachine 13 metadata: 14 name: vm-compute-node 15 annotations: 16 # In this example, these bounds aren't necessary. So... here's what they look like :) 17 autoscaling.neon.tech/bounds: '{ "min": { "cpu": 0.25, "mem": "1Gi" }, "max": { "cpu": 1.25, "mem": "5Gi" } }' 18 labels: 19 autoscaling.neon.tech/enabled: "true" 20 # Set to "true" to continuously migrate the VM (TESTING ONLY) 21 autoscaling.neon.tech/testing-only-always-migrate: "false" 22 spec: 23 schedulerName: autoscale-scheduler 24 guest: 25 cpus: { min: 1, use: 1, max: 2 } 26 memorySlotSize: 1Gi 27 memorySlots: { min: 1, use: 1, max: 5 } 28 rootDisk: 29 image: {{ .Values.images.pg14.registry }}/{{ .Values.images.pg14.repository }}:{{ .Values.images.pg14.tag }} 30 size: 12Gi 31 imagePullPolicy: {{ .Values.images.pg14.pullPolicy }} 32 command: 33 - /bin/bash 34 - -c 35 - | 36 if [ ! -f "/tmp/script_executed" ]; then 37 set -ex 38 trap : TERM INT 39 whoami 40 export PAGESERVER=neon-cluster-neon-pageserver-headless.default.svc.cluster.local 41 export SAFEKEEPERS=neon-cluster-neon-safekeeper-headless.default.svc.cluster.local:5454 42 cp scripts/* ./ 43 chmod +x compute.sh entrypoint.sh spec.json spec_prep_docker.json 44 ./compute.sh 45 46 touch /tmp/script_executed 47 else 48 echo "Scripts already executed." 49 fi 50 ports: 51 - port: 22 # ssh 52 - port: 55432 # postgres 53 - port: 9100 # metrics 54 - port: 10301 # informant 55 disks: 56 - name: compute-node-config 57 mountPath: /scripts 58 readOnly: false 59 configMap: 60 name: compute-node-config