argoproj / argo-rollouts

Progressive Delivery for Kubernetes
https://argo-rollouts.readthedocs.io/
Apache License 2.0
2.7k stars 847 forks source link

pkg/apiclient/apiclient.go missing #2815

Open JuozasVainauskas opened 1 year ago

JuozasVainauskas commented 1 year ago

Discussed in https://github.com/argoproj/argo-rollouts/discussions/2799

Originally posted by **JuozasVainauskas** May 22, 2023 Hello, I want to use [argo-rollout apiClient](https://github.com/argoproj/argo-rollouts/tree/master/pkg/apiclient) to interact with argo-rollouts resources from my Golang application (in this case, `promote` rollout in certain scenarios). However, I am not entirely sure how to use argo-rollouts [apiClient](https://github.com/argoproj/argo-rollouts/tree/master/pkg/apiclient). For example, in [ArgoCD](https://github.com/argoproj/argo-cd/blob/master/pkg/apiclient/apiclient.go) and [argo-workflows](https://github.com/argoproj/argo-workflows/blob/master/pkg/apiclient/apiclient.go) cases I am able to use `pkg/apiclient/apiclient.go` to create clients for particular resources (e.g. [ApplicationClient](https://github.com/argoproj/argo-cd/blob/87a7dff4585c514304c9e46cdbe8ad20051c935f/pkg/apiclient/apiclient.go#L91), [WorkflowServiceClient](https://github.com/argoproj/argo-workflows/blob/2a5c4e8d2c983b88044c84e90e0aa5805edfe5b2/pkg/apiclient/apiclient.go#L21), etc.) In argo-rollouts case, I want to create [RolloutServiceClient](https://github.com/argoproj/argo-rollouts/blob/6ac153326c585a79555e3c5f5cfec0b22fce1f61/pkg/apiclient/rollout/rollout.pb.go#L1832). However, `pkg/apiclient/apiclient.go` file for creation of the client is not present in the package. I assume that this file should be available in the package and that this is a bug (If this is the case, I will create an issue). However, if I am mistaken and it is indeed intentional, how should I create a `RolloutServiceClient`?

As described in the discussion above, I want to user argo-rollouts apiClient. However, I think that pkg/apiclient/apiclient.go is missing. I assume that it was forgotten to be included in this PR: https://github.com/argoproj/argo-rollouts/pull/1015

zachaller commented 1 year ago

@JuozasVainauskas argo rollouts does not have an api, it just uses the k8s api to modify particular fields on the rollouts spec. You can look at what the cli is currently doing to get an understanding of what to modify such as promote

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity.