ArroyoSystems / arroyo

Distributed stream processing engine in Rust
https://arroyo.dev
Apache License 2.0
3.81k stars 222 forks source link

missing `PersistentVolume` when install arroyo on k8s? #744

Open zhuliquan opened 2 months ago

zhuliquan commented 2 months ago

Hello, I install arroyo on k8s by below command

helm install arroyo ./arroyo_helm_chart.tar.gz -f values.yaml --namespace arroyo

However, I found pg pod is pending

[root@edrtest05v zhuliquan]# kubectl get pod -n arroyo
NAME                                 READY   STATUS     RESTARTS   AGE
arroyo-controller-59464b8b47-hfl69   0/1     Init:0/1   0          43s
arroyo-postgresql-0                  0/1     Pending    0          43s

I describe pod, I found missing PersistentVolume for postgresql-0

Events:
  Type     Reason            Age                From               Message
  ----     ------            ----               ----               -------
  Warning  FailedScheduling  5m35s              default-scheduler  0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.
  Warning  FailedScheduling  5m35s              default-scheduler  0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.
  Normal   Scheduled         57s                default-scheduler  Successfully assigned arroyo/arroyo-postgresql-0 to 10.252.176.112
  Warning  FailedMount       26s (x7 over 58s)  kubelet            MountVolume.NewMounter initialization failed for volume "arroyo-pg-pv-dev" : path "/tmp/arroyo-pv" does not exist

Here, I need apply blow pv to solve problem. May be should save it default values.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
  name: arroyo-pg-pv-dev
spec:
  capacity:
    storage: 10Gi
  volumeMode: Filesystem
  accessModes:
   - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: ""
  local:
    path: /tmp/arroyo-pv
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - "10.252.176.112"
mwylde commented 2 months ago

Thanks for reporting this. I'm not quite sure what's going on, as our helm chart should not be responsible for creating the PV for postgres. The postgres chart should be doing that (depending on how you've configured it).

Could you include the values.yaml that produce the issue?

zhuliquan commented 2 months ago

Thanks for reporting this. I'm not quite sure what's going on, as our helm chart should not be responsible for creating the PV for postgres. The postgres chart should be doing that (depending on how you've configured it).

Could you include the values.yaml that produce the issue?

This is my own values.yaml

image:
  repository: arroyo
  tag: "edbeebcd"
imagePullPolicy: IfNotPresent
imagePullSecrets: []

controller:
  resources:
    limits: {}
    requests:
      memory: 8192Mi
      cpu: 2000m

  service:
    grpcPort: 5116
    compilerPort: 5117
    adminPort: 5114
    httpPort: 80

worker:
  resources:
    limits: {}
    requests:
      memory: 2048Mi
      cpu: 2000m
  slots: 16

# save checkpoints data from arroyo-worker
checkpointUrl: "file:///tmp/arroyo/checkpoints"
# save compiled binary data from arroyo-compiler
artifactUrl: "file:///tmp/arroyo/artifacts"