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

Passing custom service port name for spark UI #1239

Closed
marcozov opened this issue Apr 23, 2021 · 2 comments
Closed

Passing custom service port name for spark UI #1239

marcozov opened this issue Apr 23, 2021 · 2 comments

Comments

@marcozov
Copy link
Contributor

Whenever a SparkApplication is created, a corresponding service is created as well in order to expose the spark UI.
The resulting spec looks like this:

spec:
  clusterIP: ...
  ports:
  - name: spark-driver-ui-port
    port: 4040
    protocol: TCP
    targetPort: 4040
  selector:
    spark-role: driver
    sparkoperator.k8s.io/app-name: spark-app-name
  sessionAffinity: None
  type: ClusterIP

Most of these fields can be customized, including the port. However, the resulting port name is always going to be spark-driver-ui-port, as it is hardcoded: https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/pkg/controller/sparkapplication/sparkui.go#L153 .

While in general this is not an issue, there are some cases where it would be nice to have control over that field.
For instance, if the spark application driver is part of a service mesh, the traffic forwarded to the UI is redirected through an Istio ingress gateway, and the access has to be restricted according to some authorization policies (so, the spark driver would run with an Istio sidecar container), the easiest way to treat traffic as proper HTTP is via explicit protocol selection. And if protocol is not selected properly, any RBAC attempt at the network level will cause all the incoming traffic to be rejected (and Istio does not seem to be able to select protocol properly and it will just discard incoming traffic because it will be treated as TCP).

liyinan926 pushed a commit that referenced this issue Apr 30, 2021
* [operator] Adding service port name for spark UI exposure

* cleanup
jbhalodia-slack pushed a commit to jbhalodia-slack/spark-operator that referenced this issue Oct 4, 2024
…beflow#1240)

* [operator] Adding service port name for spark UI exposure

* cleanup
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Copy link

github-actions bot commented Nov 2, 2024

This issue has been automatically closed because it has not had recent activity. Please comment "/reopen" to reopen it.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant