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

Ray Plugin - Use serviceAccount from Config if set #5928

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/deployment/configuration/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ Both ``flyteadmin`` and ``flytepropeller`` are instrumented to expose metrics. T
- **User-facing dashboard**: it can be used to investigate performance and characteristics of workflow and task executions. It's published under ID `22146 <https://grafana.com/grafana/dashboards/22146-flyte-user-dashboard-via-prometheus/>`__ in the Grafana marketplace.

- **System Dashboards**: Dashboards that are useful for the system maintainer to investigate the status and performance of their Flyte deployments. These are further divided into:
- Data plane (``flytepropeller``): `21719 <https://grafana.com/grafana/dashboards/21719-flyte-propeller-dashboard-via-prometheus/>`__: execution engine status and performance.
- Control plane (``flyteadmin``): `21720 <https://grafana.com/grafana/dashboards/21720-flyteadmin-dashboard-via-prometheus/>`__: API-level monitoring.
- Data plane (``flytepropeller``) - `21719 <https://grafana.com/grafana/dashboards/21719-flyte-propeller-dashboard-via-prometheus/>`__: execution engine status and performance.
- Control plane (``flyteadmin``) - `21720 <https://grafana.com/grafana/dashboards/21720-flyteadmin-dashboard-via-prometheus/>`__: API-level monitoring.

The corresponding JSON files for each dashboard are also located in the ``flyte`` repository at `deployment/stats/prometheus <https://github.com/flyteorg/flyte/tree/master/deployment/stats/prometheus>`__.

Expand Down Expand Up @@ -133,7 +133,7 @@ Once the prerequisites are in place, follow the instructions in this section to
service:
enabled: true

The above configuration enables the ``serviceMonitor`` that Prometheus can then use to automatically discover services and scrape metrics from them.
The above configuration enables the ``serviceMonitor`` that Prometheus can then use to automatically discover services and scrape metrics from them.

.. group-tab:: flyte-binary

Expand All @@ -157,7 +157,7 @@ Once the prerequisites are in place, follow the instructions in this section to
protocol: TCP
port: 10254

The above configuration enables the ``serviceMonitor`` that Prometheus can then use to automatically discover services and scrape metrics from them.
The above configuration enables the ``serviceMonitor`` that Prometheus can then use to automatically discover services and scrape metrics from them.

.. note::

Expand Down
4 changes: 2 additions & 2 deletions flyteplugins/go/tasks/plugins/k8s/ray/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ var (
IncludeDashboard: true,
DashboardHost: "0.0.0.0",
EnableUsageStats: false,
ServiceAccount: "default",
ServiceAccount: "",
Defaults: DefaultConfig{
HeadNode: NodeConfig{
StartParameters: map[string]string{
// Disable usage reporting by default: https://docs.ray.io/en/latest/cluster/usage-stats.html
// Disable usage reporting by default: https://docs.ray.io/en/latest/cluster/deusage-stats.html
eapolinario marked this conversation as resolved.
Show resolved Hide resolved
DisableUsageStatsStartParameter: "true",
},
IPAddress: "$MY_POD_IP",
Expand Down
2 changes: 1 addition & 1 deletion flyteplugins/go/tasks/plugins/k8s/ray/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ func TestLoadDefaultServiceAccountConfig(t *testing.T) {

t.Run("serviceAccount", func(t *testing.T) {
config := GetConfig()
assert.Equal(t, config.ServiceAccount, "default")
assert.Equal(t, config.ServiceAccount, "")
})
}
2 changes: 1 addition & 1 deletion flyteplugins/go/tasks/plugins/k8s/ray/ray.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func constructRayJob(taskCtx pluginsCore.TaskExecutionContext, rayJob plugins.Ra
}

serviceAccountName := flytek8s.GetServiceAccountNameFromTaskExecutionMetadata(taskCtx.TaskExecutionMetadata())
if len(serviceAccountName) == 0 {
if len(serviceAccountName) == 0 || cfg.ServiceAccount != "" {
serviceAccountName = cfg.ServiceAccount
}

Expand Down
Loading