Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused fields from KubeRay operator and RayCluster charts #839

Merged
merged 9 commits into from
Dec 16, 2022

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Dec 13, 2022

Why are these changes needed?

Some fields in KubeRay operator chart and RayCluster chart are useless.

Related issue number

Closes #549

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(
  • KubeRay operator chart is tested by KubeRay CI (compatibility test, configuration test, helm lint test)
  • RayCluster chart is tested by KubeRay CI (helm lint test) and manually.

截圖 2022-12-13 下午12 11 25

Verify labels

Run the following command based on the commit d30d76d.

# helm-chart/ray-cluster
helm template .
output
---
# Source: ray-cluster/templates/raycluster-cluster.yaml
apiVersion: ray.io/v1alpha1
kind: RayCluster
metadata:
  labels:
    app.kubernetes.io/name: kuberay
    helm.sh/chart: ray-cluster-0.4.0
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
  name: release-name-kuberay
  
spec:
  headGroupSpec:
    serviceType: ClusterIP
    rayStartParams:
      block: "true"
      dashboard-host: "0.0.0.0"
    template:
      spec:
        imagePullSecrets:
          []
        containers:
          - volumeMounts:
            - mountPath: /tmp/ray
              name: log-volume
            name: ray-head
            image: rayproject/ray:2.0.0
            imagePullPolicy: IfNotPresent
            resources:
              limits:
                cpu: "1"
                memory: 2G
              requests:
                cpu: "1"
                memory: 2G
            securityContext:
              {}
            env:
              []
        volumes:
          - emptyDir: {}
            name: log-volume
        affinity:
          {}
        tolerations:
          []
        nodeSelector:
          {}
      metadata:
        annotations:
          {}
        labels:
          headkey: headval
          app.kubernetes.io/name: kuberay
          helm.sh/chart: ray-cluster-0.4.0
          app.kubernetes.io/instance: release-name
          app.kubernetes.io/managed-by: Helm
         

  workerGroupSpecs:
  - rayStartParams:
      block: "true"
    replicas: 1
    minReplicas: 1
    maxReplicas: 3
    groupName: smallGroup
    template:
      spec:
        imagePullSecrets:
          []
        initContainers:
          - name: init
            image: busybox:1.28
            command: ['sh', '-c', "until nslookup $RAY_IP.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for K8s Service $RAY_IP; sleep 2; done"]
            securityContext:
              {}
        containers:
          - volumeMounts:
            - mountPath: /tmp/ray
              name: log-volume
            name: ray-worker
            image: rayproject/ray:2.0.0
            imagePullPolicy: IfNotPresent
            resources:
              limits:
                cpu: 1
                memory: 1G
              requests:
                cpu: 1
                memory: 1G
            securityContext:
              {}
            env:
              []
            ports:
              null
        volumes:
          - emptyDir: {}
            name: log-volume
        affinity:
          {}
        tolerations:
          []
        nodeSelector:
          {}
      metadata:
        annotations:
          {}
        labels:
          smallGroupKey: smallGroupVal
          app.kubernetes.io/name: kuberay
          helm.sh/chart: ray-cluster-0.4.0
          app.kubernetes.io/instance: release-name
          app.kubernetes.io/managed-by: Helm
        
  - rayStartParams:
      block: "true"
    replicas: 1
    minReplicas: 1
    maxReplicas: 2147483647
    groupName: workergroup
    template:
      spec:
        imagePullSecrets:
          []
        initContainers:
          - name: init
            image: busybox:1.28
            command: ['sh', '-c', "until nslookup $RAY_IP.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for K8s Service $RAY_IP; sleep 2; done"]
            securityContext:
              {}
        containers:
          - volumeMounts:
            - mountPath: /tmp/ray
              name: log-volume
            name: ray-worker
            image: rayproject/ray:2.0.0
            imagePullPolicy: IfNotPresent
            resources:
              limits:
                cpu: "1"
                memory: 1G
              requests:
                cpu: "1"
                memory: 1G
            securityContext:
              {}
            env:
              []
            ports:
              null
        volumes:
          - emptyDir: {}
            name: log-volume
        affinity:
          {}
        tolerations:
          []
        nodeSelector:
          {}
      metadata:
        annotations:
          {}
        labels:
          workerkey: workerval
          app.kubernetes.io/name: kuberay
          helm.sh/chart: ray-cluster-0.4.0
          app.kubernetes.io/instance: release-name
          app.kubernetes.io/managed-by: Helm

Skip CRD

截圖 2022-12-14 下午4 59 44

@kevin85421 kevin85421 marked this pull request as ready for review December 13, 2022 20:14
@architkulkarni architkulkarni self-assigned this Dec 13, 2022
Copy link
Collaborator

@DmitriGekhtman DmitriGekhtman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, except for labels

helm-chart/ray-cluster/values.yaml Show resolved Hide resolved
Copy link
Collaborator

@DmitriGekhtman DmitriGekhtman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should implement the ability to control whether or not CRDs are created as well.

helm-chart/kuberay-operator/values.yaml Show resolved Hide resolved
helm-chart/kuberay-operator/values.yaml Show resolved Hide resolved
Co-authored-by: Dmitri Gekhtman <62982571+DmitriGekhtman@users.noreply.github.com>
Signed-off-by: Kai-Hsun Chen <kaihsun@apache.org>
@DmitriGekhtman DmitriGekhtman merged commit 21a3611 into ray-project:master Dec 16, 2022
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
…-project#839)

Some fields in KubeRay operator chart and RayCluster chart are useless. This PR removes those fields.

Signed-off-by: Kai-Hsun Chen <kaihsun@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revisit all exposed fields in helm charts
3 participants