github.phpd.cn/thought-machine/please@v12.2.0+incompatible/tools/cache/k8s/plz-cache-ss.yaml (about) 1 --- 2 apiVersion: "apps/v1beta1" 3 kind: StatefulSet 4 metadata: 5 name: plz-cache 6 labels: 7 project: please 8 app: rpc-cache 9 spec: 10 serviceName: plz-cache 11 replicas: 3 12 template: 13 metadata: 14 labels: 15 project: please 16 app: rpc-cache 17 spec: 18 containers: 19 - name: cache 20 image: thoughtmachine/plz-rpc-cache:v1 21 command: [ 22 '/rpc_cache_server', 23 '--port', '7677', 24 '--http_port', '7678', 25 '--metrics_port', '13434', 26 '--dir', '/cache', 27 # These sizes must agree with the PVC size below. 28 '--low_water_mark', '6G', 29 '--high_water_mark', '8G', 30 # This must agree with 'replicas' above; increased numbers will not be able to join. 31 # This can't be changed without destroying and re-creating the cluster. 32 '--cluster_size', '3', 33 '--cluster_port', '7946', 34 '--cluster_addresses', 'plz-cache', 35 # This makes us the seed if we have this name and there are no other nodes serving. 36 '--seed_if', 'plz-cache-0', 37 ] 38 env: 39 - name: NODE_NAME 40 valueFrom: 41 fieldRef: 42 fieldPath: metadata.name 43 - name: NODE_IP 44 valueFrom: 45 fieldRef: 46 fieldPath: status.podIP 47 resources: 48 requests: 49 memory: 200Mi 50 cpu: 0.5 51 limits: 52 memory: 500Mi 53 cpu: 1 54 ports: 55 - containerPort: 7677 56 name: grpc 57 - containerPort: 7678 58 name: http 59 - containerPort: 13434 60 name: prometheus 61 - containerPort: 7946 62 name: cluster 63 readinessProbe: 64 httpGet: 65 path: / 66 port: http 67 volumeMounts: 68 - name: data-volume 69 mountPath: /cache 70 volumeClaimTemplates: 71 - metadata: 72 name: data-volume 73 spec: 74 accessModes: ["ReadWriteOnce"] 75 resources: 76 requests: 77 # You'd likely want to increase this (in line with flags above) for a real deployment. 78 storage: 10Gi