argocd

package
v0.0.0-...-091666d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIGroup const definition.
	APIGroup = "argoproj.io"
	// APIVersion const definition.
	APIVersion = "v1alpha1"
)

Variables

This section is empty.

Functions

func GetApplicationsGVR

func GetApplicationsGVR() schema.GroupVersionResource

GetApplicationsGVR returns applications GroupVersionResource which could be used for Clean function.

Types

type ApplicationBuilder

type ApplicationBuilder struct {
	// application Definition, used to create the application object.
	Definition *argocdtypes.Application
	// created application object.
	Object *argocdtypes.Application
	// contains filtered or unexported fields
}

ApplicationBuilder provides a struct for an application object from the cluster and a definition.

func PullApplication

func PullApplication(apiClient *clients.Settings, name, nsname string) (*ApplicationBuilder, error)

PullApplication pulls existing application into ApplicationBuilder struct.

func (*ApplicationBuilder) Create

func (builder *ApplicationBuilder) Create() (*ApplicationBuilder, error)

Create makes an argocd application in the cluster and stores the created object in a struct.

func (*ApplicationBuilder) Delete

func (builder *ApplicationBuilder) Delete() (*ApplicationBuilder, error)

Delete removes the argocd application object from a cluster.

func (*ApplicationBuilder) Exists

func (builder *ApplicationBuilder) Exists() bool

Exists checks whether the given argocd application exists.

func (*ApplicationBuilder) Get

func (builder *ApplicationBuilder) Get() (*argocdtypes.Application, error)

Get returns argocd application object if found.

func (*ApplicationBuilder) Update

func (builder *ApplicationBuilder) Update(force bool) (*ApplicationBuilder, error)

Update renovates the existing argocd application object with the argocd application definition in builder.

func (*ApplicationBuilder) WithGitDetails

func (builder *ApplicationBuilder) WithGitDetails(gitRepo, gitBranch, gitPath string) *ApplicationBuilder

WithGitDetails applies git details to application definition.

type Builder

type Builder struct {
	// argocd Definition, used to create the argocd object.
	Definition *argocdoperatorv1alpha1.ArgoCD
	// created argocd object.
	Object *argocdoperatorv1alpha1.ArgoCD
	// contains filtered or unexported fields
}

Builder provides struct for the argocd object containing connection to the cluster and the argocd definitions.

func NewBuilder

func NewBuilder(apiClient *clients.Settings, name, nsname string) *Builder

NewBuilder creates a new instance of Builder.

func Pull

func Pull(apiClient *clients.Settings, name, nsname string) (*Builder, error)

Pull pulls existing argocd from cluster.

func (*Builder) Create

func (builder *Builder) Create() (*Builder, error)

Create makes an argocd in the cluster and stores the created object in struct.

func (*Builder) Delete

func (builder *Builder) Delete() (*Builder, error)

Delete removes argocd from a cluster.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given argocd exists.

func (*Builder) Get

func (builder *Builder) Get() (*argocdoperatorv1alpha1.ArgoCD, error)

Get returns argocd object if found.

func (*Builder) Update

func (builder *Builder) Update(force bool) (*Builder, error)

Update renovates the existing argocd object with the argocd definition in builder.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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