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

[BUG] Setting service_account_name in task PodTemplate does not work #3613

Closed
2 tasks done
Tracked by #4064
hamersaw opened this issue Apr 21, 2023 · 5 comments
Closed
2 tasks done
Tracked by #4064

[BUG] Setting service_account_name in task PodTemplate does not work #3613

hamersaw opened this issue Apr 21, 2023 · 5 comments
Assignees
Labels
backlogged For internal use. Reserved for contributor team workflow. bug Something isn't working exo good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@hamersaw
Copy link
Contributor

Describe the bug

Creating a task with the definition:

    @task(
        pod_template=PodTemplate(
            pod_spec=V1PodSpec(
                service_account_name="trainer-service",
                containers=[],
    )

attempts to manually set the service account of the k8s Pod to trainer-service. However, the result is that Flyte overrides this variable, setting the service account to 'default' (by default).

This seems to be because the PodPlugin always overrides the ServiceAccount in this logic. However, previous implementation first checked if the ServiceAccount was empty first. The latter seems to be the correct implementation.

Expected behavior

Users should be able to override the k8s Pod service account using the PodTemplate.

Additional context to reproduce

Create a task with a service account, run it, and note the manually set service account is overridden.

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@hamersaw hamersaw added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Apr 21, 2023
@Kota-Karthik
Copy link

Hello @samhita-alla
I want to solve this issue
so kindly assign me this!!

@Vishalk91-4
Copy link

@samhita-alla, can you please assign this issue to me

@samhita-alla
Copy link
Contributor

Are any of working on creating a PR for this issue? @Kota-Karthik @Vishalk91-4

@hamersaw hamersaw added exo backlogged For internal use. Reserved for contributor team workflow. labels Nov 9, 2023
@hampusrosvall
Copy link
Contributor

@samhita-alla is this being worked on currently? I can take it on otherwise :)

@samhita-alla
Copy link
Contributor

hey @hampusrosvall, please feel free to work on it. i'm gonna assign it to you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlogged For internal use. Reserved for contributor team workflow. bug Something isn't working exo good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants