operator

package
v0.0.0-...-8da71cf Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SDKOperatorGroupName = "operator-sdk-og"
)

Variables

This section is empty.

Functions

func CatalogNameForPackage

func CatalogNameForPackage(pkg string) string

func GetSupportedInstallModes

func GetSupportedInstallModes(csvInstallModes []v1alpha1.InstallMode) set.Set[string]

GetSupportedInstallModes returns the given slice of InstallModes as a String set.

func LoadBundle

func LoadBundle(ctx context.Context, bundleImage string, skipTLSVerify bool, useHTTP bool) (registryutil.LabelsMap, *apimanifests.Bundle, error)

LoadBundle returns metadata and manifests from within bundleImage.

Types

type Configuration

type Configuration struct {
	Namespace      string
	ServiceAccount string
	KubeconfigPath string
	RESTConfig     *rest.Config
	Client         client.Client
	Scheme         *runtime.Scheme
	Timeout        time.Duration
	// contains filtered or unexported fields
}

func (*Configuration) BindFlags

func (c *Configuration) BindFlags(fs *pflag.FlagSet)

func (*Configuration) Load

func (c *Configuration) Load() error

type ErrPackageNotFound

type ErrPackageNotFound struct {
	PackageName string
}

func (ErrPackageNotFound) Error

func (e ErrPackageNotFound) Error() string

type InstallMode

type InstallMode struct {
	InstallModeType  v1alpha1.InstallModeType
	TargetNamespaces []string
}

func (InstallMode) CheckCompatibility

func (i InstallMode) CheckCompatibility(csv *v1alpha1.ClusterServiceVersion, operatorNamespace string) error

CheckCompatibility checks if an InstallMode is compatible with the operator's namespace and is supported by csv.

func (InstallMode) IsEmpty

func (i InstallMode) IsEmpty() bool

IsEmpty returns true if the InstallModeType is empty.

func (*InstallMode) Set

func (i *InstallMode) Set(str string) error

Set is called when the --install-mode flag is passed to the CLI. It will configure the InstallMode based on the values passed in.

func (InstallMode) String

func (i InstallMode) String() string

func (InstallMode) Type

func (InstallMode) Type() string

func (InstallMode) Validate

func (i InstallMode) Validate() error

type Uninstall

type Uninstall struct {
	Package                  string
	DeleteAll                bool
	DeleteCRDs               bool
	DeleteOperatorGroups     bool
	DeleteOperatorGroupNames []string

	Logf func(string, ...interface{})
	// contains filtered or unexported fields
}

func NewUninstall

func NewUninstall(cfg *Configuration) *Uninstall

func (*Uninstall) BindFlags

func (u *Uninstall) BindFlags(fs *pflag.FlagSet)

func (*Uninstall) Run

func (u *Uninstall) Run(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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