Documentation ¶
Index ¶
- Variables
- func ConvertJsonToYamlManifests(jsonManifests []string) []string
- type ArgoClient
- func (argo *ArgoClient) GetApplicationByName(ctx context.Context, name string) (*v1alpha1.Application, error)
- func (argo *ArgoClient) GetApplicationClient() (io.Closer, application.ApplicationServiceClient)
- func (argo *ArgoClient) GetApplicationSetClient() (io.Closer, applicationset.ApplicationSetServiceClient)
- func (argo *ArgoClient) GetApplicationSets(ctx context.Context) (*v1alpha1.ApplicationSetList, error)
- func (argo *ArgoClient) GetApplications(ctx context.Context) (*v1alpha1.ApplicationList, error)
- func (argo *ArgoClient) GetApplicationsByAppset(ctx context.Context, name string) (*v1alpha1.ApplicationList, error)
- func (argo *ArgoClient) GetApplicationsByLabels(ctx context.Context, labels string) (*v1alpha1.ApplicationList, error)
- func (argo *ArgoClient) GetClusterClient() (io.Closer, cluster.ClusterServiceClient)
- func (argo *ArgoClient) GetKubernetesVersionByApplication(ctx context.Context, app v1alpha1.Application) (string, error)
- func (argo *ArgoClient) GetManifestsLocal(ctx context.Context, name, tempRepoDir, changedAppFilePath string, ...) ([]string, error)
- func (argo *ArgoClient) GetSettingsClient() (io.Closer, settings.SettingsServiceClient)
Constants ¶
This section is empty.
Variables ¶
var ErrNoVersionFound = errors.New("no kubernetes version found")
Functions ¶
func ConvertJsonToYamlManifests ¶ added in v1.5.0
Types ¶
type ArgoClient ¶
type ArgoClient struct {
// contains filtered or unexported fields
}
func NewArgoClient ¶
func NewArgoClient(cfg config.ServerConfig) (*ArgoClient, error)
func (*ArgoClient) GetApplicationByName ¶
func (argo *ArgoClient) GetApplicationByName(ctx context.Context, name string) (*v1alpha1.Application, error)
GetApplicationByName takes a context and a name, then queries the Argo Application client to retrieve the Application with the specified name. It returns the found Application and any error encountered during the process. If successful, the Application client connection is closed before returning.
func (*ArgoClient) GetApplicationClient ¶
func (argo *ArgoClient) GetApplicationClient() (io.Closer, application.ApplicationServiceClient)
GetApplicationClient has related argocd diff code https://github.com/argoproj/argo-cd/blob/d3ff9757c460ae1a6a11e1231251b5d27aadcdd1/cmd/argocd/commands/app.go#L899
func (*ArgoClient) GetApplicationSetClient ¶ added in v1.0.7
func (argo *ArgoClient) GetApplicationSetClient() (io.Closer, applicationset.ApplicationSetServiceClient)
func (*ArgoClient) GetApplicationSets ¶ added in v1.0.7
func (argo *ArgoClient) GetApplicationSets(ctx context.Context) (*v1alpha1.ApplicationSetList, error)
func (*ArgoClient) GetApplications ¶ added in v1.0.7
func (argo *ArgoClient) GetApplications(ctx context.Context) (*v1alpha1.ApplicationList, error)
func (*ArgoClient) GetApplicationsByAppset ¶
func (argo *ArgoClient) GetApplicationsByAppset(ctx context.Context, name string) (*v1alpha1.ApplicationList, error)
GetApplicationsByAppset takes a context and an appset, then queries the Argo Application client to retrieve the Applications managed by the appset It returns the found ApplicationList and any error encountered during the process.
func (*ArgoClient) GetApplicationsByLabels ¶
func (argo *ArgoClient) GetApplicationsByLabels(ctx context.Context, labels string) (*v1alpha1.ApplicationList, error)
GetApplicationsByLabels takes a context and a labelselector, then queries the Argo Application client to retrieve the Applications with the specified label. It returns the found ApplicationList and any error encountered during the process. If successful, the Application client connection is closed before returning.
func (*ArgoClient) GetClusterClient ¶
func (argo *ArgoClient) GetClusterClient() (io.Closer, cluster.ClusterServiceClient)
func (*ArgoClient) GetKubernetesVersionByApplication ¶ added in v1.3.0
func (argo *ArgoClient) GetKubernetesVersionByApplication(ctx context.Context, app v1alpha1.Application) (string, error)
GetKubernetesVersionByApplication is a method on the ArgoClient struct that takes a context and an application name as parameters, and returns the Kubernetes version of the destination cluster where the specified application is running. It returns an error if the application or cluster information cannot be retrieved.
func (*ArgoClient) GetManifestsLocal ¶ added in v1.6.0
func (argo *ArgoClient) GetManifestsLocal(ctx context.Context, name, tempRepoDir, changedAppFilePath string, app argoappv1.Application) ([]string, error)
func (*ArgoClient) GetSettingsClient ¶
func (argo *ArgoClient) GetSettingsClient() (io.Closer, settings.SettingsServiceClient)