application

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT-0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const Install Action = "install"
const Uninstall Action = "uninstall"

type Application

type Application struct {
	cmd.Command
	cmd.Flags
	Options

	Dependencies []*resource.Resource
	Installer
	PostInstallResources []*resource.Resource
}

func (*Application) CreateDependencies

func (a *Application) CreateDependencies() error

func (*Application) DeleteDependencies

func (a *Application) DeleteDependencies() error

func (*Application) NewInstallCmd

func (a *Application) NewInstallCmd() *cobra.Command

func (*Application) NewUninstallCmd

func (a *Application) NewUninstallCmd() *cobra.Command

type ApplicationOptions

type ApplicationOptions struct {
	ChartVersion string
	Version      string

	DefaultVersion
	IngressOptions

	DeleteDependencies           bool
	DisableNamespaceFlag         bool
	DisableServiceAccountFlag    bool
	DisableVersionFlag           bool
	ExposeIngressAndLoadBalancer bool
	ExposeIngressOnly            bool
	LockVersionFlag              bool
	SetValues                    []string
	UsePrevious                  bool

	Account        string
	ClusterName    string
	DryRun         bool
	Namespace      string
	Partition      string
	Region         string
	ServiceAccount string
	Cluster        *types.Cluster
	// contains filtered or unexported fields
}

func (*ApplicationOptions) AddInstallFlags

func (o *ApplicationOptions) AddInstallFlags(cobraCmd *cobra.Command, flags cmd.Flags, it InstallerType) cmd.Flags

func (*ApplicationOptions) AddUninstallFlags

func (o *ApplicationOptions) AddUninstallFlags(cobraCmd *cobra.Command, _ cmd.Flags, iamPolicy bool) cmd.Flags

func (*ApplicationOptions) AssignCommonResourceOptions

func (o *ApplicationOptions) AssignCommonResourceOptions(res *resource.Resource)

func (*ApplicationOptions) Common

func (*ApplicationOptions) IrsaAnnotation

func (o *ApplicationOptions) IrsaAnnotation() string

func (*ApplicationOptions) IrsaAnnotationFor

func (o *ApplicationOptions) IrsaAnnotationFor(serviceAccount string) string

func (*ApplicationOptions) KubeContext

func (o *ApplicationOptions) KubeContext() string

func (*ApplicationOptions) NewChartVersionFlag

func (o *ApplicationOptions) NewChartVersionFlag() *cmd.StringFlag

func (*ApplicationOptions) NewClusterFlag

func (o *ApplicationOptions) NewClusterFlag(action Action) *cmd.StringFlag

func (*ApplicationOptions) NewDeleteRoleFlag

func (o *ApplicationOptions) NewDeleteRoleFlag() *cmd.BoolFlag

func (*ApplicationOptions) NewDryRunFlag

func (o *ApplicationOptions) NewDryRunFlag() *cmd.BoolFlag

func (*ApplicationOptions) NewNamespaceFlag

func (o *ApplicationOptions) NewNamespaceFlag(action Action) *cmd.StringFlag

func (*ApplicationOptions) NewServiceAccountFlag

func (o *ApplicationOptions) NewServiceAccountFlag() *cmd.StringFlag

func (*ApplicationOptions) NewSetFlag

func (o *ApplicationOptions) NewSetFlag() *cmd.StringSliceFlag

func (*ApplicationOptions) NewUsePreviousFlag

func (o *ApplicationOptions) NewUsePreviousFlag() *cmd.BoolFlag

func (*ApplicationOptions) NewVersionFlag

func (o *ApplicationOptions) NewVersionFlag() *cmd.StringFlag

func (*ApplicationOptions) PostInstall

func (o *ApplicationOptions) PostInstall(name string, postInstallRes []*resource.Resource) error

func (*ApplicationOptions) PreDependencies

func (o *ApplicationOptions) PreDependencies(Action) error

func (*ApplicationOptions) PreInstall

func (o *ApplicationOptions) PreInstall() error

type DefaultVersion

type DefaultVersion interface {
	LatestChartVersion() string
	LatestVersion(clusterVersion string) string
	PreviousChartVersion() string
	PreviousVersion(clusterVersion string) string
	LatestString() string
	PreviousString() string
}

type IngressOptions

type IngressOptions struct {
	IngressClass       string
	IngressHost        string
	IngressOnly        bool
	NginxBasicAuthPass string
	NLB                bool
	TargetType         string
	// contains filtered or unexported fields
}

func NewIngressOptions

func NewIngressOptions(ingressOnly bool) IngressOptions

func (*IngressOptions) IngressAnnotations

func (o *IngressOptions) IngressAnnotations() (string, error)

func (*IngressOptions) NewIngressFlags

func (o *IngressOptions) NewIngressFlags() cmd.Flags

func (*IngressOptions) PostInstallResources

func (o *IngressOptions) PostInstallResources(name string) []*resource.Resource

func (*IngressOptions) ServiceAnnotations

func (o *IngressOptions) ServiceAnnotations() (string, error)

func (*IngressOptions) ServiceType

func (o *IngressOptions) ServiceType() string

type Installer

type Installer interface {
	Install(options Options) error
	Uninstall(options Options) error
	SetDryRun()
	Type() InstallerType
}

type InstallerType

type InstallerType int
const (
	HelmInstaller InstallerType = iota
	ManifestInstaller
)

type KubernetesVersionDependent

type KubernetesVersionDependent struct {
	Latest   map[string]string
	Previous map[string]string

	LatestChart   string
	PreviousChart string
}

func (*KubernetesVersionDependent) LatestChartVersion

func (v *KubernetesVersionDependent) LatestChartVersion() string

func (*KubernetesVersionDependent) LatestString

func (v *KubernetesVersionDependent) LatestString() string

func (*KubernetesVersionDependent) LatestVersion

func (v *KubernetesVersionDependent) LatestVersion(clusterVersion string) string

func (*KubernetesVersionDependent) PreviousChartVersion

func (v *KubernetesVersionDependent) PreviousChartVersion() string

func (*KubernetesVersionDependent) PreviousString

func (v *KubernetesVersionDependent) PreviousString() string

func (*KubernetesVersionDependent) PreviousVersion

func (v *KubernetesVersionDependent) PreviousVersion(clusterVersion string) string

type LatestPrevious

type LatestPrevious struct {
	Latest   string
	Previous string

	LatestChart   string
	PreviousChart string
}

func (*LatestPrevious) LatestChartVersion

func (v *LatestPrevious) LatestChartVersion() string

func (*LatestPrevious) LatestString

func (v *LatestPrevious) LatestString() string

func (*LatestPrevious) LatestVersion

func (v *LatestPrevious) LatestVersion(clusterVersion string) string

func (*LatestPrevious) PreviousChartVersion

func (v *LatestPrevious) PreviousChartVersion() string

func (*LatestPrevious) PreviousString

func (v *LatestPrevious) PreviousString() string

func (*LatestPrevious) PreviousVersion

func (v *LatestPrevious) PreviousVersion(clusterVersion string) string

type Options

type Options interface {
	AddInstallFlags(*cobra.Command, cmd.Flags, InstallerType) cmd.Flags
	AddUninstallFlags(*cobra.Command, cmd.Flags, bool) cmd.Flags
	AssignCommonResourceOptions(*resource.Resource)
	Common() *ApplicationOptions
	KubeContext() string
	PreDependencies(Action) error
	PreInstall() error
	PostInstall(string, []*resource.Resource) error
}

Jump to

Keyboard shortcuts

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