argocd

package
v0.0.0-...-ddb5be7 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) WaitForCondition

func (builder *ApplicationBuilder) WaitForCondition(
	expected argocdtypes.ApplicationCondition, timeout time.Duration) (*ApplicationBuilder, error)

WaitForCondition waits until the Application has a condition that matches the expected, checking only the Type and Message fields. For the messages field, it matches if the message contains the expected. Zero value fields in the expected condition are ignored.

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 *argocdoperator.ArgoCD
	// created argocd object.
	Object *argocdoperator.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() (*argocdoperator.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.

Jump to

Keyboard shortcuts

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