Documentation ¶
Index ¶
- Constants
- type OperatorManager
- func (m *OperatorManager) CreateOrGetPodEnvironmentSecret(ctx context.Context, namespace string) (*corev1.Secret, error)
- func (m *OperatorManager) CreatePodEnvironmentConfigMap(ctx context.Context, namespace string) (*corev1.ConfigMap, error)
- func (m *OperatorManager) InstallOrUpdateOperator(ctx context.Context, namespace string) error
- func (m *OperatorManager) IsOperatorDeletable(ctx context.Context, namespace string) (bool, error)
- func (m *OperatorManager) IsOperatorInstalled(ctx context.Context, namespace string) (bool, error)
- func (m *OperatorManager) UninstallOperator(ctx context.Context, namespace string) error
- func (m *OperatorManager) UpdateAllManagedOperators(ctx context.Context) error
- type Options
Constants ¶
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 ¶
IsOperatorDeletable returns true when there's no running instance operated by the operator
func (*OperatorManager) IsOperatorInstalled ¶
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