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

Flyte Add Enable/Disable Options for Agent Services #4041

Merged
merged 17 commits into from
Oct 10, 2023

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Sep 16, 2023

TL;DR

  • Added options to enable (default) or disable the Flyte agent.

Describe your changes

@pingsutw and I have introduced two options for users to configure the Flyte agent - it can now be either enabled or disabled.

We believe this enhancement will offer more flexibility and cater to diverse user needs and deployment scenarios.

After a thorough consideration, we have decided to set the "enable agent" option as the default setting.

Enable agent service (Default)

Enable the agent deployment by updating helm and kustomization.
You can use my image on the docker hub to test.

cd flyte/docker/sandbox-bundled/
make build
docker tag flyte-sandbox:latest futureoutlier/flyte-sandbox:flyteagent-v2
docker push futureoutlier/flyte-sandbox:flyteagent-v2
./bin/flytectl demo start --image futureoutlier/flyte-sandbox:flyteagent-v2

Disable agent service (Use flag)

./bin/flytectl demo start --image futureoutlier/flyte-sandbox:flyteagent-v2 --disable-agent

Tracking issue

#3936
flyteorg/flytectl#420

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Screen Shot

  • New Pod Addition: The newly introduced pod is named "flyteagent". You can view the snapshot of its presence here.
    image

  • Config Map Update: The "flyte-sandbox-config" config map situated in the "flyte" namespace has been updated.
    Its current snapshot can be viewed here.
    image

Notably, there's an addition of the enabled-plugins key, which can be viewed here.
image

Signed-off-by: Future Outlier <[email protected]>
@Future-Outlier Future-Outlier changed the title enable agent Enable Agent Services in Flytectl Sep 16, 2023
@Future-Outlier Future-Outlier marked this pull request as draft September 16, 2023 09:19
@Future-Outlier Future-Outlier marked this pull request as ready for review September 17, 2023 05:47
@Future-Outlier Future-Outlier changed the title Enable Agent Services in Flytectl Flyte Enable Agent Services Config Map by kustmoization Sep 17, 2023
Future Outlier added 3 commits September 17, 2023 17:15
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
@Future-Outlier Future-Outlier changed the title Flyte Enable Agent Services Config Map by kustmoization Flyte Enable Agent Services Config Map by kustmoization and helm Sep 20, 2023
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
@Future-Outlier
Copy link
Member Author

Future-Outlier commented Sep 21, 2023

Hello Reviewers,

I appreciate @pingsutw's suggestion; it's quite insightful! I learned a lot!

For someone who's new or at the entry level, I believe enhancing the key agent-service structure would make it more user-friendly. Consider the transition:

Current Configuration:

agent-service:
  defaultAgent:
    endpoint: "dns:///flyteagent.flyte.svc.cluster.local:8000"
    insecure: true

Proposed Configuration:

agent-service:
  defaultAgent:
    endpoint: "dns:///flyteagent.flyte.svc.cluster.local:8000"
    insecure: true
    timeouts:
      GetTask: 100s
    defaultTimeout: 100s
  agents:
    custom_agent:
      endpoint: "dns:///flyteagent.flyte.svc.cluster.local:8001"
      insecure: false
      defaultServiceConfig: '{"loadBalancingConfig": [{"round_robin":{}}]}'
      timeouts:
        GetTask: 100s
      defaultTimeout: 100s
  agentForTaskTypes:
    # Overrides the default agent for custom_task. This means propeller will send the request to this agent.
    - custom_task: custom_agent

I'm eager to hear your thoughts on this. Thanks a lot!

Signed-off-by: Future Outlier <[email protected]>
@Future-Outlier
Copy link
Member Author

After a discussion with pingsu, we decide to left

agent-service:
  defaultAgent:
    endpoint: "dns:///flyteagent.flyte.svc.cluster.local:8000"
    insecure: true
    timeouts:
      GetTask: 10s
    defaultTimeout: 10s

like this!
And it will be far more user friendly!

pingsutw
pingsutw previously approved these changes Sep 26, 2023
@pingsutw pingsutw requested a review from jeevb September 26, 2023 05:00
Signed-off-by: Future Outlier <[email protected]>
Future Outlier added 2 commits September 28, 2023 10:03
@Future-Outlier Future-Outlier changed the title Flyte Enable Agent Services Config Map by kustmoization and helm Flyte Enable Agent Services Config Map by kustomization and helm Sep 30, 2023
@Future-Outlier
Copy link
Member Author

@pingsutw @jeevb Please take a look, and approve the PR here: flyteorg/flytectl#420
Thanks a lot!

Future Outlier added 3 commits October 7, 2023 00:05
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
@Future-Outlier Future-Outlier changed the title Flyte Enable Agent Services Config Map by kustomization and helm Flyte Add Enable/Disable Options for Agent Services Oct 7, 2023
@eapolinario eapolinario merged commit 0b4186d into flyteorg:master Oct 10, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants