controllers

package
v0.0.0-...-48c85bd Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// SuccessSynced is used as part of the Event 'reason' when Store resource is synced
	SuccessSynced = "Synced"
	// MessageResourceSynced is the message used for an Event fired when Store resource
	// is synced successfully
	MessageResourceSynced = "PostgreSql Resource synced successfully"
	//Finalizer name of  finalizer
	Finalizer = "sql.terrak8s.io"
)

Variables

This section is empty.

Functions

func GetSecretFromCR

func GetSecretFromCR(instance *sqlv1alpha1.PostgreSql) map[string][]string

GetSecretFromCR stores secretKeyRefs on a map

Types

type PostgreSqlReconciler

type PostgreSqlReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

PostgreSqlReconciler reconciles a PostgreSql object

func (*PostgreSqlReconciler) FetchUserPasswordFromSecret

func (r *PostgreSqlReconciler) FetchUserPasswordFromSecret(namespace string, instance *sqlv1alpha1.PostgreSql, ctx context.Context, secretList kubeApiV1.SecretList) (map[string][]byte, error)

FetchUserPasswordFromSecret fetch secret from namespace based on CR

func (*PostgreSqlReconciler) GenerateTFFromCR

func (r *PostgreSqlReconciler) GenerateTFFromCR(instance *sqlv1alpha1.PostgreSql, dir string, value map[string][]byte) error

GenerateTFFromCR generate tf files from CR

func (*PostgreSqlReconciler) GetGCPCredentialsFromSecret

func (r *PostgreSqlReconciler) GetGCPCredentialsFromSecret(secretList kubeApiV1.SecretList, namespace string, ctx context.Context, instance *sqlv1alpha1.PostgreSql, dir string) error

GetGCPCredentialsFromSecret fetch gcp serviceAccount from secret

func (*PostgreSqlReconciler) GetOutput

GetOutput get output and update the output status

func (*PostgreSqlReconciler) InitializeRemoteBackend

func (r *PostgreSqlReconciler) InitializeRemoteBackend(dir string, instance *sqlv1alpha1.PostgreSql, ctx context.Context) error

InitializeRemoteBackend initialize remote backend based on generated tf

func (*PostgreSqlReconciler) ProvisioningInstance

func (r *PostgreSqlReconciler) ProvisioningInstance(dir string, instance *sqlv1alpha1.PostgreSql, ctx context.Context) error

ProvisioningInstance provision sql instance based on generated tf

func (*PostgreSqlReconciler) ProvisioningStorageBucket

func (r *PostgreSqlReconciler) ProvisioningStorageBucket(dir string, bucket *sqlv1alpha1.PostgreSql, ctx context.Context) error

ProvisioningStorageBucket provision storage bucket based on generated tf

func (*PostgreSqlReconciler) Reconcile

func (r *PostgreSqlReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*PostgreSqlReconciler) SetupWithManager

func (r *PostgreSqlReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*PostgreSqlReconciler) UpdateStatus

func (r *PostgreSqlReconciler) UpdateStatus(ctx context.Context, instance *sqlv1alpha1.PostgreSql, phase sqlv1alpha1.ObjectPhase) error

UpdateStatus Update the CR status

Jump to

Keyboard shortcuts

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