From b2c04d2f53dbe909c654cbda33482d11dac0b620 Mon Sep 17 00:00:00 2001 From: Sihan Wang Date: Wed, 14 Jun 2023 21:19:06 -0700 Subject: [PATCH 1/4] [RayService] Add RayService alb ingress CR Signed-off-by: Sihan Wang --- .../ray_v1alpha1_rayservice-alb-ingress.yaml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml diff --git a/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml b/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml new file mode 100644 index 0000000000..497d33b8b3 --- /dev/null +++ b/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: ray-cluster-ingress + annotations: + alb.ingress.kubernetes.io/scheme: internet-facing + alb.ingress.kubernetes.io/tags: Environment=dev,Team=test + # See `ingress.md` for more details about how to choose subnets. + alb.ingress.kubernetes.io/subnets: subnet-d9d4ff92, subnet-0c0209db843c9fd72 + alb.ingress.kubernetes.io/target-type: ip +spec: + ingressClassName: alb + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: rayservice-sample-serve-svc # Serve service + port: + number: 8000 # default HTTP port number for serving requests From 467c32b46eb3ee18f4f19ccd9154c86e2bbaf8b1 Mon Sep 17 00:00:00 2001 From: Sihan Wang Date: Wed, 14 Jun 2023 21:20:38 -0700 Subject: [PATCH 2/4] Update Signed-off-by: Sihan Wang --- docs/guidance/ingress.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/guidance/ingress.md b/docs/guidance/ingress.md index 1d194a0338..852d535676 100644 --- a/docs/guidance/ingress.md +++ b/docs/guidance/ingress.md @@ -39,6 +39,7 @@ eksctl get cluster ${YOUR_EKS_CLUSTER} # Check subnets on the EKS cluster # Step 4: Create an ALB ingress. When an ingress with proper annotations creates, # AWS Load Balancer controller will reconcile a ALB (not in AWS EKS cluster). +# For RayService, you can use ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml kubectl apply -f ray-operator/config/samples/alb-ingress.yaml # Step 5: Check ingress created by Step 4. From 36739f29294458d7a315c4fe681c0bf981d9b919 Mon Sep 17 00:00:00 2001 From: Sihan Wang Date: Wed, 14 Jun 2023 21:34:26 -0700 Subject: [PATCH 3/4] Update Signed-off-by: Sihan Wang --- .../config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml b/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml index 497d33b8b3..8109d73a7c 100644 --- a/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml +++ b/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml @@ -8,6 +8,10 @@ metadata: # See `ingress.md` for more details about how to choose subnets. alb.ingress.kubernetes.io/subnets: subnet-d9d4ff92, subnet-0c0209db843c9fd72 alb.ingress.kubernetes.io/target-type: ip + # Health Check Settings + alb.ingress.kubernetes.io/healthcheck-protocol: HTTP + alb.ingress.kubernetes.io/healthcheck-port: traffic-port + alb.ingress.kubernetes.io/healthcheck-path: /-/routes spec: ingressClassName: alb rules: From 50829c2556806abf96c8d245ecf731d42974160b Mon Sep 17 00:00:00 2001 From: Sihan Wang Date: Thu, 15 Jun 2023 12:56:45 -0700 Subject: [PATCH 4/4] Update Signed-off-by: Sihan Wang --- .../config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml b/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml index 8109d73a7c..b61508241d 100644 --- a/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml +++ b/ray-operator/config/samples/ray_v1alpha1_rayservice-alb-ingress.yaml @@ -8,7 +8,8 @@ metadata: # See `ingress.md` for more details about how to choose subnets. alb.ingress.kubernetes.io/subnets: subnet-d9d4ff92, subnet-0c0209db843c9fd72 alb.ingress.kubernetes.io/target-type: ip - # Health Check Settings + # Health Check Settings. Health check is needed for + # ALB to route traffic to the healthy pod. alb.ingress.kubernetes.io/healthcheck-protocol: HTTP alb.ingress.kubernetes.io/healthcheck-port: traffic-port alb.ingress.kubernetes.io/healthcheck-path: /-/routes