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

Using go-client or kubectl to submit/fetch workflow ? #1362

Open
Yancey1989 opened this issue Dec 9, 2019 · 5 comments
Open

Using go-client or kubectl to submit/fetch workflow ? #1362

Yancey1989 opened this issue Dec 9, 2019 · 5 comments

Comments

@Yancey1989
Copy link
Collaborator

As the comment: #1332 (comment)

We can use go-client or the cmd kubectl to submit the workflow or fetch status/logs from the workflow.

Go-client:

  • advantage:
    • the codebase would be more native.
    • can use more API such as WATCH.
  • disadvantage
    • go-client dependents on the specified k8s version.

kubectl:

  • advantage
    • the usage of kubectl for different k8s version are the same, so we only upgrade the kubectl version if we want to use a higher/lower k8s cluster.
  • disadvantage
    • can only communicate with go code using stdout/stderr.

I tend to use kubectl, because:

  1. SQLFlow workflow only need to submit and fetch workflow status/logs, don't need more complex k8s API
  2. If we want to deploy sqlflowserver on different k8s cluster version, we don't need to re-build sqlflowserver, only upgrade the kubectl version.
@tonyyang-svail
Copy link
Collaborator

tonyyang-svail commented Dec 9, 2019

Thanks @Yancey1989 for setting up this discussion. I will do some experiments on go-client today to see if go-client is compatible with the Argo workflow format.

@typhoonzero
Copy link
Collaborator

The go client should be compatible for simple API calls like getting pod status etc, for more information: https://github.com/kubernetes/client-go#compatibility-matrix. And I think we don't need to change the client version since the basic APIs are all available.

@tonyyang-svail
Copy link
Collaborator

After spending some time going through the examples of go-client, I haven't found a way to transfer the current command line implement to go-client. Since learning go-client may take a while, I will put this discussion on hold until we found the necessity of the go-client.

@tonyyang-svail
Copy link
Collaborator

For the record, I was trying to use Argo client directly but failed, because Argo is not using go.mod and won't be in the short term, so I am using kubectl for now.

@tonyyang-svail
Copy link
Collaborator

Update: Argo added go module support argoproj/argo-workflows#2097. So maybe it's time to using go-client.

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

3 participants