controllers

package
v0.0.0-...-ba8419e Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: UPL-1.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MPAPPL = 0x00000001 /* The map config has been applyed */
	MPSYNC = 0x00000002 /* The map config is in sync with v$parameters where is default=flase */
	MPEMPT = 0x00000004 /* The map is empty - not specify */
	MPWARN = 0x00000008 /* Map applied with warnings */
	MPINIT = 0x00000010 /* Config map init */
	SPARE3 = 0x00000020
)

Bitmask functions

View Source
const ADB_FINALIZER = "database.oracle.com/adb-finalizer"

name of our custom finalizer

View Source
const CDBFinalizer = "database.oracle.com/CDBfinalizer"
View Source
const CONDITION_REASON_AVAILABLE = "Available"
View Source
const CONDITION_REASON_RECONCILE_ERROR = "LastReconcileError"
View Source
const CONDITION_REASON_RECONCILE_QUEUED = "LastReconcileQueued"
View Source
const CONDITION_TYPE_AVAILABLE = "Available"
View Source
const CONDITION_TYPE_RECONCILE_ERROR = "ReconfileError"
View Source
const CONDITION_TYPE_RECONCILE_QUEUED = "ReconcileQueued"
View Source
const LRESTFinalizer = "database.oracle.com/LRESTfinalizer"
View Source
const LRPDBFinalizer = "database.oracle.com/LRPDBfinalizer"
View Source
const ONE = 1
View Source
const PDBFinalizer = "database.oracle.com/PDBfinalizer"
View Source
const ZERO = 0

Variables

View Source
var ErrAdminPasswordSecretNotFound error = errors.New("Admin password secret for the database not found")
View Source
var ErrDBNotConfiguredWithDG error = errors.New("database is not configured with a dataguard configuration")
View Source
var ErrFSFOEnabledForDGConfig error = errors.New("database is configured with dataguard and FSFO enabled")
View Source
var ErrNotPhysicalStandby error = errors.New("database not in PHYSICAL_STANDBY role")
View Source
var RestartPods bool = false

Trigger a restart of Pods on Config Changes

Functions

func CheckDatabaseRoleAsPrimary

func CheckDatabaseRoleAsPrimary(p *dbapi.SingleInstanceDatabase) error

#############################################################################

Check if refered database is the primary database

#############################################################################

func CheckPrimaryDatabaseStatus

func CheckPrimaryDatabaseStatus(p *dbapi.SingleInstanceDatabase) error

#############################################################################

Check primary database status

#############################################################################

func CommonDecryptWithPrivKey

func CommonDecryptWithPrivKey(Key string, Buffer string) (string, error)

func CreateOracleHostnameEnvVarObj

func CreateOracleHostnameEnvVarObj(sidb *dbapi.SingleInstanceDatabase, referedPrimaryDatabase *dbapi.SingleInstanceDatabase) corev1.EnvVar

#############################################################################

Create oracle hostname environment variable object to be passed to sidb

#############################################################################

func EnableFlashbackInDatabase

func EnableFlashbackInDatabase(r *SingleInstanceDatabaseReconciler, dbReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) error

#############################################################################

Enabling flashback in singleinstancedatabase

#############################################################################

func GetAllPdbInDatabase

func GetAllPdbInDatabase(r *SingleInstanceDatabaseReconciler, dbReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) ([]string, error)

#############################################################################

Get all pdbs in a singleinstancedatabase

#############################################################################

func GetDatabaseAdminPassword

func GetDatabaseAdminPassword(r client.Reader, d *dbapi.SingleInstanceDatabase, ctx context.Context) (string, error)

#############################################################################

Get admin password for singleinstancedatabase

#############################################################################

func GetDatabaseReadyPod

func GetDatabaseReadyPod(r client.Reader, d *dbapi.SingleInstanceDatabase, ctx context.Context, req ctrl.Request) (corev1.Pod, error)

#############################################################################

Get ready pod for the singleinstancedatabase resource

#############################################################################

func GetTotalDatabasePods

func GetTotalDatabasePods(r client.Reader, d *dbapi.SingleInstanceDatabase, ctx context.Context, req ctrl.Request) (int, error)

#############################################################################

Get total database pods for singleinstancedatabase

#############################################################################

func NewCallApi

func NewCallApi(intr interface{}, ctx context.Context, req ctrl.Request, pdb *dbapi.PDB, url string, payload map[string]string, action string) (string, error)

func NewCallLAPI

func NewCallLAPI(intr interface{}, ctx context.Context, req ctrl.Request, lrpdb *dbapi.LRPDB, url string, payload map[string]string, action string) (string, error)

func ParseTnsAlias

func ParseTnsAlias(tns *string, pdbsrv *string)

func RestartListenerInDatabase

func RestartListenerInDatabase(r *SingleInstanceDatabaseReconciler, primaryReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) error

#############################################################################

Restarting listners in database

#############################################################################

func SetupInitParamsPrimaryForDG

func SetupInitParamsPrimaryForDG(r *SingleInstanceDatabaseReconciler, primaryReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) error

#############################################################################

Setup init parameters of primary database for dataguard configuration

#############################################################################

func SetupListenerPrimaryForDG

#############################################################################

Setup primary listener for dataguard configuration

#############################################################################

func SetupPrimaryDBTnsNamesInStandby

func SetupPrimaryDBTnsNamesInStandby(r *SingleInstanceDatabaseReconciler, s *dbapi.SingleInstanceDatabase,
	dbReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) error

#############################################################################

Setup tnsnames.ora in standby database for primary singleinstancedatabase

#############################################################################

func SetupPrimaryDatabase

#############################################################################

Setup primary database for standby singleinstancedatabase

#############################################################################

func SetupStandbyDatabase

#############################################################################

setup standby database

#############################################################################

func SetupTnsNamesForPDBListInDatabase

func SetupTnsNamesForPDBListInDatabase(r *SingleInstanceDatabaseReconciler, d *dbapi.SingleInstanceDatabase,
	dbReadyPod corev1.Pod, ctx context.Context, req ctrl.Request, pdbList []string) error

#############################################################################

Setup tnsnames.ora for all the pdb list in the singleinstancedatabase

#############################################################################

func SetupTnsNamesPrimaryForDG

#############################################################################

Set tns names for primary database for dataguard configuraion

#############################################################################

func ValidateDatabaseConfiguration

func ValidateDatabaseConfiguration(p *dbapi.SingleInstanceDatabase) error

#############################################################################

Validate refered primary database db params are all enabled

#############################################################################

func ValidatePrimaryDatabaseAdminPassword

func ValidatePrimaryDatabaseAdminPassword(r *SingleInstanceDatabaseReconciler, p *dbapi.SingleInstanceDatabase,
	adminPassword string, ctx context.Context, req ctrl.Request) error

#############################################################################

Validate primary singleinstancedatabase admin password

#############################################################################

func ValidatePrimaryDatabaseForStandbyCreation

func ValidatePrimaryDatabaseForStandbyCreation(r *SingleInstanceDatabaseReconciler, stdby *dbapi.SingleInstanceDatabase,
	primary *dbapi.SingleInstanceDatabase, ctx context.Context, req ctrl.Request) error

#############################################################################

Validate refered primary database for standby sidb creation

#############################################################################

func VolumesDefine

func VolumesDefine(ords *dbapi.OrdsSrvs) ([]corev1.Volume, []corev1.VolumeMount)

Volumes

Types

type AutonomousContainerDatabaseReconciler

type AutonomousContainerDatabaseReconciler struct {
	KubeClient client.Client
	Log        logr.Logger
	Scheme     *runtime.Scheme
	Recorder   record.EventRecorder
	// contains filtered or unexported fields
}

AutonomousContainerDatabaseReconciler reconciles a AutonomousContainerDatabase object

func (*AutonomousContainerDatabaseReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*AutonomousContainerDatabaseReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type AutonomousDatabaseBackupReconciler

type AutonomousDatabaseBackupReconciler struct {
	KubeClient client.Client
	Log        logr.Logger
	Scheme     *runtime.Scheme
	Recorder   record.EventRecorder
	// contains filtered or unexported fields
}

AutonomousDatabaseBackupReconciler reconciles a AutonomousDatabaseBackup object

func (*AutonomousDatabaseBackupReconciler) Reconcile

func (*AutonomousDatabaseBackupReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type AutonomousDatabaseReconciler

type AutonomousDatabaseReconciler struct {
	KubeClient client.Client
	Log        logr.Logger
	Scheme     *runtime.Scheme
	Recorder   record.EventRecorder
	// contains filtered or unexported fields
}

*AutonomousDatabaseReconciler reconciles a AutonomousDatabase object

func (*AutonomousDatabaseReconciler) Reconcile

func (*AutonomousDatabaseReconciler) SetupWithManager

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

SetupWithManager function

type AutonomousDatabaseRestoreReconciler

type AutonomousDatabaseRestoreReconciler struct {
	KubeClient client.Client
	Log        logr.Logger
	Scheme     *runtime.Scheme
	Recorder   record.EventRecorder
	// contains filtered or unexported fields
}

AutonomousDatabaseRestoreReconciler reconciles a AutonomousDatabaseRestore object

func (*AutonomousDatabaseRestoreReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the AutonomousDatabaseRestore object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*AutonomousDatabaseRestoreReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type CDBReconciler

type CDBReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Config   *rest.Config
	Log      logr.Logger
	Interval time.Duration
	Recorder record.EventRecorder
}

CDBReconciler reconciles a CDB object

func (*CDBReconciler) DeletePDBS

func (r *CDBReconciler) DeletePDBS(ctx context.Context, req ctrl.Request, cdb *dbapi.CDB) error

func (*CDBReconciler) Reconcile

func (r *CDBReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the CDB object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*CDBReconciler) SetupWithManager

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

type DbcsSystemReconciler

type DbcsSystemReconciler struct {
	KubeClient client.Client
	Scheme     *runtime.Scheme
	Logv1      logr.Logger
	Logger     logr.Logger

	Recorder record.EventRecorder
	// contains filtered or unexported fields
}

DbcsSystemReconciler reconciles a DbcsSystem object

func (*DbcsSystemReconciler) Reconcile

func (r *DbcsSystemReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DbcsSystem object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*DbcsSystemReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type LRESTError

type LRESTError struct {
	Code     string `json:"code,omitempty"`
	Message  string `json:"message,omitempty"`
	Type     string `json:"type,omitempty"`
	Instance string `json:"instance,omitempty"`
}

type LRESTReconciler

type LRESTReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Config   *rest.Config
	Log      logr.Logger
	Interval time.Duration
	Recorder record.EventRecorder
}

LRESTReconciler reconciles a LREST object

func (*LRESTReconciler) DeletePDBS

func (r *LRESTReconciler) DeletePDBS(ctx context.Context, req ctrl.Request, lrest *dbapi.LREST) error

func (*LRESTReconciler) Reconcile

func (r *LRESTReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the LREST object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*LRESTReconciler) SetupWithManager

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

*************************************************************

  • SetupWithManager sets up the controller with the Manager. /************************************************************

type LRPDBReconciler

type LRPDBReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Interval time.Duration
	Recorder record.EventRecorder
}

LRPDBReconciler reconciles a LRPDB object

func (*LRPDBReconciler) ApplyConfigMap

func (r *LRPDBReconciler) ApplyConfigMap(ctx context.Context, req ctrl.Request, lrpdb *dbapi.LRPDB) (int32, error)

func (*LRPDBReconciler) BaseUrl

func (r *LRPDBReconciler) BaseUrl(ctx context.Context, req ctrl.Request, lrpdb *dbapi.LRPDB, lrest dbapi.LREST) string

Compose url

func (*LRPDBReconciler) DecryptWithPrivKey

func (r *LRPDBReconciler) DecryptWithPrivKey(Key string, Buffer string, req ctrl.Request) (string, error)

func (*LRPDBReconciler) GetConfigMap

func (r *LRPDBReconciler) GetConfigMap(ctx context.Context, req ctrl.Request, lrpdb *dbapi.LRPDB) (*corev1.ConfigMap, error)

func (*LRPDBReconciler) GetSqlCode

func (r *LRPDBReconciler) GetSqlCode(rsp string, sqlcode *int) error

func (*LRPDBReconciler) InitConfigMap

func (r *LRPDBReconciler) InitConfigMap(ctx context.Context, req ctrl.Request, lrpdb *dbapi.LRPDB) *corev1.ConfigMap

func (*LRPDBReconciler) ManageConfigMapForCloningAndPlugin

func (r *LRPDBReconciler) ManageConfigMapForCloningAndPlugin(ctx context.Context, req ctrl.Request, lrpdb *dbapi.LRPDB) error

func (*LRPDBReconciler) Reconcile

func (r *LRPDBReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the LRPDB object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*LRPDBReconciler) SetupWithManager

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

***********************************************************

  • SetupWithManager sets up the controller with the Manager

************************************************************

type ORDSError

type ORDSError struct {
	Code     string `json:"code,omitempty"`
	Message  string `json:"message,omitempty"`
	Type     string `json:"type,omitempty"`
	Instance string `json:"instance,omitempty"`
}

type OnsStatus

type OnsStatus struct {
	Topicid         string                          `json:"topicid,omitempty"`
	Instance        *databasev4.ShardingDatabase    `json:"instance,omitempty"`
	OnsProvider     common.ConfigurationProvider    `json:"onsProvider,omitempty"`
	OnsProviderFlag bool                            `json:"onsProviderFlag,omitempty"`
	Rclient         ons.NotificationDataPlaneClient `json:"rclient,omitempty"`
}

Struct keeping Oracle Notification Server Info

type OracleRestDataServiceReconciler

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

OracleRestDataServiceReconciler reconciles a OracleRestDataService object

func (*OracleRestDataServiceReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the OracleRestDataService object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*OracleRestDataServiceReconciler) SetupWithManager

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

#############################################################################

SetupWithManager sets up the controller with the Manager.

#############################################################################

type OrdsSrvsReconciler

type OrdsSrvsReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

OrdsSrvsReconciler reconciles a OrdsSrvs object

func (*OrdsSrvsReconciler) CommonDecryptWithPrivKey3

func (r *OrdsSrvsReconciler) CommonDecryptWithPrivKey3(ords *dbapi.OrdsSrvs, sname string, skey string, ctx context.Context) string

func (*OrdsSrvsReconciler) ConfigMapDefine

func (r *OrdsSrvsReconciler) ConfigMapDefine(ctx context.Context, ords *dbapi.OrdsSrvs, configMapName string, poolIndex int) *corev1.ConfigMap

func (*OrdsSrvsReconciler) ConfigMapDelete

func (r *OrdsSrvsReconciler) ConfigMapDelete(ctx context.Context, req ctrl.Request, ords *dbapi.OrdsSrvs, definedPools map[string]bool) (err error)

************************************************

  • Deletions *************************************************

func (*OrdsSrvsReconciler) ConfigMapReconcile

func (r *OrdsSrvsReconciler) ConfigMapReconcile(ctx context.Context, ords *dbapi.OrdsSrvs, configMapName string, poolIndex int) (err error)

***********************************************

  • ConfigMaps ************************************************

func (*OrdsSrvsReconciler) Reconcile

func (r *OrdsSrvsReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*OrdsSrvsReconciler) ServiceDefine

func (r *OrdsSrvsReconciler) ServiceDefine(ctx context.Context, ords *dbapi.OrdsSrvs, HTTPport int32, HTTPSport int32, MongoPort int32) *corev1.Service

Service

func (*OrdsSrvsReconciler) ServiceReconcile

func (r *OrdsSrvsReconciler) ServiceReconcile(ctx context.Context, ords *dbapi.OrdsSrvs) (err error)

Service

func (*OrdsSrvsReconciler) SetStatus

func (r *OrdsSrvsReconciler) SetStatus(ctx context.Context, req ctrl.Request, ords *dbapi.OrdsSrvs, statusCondition metav1.Condition) error

***********************************************

  • Status ************************************************

func (*OrdsSrvsReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*OrdsSrvsReconciler) WorkloadDelete

func (r *OrdsSrvsReconciler) WorkloadDelete(ctx context.Context, req ctrl.Request, ords *dbapi.OrdsSrvs, kind string) (err error)

func (*OrdsSrvsReconciler) WorkloadReconcile

func (r *OrdsSrvsReconciler) WorkloadReconcile(ctx context.Context, req ctrl.Request, ords *dbapi.OrdsSrvs, kind string) (err error)

***********************************************

  • Workloads ************************************************

type PDBReconciler

type PDBReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Interval time.Duration
	Recorder record.EventRecorder
}

PDBReconciler reconciles a PDB object

func (*PDBReconciler) Reconcile

func (r *PDBReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*PDBReconciler) SetupWithManager

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

*************************************************************

  • SetupWithManager sets up the controller with the Manager. /************************************************************

type RESTSQLCollection

type RESTSQLCollection struct {
	Env struct {
		DefaultTimeZone string `json:"defaultTimeZone,omitempty"`
	} `json:"env"`
	Items []SQLItem `json:"items"`
}

type SQLItem

type SQLItem struct {
	StatementId  int      `json:"statementId,omitempty"`
	Response     []string `json:"response"`
	ErrorCode    int      `json:"errorCode,omitempty"`
	ErrorLine    int      `json:"errorLine,omitempty"`
	ErrorColumn  int      `json:"errorColumn,omitempty"`
	ErrorDetails string   `json:"errorDetails,omitempty"`
	Result       int      `json:"result,omitempty"`
}

type SQL_Item

type SQL_Item struct {
	StatementId  int      `json:"statementId,omitempty"`
	Response     []string `json:"response"`
	ErrorCode    int      `json:"errorCode,omitempty"`
	ErrorLine    int      `json:"errorLine,omitempty"`
	ErrorColumn  int      `json:"errorColumn,omitempty"`
	ErrorDetails string   `json:"errorDetails,omitempty"`
	Result       int      `json:"result,omitempty"`
}

type ShardingDatabaseReconciler

type ShardingDatabaseReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme

	Recorder  record.EventRecorder
	InCluster bool
	Namespace string
	// contains filtered or unexported fields
}

ShardingDatabaseReconciler reconciles a ShardingDatabase object

func (*ShardingDatabaseReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ShardingDatabase object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*ShardingDatabaseReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager. The default concurrent reconcilation loop is 1 Check https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/controller#Options to under MaxConcurrentReconciles

func (*ShardingDatabaseReconciler) UpdateSecret

func (r *ShardingDatabaseReconciler) UpdateSecret(instance *databasev4.ShardingDatabase, kClient client.Client, logger logr.Logger) (ctrl.Result, error)

================ Function to check secret update=============

type SingleInstanceDatabaseReconciler

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

SingleInstanceDatabaseReconciler reconciles a SingleInstanceDatabase object

func (*SingleInstanceDatabaseReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the SingleInstanceDatabase object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*SingleInstanceDatabaseReconciler) SetupWithManager

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

#############################################################################

SetupWithManager sets up the controller with the Manager

#############################################################################

Jump to

Keyboard shortcuts

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