operator

package
v1.56.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultClustersCount = 10
)

Variables

View Source
var (
	ErrClusterNotFound        = errors.New("cluster not found")
	ErrNoCloudManagerClusters = errors.New("can not get 'advanced clusters' object")
)

Functions

func StringOrEmpty

func StringOrEmpty(s *string) string

Types

type ConfigApply

type ConfigApply struct {
	OrgID        string
	ProjectID    string
	ClusterNames []string

	Namespace string
	Version   string
	// contains filtered or unexported fields
}

func NewConfigApply

func NewConfigApply(params NewConfigApplyParams) *ConfigApply

func (*ConfigApply) Run

func (apply *ConfigApply) Run() error

func (*ConfigApply) WithNamespace

func (apply *ConfigApply) WithNamespace(namespace string) *ConfigApply

func (*ConfigApply) WithTargetOperatorVersion

func (apply *ConfigApply) WithTargetOperatorVersion(version string) *ConfigApply

type ConfigExporter

type ConfigExporter struct {
	// contains filtered or unexported fields
}

func NewConfigExporter

func NewConfigExporter(dataProvider atlas.OperatorGenericStore, credsProvider store.CredentialsGetter, projectID, orgID string) *ConfigExporter

func (*ConfigExporter) Run

func (e *ConfigExporter) Run() (string, error)

func (*ConfigExporter) WithClustersNames

func (e *ConfigExporter) WithClustersNames(clusters []string) *ConfigExporter

func (*ConfigExporter) WithDataFederationNames

func (e *ConfigExporter) WithDataFederationNames(dataFederations []string) *ConfigExporter

func (*ConfigExporter) WithFeatureValidator

func (e *ConfigExporter) WithFeatureValidator(validator features.FeatureValidator) *ConfigExporter

func (*ConfigExporter) WithPatcher

func (e *ConfigExporter) WithPatcher(p Patcher) *ConfigExporter

func (*ConfigExporter) WithSecretsData

func (e *ConfigExporter) WithSecretsData(enabled bool) *ConfigExporter

func (*ConfigExporter) WithTargetNamespace

func (e *ConfigExporter) WithTargetNamespace(namespace string) *ConfigExporter

func (*ConfigExporter) WithTargetOperatorVersion

func (e *ConfigExporter) WithTargetOperatorVersion(version string) *ConfigExporter

type Install

type Install struct {
	// contains filtered or unexported fields
}

func NewInstall

func NewInstall(
	installer Installer,
	atlasStore atlas.OperatorGenericStore,
	credStore store.CredentialsGetter,
	featureValidator features.FeatureValidator,
	kubectl *kubernetes.KubeCtl,
	version string,
) *Install

func (*Install) Run

func (i *Install) Run(ctx context.Context, orgID string) error

func (*Install) WithAtlasGov

func (i *Install) WithAtlasGov(flag bool) *Install

func (*Install) WithImportResources

func (i *Install) WithImportResources(flag bool) *Install

func (*Install) WithNamespace

func (i *Install) WithNamespace(namespace string) *Install

func (*Install) WithResourceDeletionProtection

func (i *Install) WithResourceDeletionProtection(flag bool) *Install

func (*Install) WithSubResourceDeletionProtection

func (i *Install) WithSubResourceDeletionProtection(flag bool) *Install

func (*Install) WithWatchNamespaces

func (i *Install) WithWatchNamespaces(namespaces []string) *Install

func (*Install) WithWatchProjectName

func (i *Install) WithWatchProjectName(name string) *Install

type InstallConfig

type InstallConfig struct {
	Version                              string
	Namespace                            string
	Watch                                []string
	ResourceDeletionProtectionEnabled    bool
	SubResourceDeletionProtectionEnabled bool
	AtlasGov                             bool
}

type InstallResources

type InstallResources struct {
	// contains filtered or unexported fields
}

func NewInstaller

func NewInstaller(versionProvider version.AtlasOperatorVersionProvider, kubectl *kubernetes.KubeCtl, deletionProtection, subDeletionProtection bool) *InstallResources

func (*InstallResources) InstallCRDs

func (ir *InstallResources) InstallCRDs(ctx context.Context, version string, namespaced bool) error

func (*InstallResources) InstallConfiguration

func (ir *InstallResources) InstallConfiguration(ctx context.Context, installConfig *InstallConfig) error

func (*InstallResources) InstallCredentials

func (ir *InstallResources) InstallCredentials(ctx context.Context, namespace, orgID, publicKey, privateKey string, projectName string) error

type Installer

type Installer interface {
	InstallCRDs(ctx context.Context, version string, namespaced bool) error
	InstallConfiguration(ctx context.Context, installConfig *InstallConfig) error
	InstallCredentials(ctx context.Context, namespace, orgID, publicKey, privateKey string, projectName string) error
}

type NewConfigApplyParams

type NewConfigApplyParams struct {
	OrgID     string
	ProjectID string

	KubeCtl  *kubernetes.KubeCtl
	Exporter *ConfigExporter
}

type Patcher

type Patcher interface {
	Patch(obj runtime.Object) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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