apiVersion: ray.io/v1
kind: RayCluster
metadata:
  name: raycluster-axol1tl
  namespace: axol1tl
spec:
  rayVersion: "2.43.0"
  enableInTreeAutoscaling: true  # Allow autoscaling of workers
  headGroupSpec:
    serviceType: ClusterIP
    rayStartParams:
      dashboard-host: "0.0.0.0"
      port: "6379"
    template:
      spec:
        containers:
          - name: ray-head
            image: rayproject/ray:2.43.0
            imagePullPolicy: Always
            resources:
              requests:
                cpu: "8"
                memory: "30Gi"
              limits:
                cpu: "8"
                memory: "30Gi"
            volumeMounts:
              - name: axovol
                mountPath: /axovol
        volumes:
          - name: axovol
            persistentVolumeClaim:
              claimName: axovol
        #tolerations:
          #- key: "nautilus.io/axol1tl"
            #operator: "Exists"
            #effect: "NoSchedule"

   workerGroupSpecs:
    - groupName: worker-group
      rayStartParams: {}
      template:
        spec:
          containers:
            - name: ray-worker
              image: gitlab-registry.nrp-nautilus.io/mquinnan/axol1tl-hub:axol1tl-container
              imagePullPolicy: Always
              resources:
                requests:
                  cpu: "8"
                  memory: "30Gi"
                  #nvidia.com/gpu: 8  # Request GPU
                limits:
                  cpu: "8"
                  memory: "30Gi"
                  #nvidia.com/gpu: 8
              volumeMounts:
                - name: axovol
                  mountPath: /axovol
          volumes:
            - name: axovol
              persistentVolumeClaim:
                claimName: axovol
          #tolerations:
            #- key: "nautilus.io/axol1tl"
              #operator: "Exists"
              #effect: "NoSchedule"