argo

package
v1.24.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Argoclifunc added in v1.24.0

func Argoclifunc[T any](c *Client, fn func(c *clientCache) (T, error)) (T, error)

func GetTokenFromUserPassword

func GetTokenFromUserPassword(addr string, username, password string) (string, error)

func NewArgoCDCli

func NewArgoCDCli(options *Options) (argocdcli.Client, error)

Types

type Client

type Client struct {
	Ctx context.Context

	Options *Options
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, options *Options) (*Client, error)

func NewLazyClient added in v1.24.0

func NewLazyClient(ctx context.Context, options *Options) *Client

func (*Client) CreateArgoApp

func (c *Client) CreateArgoApp(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error)

func (*Client) DiffResources

func (c *Client) DiffResources(ctx context.Context, q *application.ResourcesQuery) ([]*v1alpha1.ResourceDiff, error)

func (*Client) EnsureArgoApp

func (c *Client) EnsureArgoApp(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error)

func (*Client) EnsureArgoProject

func (c *Client) EnsureArgoProject(ctx context.Context, in *v1alpha1.AppProject) (*v1alpha1.AppProject, error)

func (*Client) EnsureCluster

func (c *Client) EnsureCluster(ctx context.Context, in *v1alpha1.Cluster) (*v1alpha1.Cluster, error)

func (*Client) EnsureRepository

func (c *Client) EnsureRepository(ctx context.Context, repo *v1alpha1.Repository) (*v1alpha1.Repository, error)

func (*Client) GetArgoApp

func (c *Client) GetArgoApp(ctx context.Context, name string) (*v1alpha1.Application, error)

func (*Client) GetResource

func (c *Client) GetResource(ctx context.Context, q ResourceRequest) (string, error)

func (*Client) ListArgoApp

func (c *Client) ListArgoApp(ctx context.Context, selector labels.Selector) (*v1alpha1.ApplicationList, error)

func (*Client) RemoveArgoApp

func (c *Client) RemoveArgoApp(ctx context.Context, name string) error

func (*Client) RemoveResource

func (c *Client) RemoveResource(ctx context.Context, q ResourceRequest) error

func (*Client) ResourceTree

func (c *Client) ResourceTree(ctx context.Context, name string) (*v1alpha1.ApplicationTree, error)

func (*Client) Sync

func (c *Client) Sync(ctx context.Context, name string, resources []v1alpha1.SyncOperationResource) error

func (*Client) UpdateApp

func (c *Client) UpdateApp(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error)

func (*Client) WatchArgoApp

type Options

type Options struct {
	Addr     string `json:"addr" description:"argocd host"`
	Token    string `json:"token" description:"argocd token,if empty generate from username password"`
	Username string `json:"username" description:"argocd username"`
	Password string `json:"password" description:"argocd password"`
}

func NewDefaultArgoOptions

func NewDefaultArgoOptions() *Options

type ResourceRequest

type ResourceRequest struct {
	Name         *string `json:"name,omitempty"`         // application name
	Namespace    string  `json:"namespace,omitempty"`    // resource namespace
	ResourceName string  `json:"resourceName,omitempty"` // resource name
	Version      string  `json:"version,omitempty"`
	Group        string  `json:"group,omitempty"`
	Kind         string  `json:"kind,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL