operatormanager

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PodEnvCMName Name of the pod environment configmap to create and use
	PodEnvCMName string = "postgres-pod-config"

	// PodEnvSecretName Name of the pod environment secret to create and use
	PodEnvSecretName string = "postgres-pod-secret" //nolint:gosec

	// SidecarsCMFluentBitConfKey Name of the key containing the fluent-bit.conf config file
	SidecarsCMFluentBitConfKey string = "fluent-bit.conf"
	// SidecarsCMExporterQueriesKey Name of the key containing the queries.yaml config file
	SidecarsCMExporterQueriesKey string = "queries.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OperatorManager

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

OperatorManager manages the operator

func New

func New(confRest *rest.Config, fileName string, scheme *runtime.Scheme, log logr.Logger, opt Options) (*OperatorManager, error)

New creates a new `OperatorManager`

func (*OperatorManager) CreateOrGetPodEnvironmentSecret added in v0.11.0

func (m *OperatorManager) CreateOrGetPodEnvironmentSecret(ctx context.Context, namespace string) (*corev1.Secret, error)

CreateOrGetPodEnvironmentSecret creates a new Secret with additional environment variables for the pods or simply returns it if it already exists

func (*OperatorManager) CreatePodEnvironmentConfigMap added in v0.10.1

func (m *OperatorManager) CreatePodEnvironmentConfigMap(ctx context.Context, namespace string) (*corev1.ConfigMap, error)

CreatePodEnvironmentConfigMap creates a new ConfigMap with additional environment variables for the pods

func (*OperatorManager) InstallOrUpdateOperator

func (m *OperatorManager) InstallOrUpdateOperator(ctx context.Context, namespace string) error

InstallOrUpdateOperator installs or updates the operator Stored in `OperatorManager`

func (*OperatorManager) IsOperatorDeletable

func (m *OperatorManager) IsOperatorDeletable(ctx context.Context, namespace string) (bool, error)

IsOperatorDeletable returns true when there's no running instance operated by the operator

func (*OperatorManager) IsOperatorInstalled

func (m *OperatorManager) IsOperatorInstalled(ctx context.Context, namespace string) (bool, error)

IsOperatorInstalled returns true when the operator is installed

func (*OperatorManager) UninstallOperator

func (m *OperatorManager) UninstallOperator(ctx context.Context, namespace string) error

UninstallOperator uninstalls the operator

func (*OperatorManager) UpdateAllManagedOperators added in v0.10.0

func (m *OperatorManager) UpdateAllManagedOperators(ctx context.Context) error

UpdateAllManagedOperators Updates the manifests of all postgres operators managed by this postgreslet

type Options added in v0.3.0

type Options struct {
	PspName                 string
	OperatorImage           string
	DockerImage             string
	EtcdHost                string
	CRDValidation           bool
	MajorVersionUpgradeMode string
	PostgresletNamespace    string
	SidecarsConfigMapName   string
	PodAntiaffinity         bool
	PartitionID             string
}

Options

Jump to

Keyboard shortcuts

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