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

[Feature] [API Server] head svc ingress should include rewrite target annotation as default #2326

Open
2 tasks done
davidlhw opened this issue Aug 22, 2024 · 0 comments
Open
2 tasks done
Labels
enhancement New feature or request triage

Comments

@davidlhw
Copy link

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

ever since changes from #646

we need to add additional annotations and update the path-matching pattern in the ingress. To elaborate,
...
(2) YAML file: nginx.ingress.kubernetes.io/rewrite-target: /$1

this annotation nginx.ingress.kubernetes.io/rewrite-target: /$1 is required to be present when creating rayclusters with ingress

why not add that annotation as a default while allowing override?

Use case

Since creating rayclusters with ingress would always require this nginx.ingress.kubernetes.io/rewrite-target: /$1 annotation to be defined, it would be nice to have it come out of the box when ingress is created along with the raycluster like so:

curl --silent -X 'POST' \
  'http://localhost:31888/apis/v1/namespaces/ray-system/clusters' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "test-cluster",
  "namespace": "ray-system",
  "user": "3cpo",
  "version": "2.34.0",
  "environment": "DEV",
  "clusterSpec": {
-   "annotations": {
-     "nginx.ingress.kubernetes.io/rewrite-target": "/$1"
-   },
    "headGroupSpec": {
+     "enableIngress": true,
      "computeTemplate": "default-template",
      "image": "rayproject/ray:2.34.0",
      "serviceType": "NodePort",
      "rayStartParams": {
        "dashboard-host": "0.0.0.0",
        "metrics-export-port": "8080"
      },
      "volumes": []
    },
    "workerGroupSpec": [
      {
        "groupName": "small-wg",
        "computeTemplate": "default-template",
        "image": "rayproject/ray:2.34.0",
        "replicas": 1,
        "minReplicas": 1,
        "maxReplicas": 1,
        "rayStartParams": {
          "node-ip-address": "$MY_POD_IP"
        }
      }
    ]
  }
}'

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@davidlhw davidlhw added enhancement New feature or request triage labels Aug 22, 2024
@davidlhw davidlhw changed the title [Feature] API Server ingress include default rewrite target annotation [Feature] [API Server] head svc ingress should include rewrite target annotation as default Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant