Documentation
¶
Index ¶
- Constants
- func CheckDatabaseRoleAsPrimary(p *dbapi.SingleInstanceDatabase) error
- func CheckPrimaryDatabaseStatus(p *dbapi.SingleInstanceDatabase) error
- func EnableFlashbackInDatabase(r *SingleInstanceDatabaseReconciler, dbReadyPod corev1.Pod, ...) error
- func GetAllPdbInDatabase(r *SingleInstanceDatabaseReconciler, dbReadyPod corev1.Pod, ...) ([]string, error)
- func GetDatabaseAdminPassword(r client.Reader, d *dbapi.SingleInstanceDatabase, ctx context.Context) (string, error)
- func GetDatabaseReadyPod(r client.Reader, d *dbapi.SingleInstanceDatabase, ctx context.Context, ...) (corev1.Pod, error)
- func GetTotalDatabasePods(r client.Reader, d *dbapi.SingleInstanceDatabase, ctx context.Context, ...) (int, error)
- func ParseTnsAlias(tns *string, pdbsrv *string)
- func RestartListenerInDatabase(r *SingleInstanceDatabaseReconciler, primaryReadyPod corev1.Pod, ...) error
- func SetupInitParamsPrimaryForDG(r *SingleInstanceDatabaseReconciler, primaryReadyPod corev1.Pod, ...) error
- func SetupListenerPrimaryForDG(r *SingleInstanceDatabaseReconciler, p *dbapi.SingleInstanceDatabase, ...) error
- func SetupPrimaryDBTnsNamesInStandby(r *SingleInstanceDatabaseReconciler, s *dbapi.SingleInstanceDatabase, ...) error
- func SetupPrimaryDatabase(r *SingleInstanceDatabaseReconciler, stdby *dbapi.SingleInstanceDatabase, ...) error
- func SetupStandbyDatabase(r *SingleInstanceDatabaseReconciler, stdby *dbapi.SingleInstanceDatabase, ...) error
- func SetupTnsNamesForPDBListInDatabase(r *SingleInstanceDatabaseReconciler, d *dbapi.SingleInstanceDatabase, ...) error
- func SetupTnsNamesPrimaryForDG(r *SingleInstanceDatabaseReconciler, p *dbapi.SingleInstanceDatabase, ...) error
- func ValidateDatabaseConfiguration(p *dbapi.SingleInstanceDatabase) error
- func ValidatePrimaryDatabaseAdminPassword(r *SingleInstanceDatabaseReconciler, p *dbapi.SingleInstanceDatabase, ...) error
- func ValidatePrimaryDatabaseForStandbyCreation(r *SingleInstanceDatabaseReconciler, stdby *dbapi.SingleInstanceDatabase, ...) error
- type AutonomousContainerDatabaseReconciler
- type AutonomousDatabaseBackupReconciler
- type AutonomousDatabaseReconciler
- type AutonomousDatabaseRestoreReconciler
- type CDBReconciler
- type DataguardBrokerReconciler
- func (r *DataguardBrokerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *DataguardBrokerReconciler) SetAsPrimaryDatabase(sidbSid string, targetSid string, m *dbapi.DataguardBroker, ...) ctrl.Result
- func (r *DataguardBrokerReconciler) SetupWithManager(mgr ctrl.Manager) error
- type DbcsSystemReconciler
- type ORDSError
- type OracleRestDataServiceReconciler
- type PDBReconciler
- type RESTSQLCollection
- type SQLItem
- type ShardingDatabaseReconciler
- type ShardingTopology
- type SingleInstanceDatabaseReconciler
Constants ¶
const CDBFinalizer = "database.oracle.com/CDBfinalizer"
const PDBFinalizer = "database.oracle.com/PDBfinalizer"
Variables ¶
This section is empty.
Functions ¶
func CheckDatabaseRoleAsPrimary ¶
func CheckDatabaseRoleAsPrimary(p *dbapi.SingleInstanceDatabase) error
func CheckPrimaryDatabaseStatus ¶
func CheckPrimaryDatabaseStatus(p *dbapi.SingleInstanceDatabase) error
StandbyDatabase functions Primary DB Validation
func GetAllPdbInDatabase ¶
func GetAllPdbInDatabase(r *SingleInstanceDatabaseReconciler, dbReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) ([]string, error)
Standby DB Setup
func GetDatabaseReadyPod ¶
func GetTotalDatabasePods ¶
func GetTotalDatabasePods(r client.Reader, d *dbapi.SingleInstanceDatabase, ctx context.Context, req ctrl.Request) (int, error)
Primary DB Setup
func ParseTnsAlias ¶
func SetupListenerPrimaryForDG ¶
func SetupListenerPrimaryForDG(r *SingleInstanceDatabaseReconciler, p *dbapi.SingleInstanceDatabase, s *dbapi.SingleInstanceDatabase, primaryReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) error
func SetupPrimaryDBTnsNamesInStandby ¶
func SetupPrimaryDBTnsNamesInStandby(r *SingleInstanceDatabaseReconciler, s *dbapi.SingleInstanceDatabase, dbReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) error
func SetupPrimaryDatabase ¶
func SetupPrimaryDatabase(r *SingleInstanceDatabaseReconciler, stdby *dbapi.SingleInstanceDatabase, primary *dbapi.SingleInstanceDatabase, ctx context.Context, req ctrl.Request) error
func SetupStandbyDatabase ¶
func SetupStandbyDatabase(r *SingleInstanceDatabaseReconciler, stdby *dbapi.SingleInstanceDatabase, primary *dbapi.SingleInstanceDatabase, ctx context.Context, req ctrl.Request) error
func SetupTnsNamesPrimaryForDG ¶
func SetupTnsNamesPrimaryForDG(r *SingleInstanceDatabaseReconciler, p *dbapi.SingleInstanceDatabase, s *dbapi.SingleInstanceDatabase, primaryReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) error
func ValidateDatabaseConfiguration ¶
func ValidateDatabaseConfiguration(p *dbapi.SingleInstanceDatabase) error
func ValidatePrimaryDatabaseAdminPassword ¶
func ValidatePrimaryDatabaseAdminPassword(r *SingleInstanceDatabaseReconciler, p *dbapi.SingleInstanceDatabase, adminPassword string, ctx context.Context, req ctrl.Request) error
func ValidatePrimaryDatabaseForStandbyCreation ¶
func ValidatePrimaryDatabaseForStandbyCreation(r *SingleInstanceDatabaseReconciler, stdby *dbapi.SingleInstanceDatabase, primary *dbapi.SingleInstanceDatabase, ctx context.Context, req ctrl.Request) error
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 ¶
func (r *AutonomousContainerDatabaseReconciler) 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.
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) 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 (r *AutonomousDatabaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is the funtion that the operator calls every time when the reconciliation loop is triggered. It go to the beggining of the reconcile if an error is returned. We won't return a error if it is related to OCI, because the issues cannot be solved by re-run the 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 ¶
func (r *AutonomousDatabaseRestoreReconciler) 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 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) 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 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
*************************************************************
- SetupWithManager sets up the controller with the Manager. /************************************************************
type DataguardBrokerReconciler ¶
type DataguardBrokerReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Config *rest.Config Recorder record.EventRecorder }
DataguardBrokerReconciler reconciles a DataguardBroker object
func (*DataguardBrokerReconciler) Reconcile ¶
func (r *DataguardBrokerReconciler) 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 DataguardBroker 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 (*DataguardBrokerReconciler) SetAsPrimaryDatabase ¶
func (r *DataguardBrokerReconciler) SetAsPrimaryDatabase(sidbSid string, targetSid string, m *dbapi.DataguardBroker, n *dbapi.SingleInstanceDatabase, adminPassword string, ctx context.Context, req ctrl.Request) ctrl.Result
#####################################################################################################
Switchovers to 'sid' db to make 'sid' db primary
#####################################################################################################
func (*DataguardBrokerReconciler) SetupWithManager ¶
func (r *DataguardBrokerReconciler) SetupWithManager(mgr ctrl.Manager) error
#############################################################################
SetupWithManager sets up the controller with the Manager
#############################################################################
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 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 ¶
func (r *OracleRestDataServiceReconciler) 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 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 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 ¶
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 PDB 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 (*PDBReconciler) SetupWithManager ¶
func (r *PDBReconciler) SetupWithManager(mgr ctrl.Manager) error
*************************************************************
- SetupWithManager sets up the controller with the Manager. /************************************************************
type RESTSQLCollection ¶
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 ShardingDatabaseReconciler ¶
type ShardingDatabaseReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder // contains filtered or unexported fields }
ShardingDatabaseReconciler reconciles a ShardingDatabase object
func (*ShardingDatabaseReconciler) Reconcile ¶
func (r *ShardingDatabaseReconciler) 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 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
type ShardingTopology ¶
type ShardingTopology struct { Instance *databasev1alpha1.ShardingDatabase // contains filtered or unexported fields }
Sharding Topology
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 ¶
func (r *SingleInstanceDatabaseReconciler) 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 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
#############################################################################
Source Files
¶
- autonomouscontainerdatabase_controller.go
- autonomousdatabase_controller.go
- autonomousdatabasebackup_controller.go
- autonomousdatabaserestore_controller.go
- cdb_controller.go
- dataguardbroker_controller.go
- dbcssystem_controller.go
- oraclerestdataservice_controller.go
- pdb_controller.go
- shardingdatabase_controller.go
- singleinstancedatabase_controller.go