Documentation ¶
Index ¶
- Constants
- func CheckDatabaseRoleAsPrimary(p *dbapi.SingleInstanceDatabase) error
- func CheckPrimaryDatabaseStatus(p *dbapi.SingleInstanceDatabase) error
- func CreateOracleHostnameEnvVarObj(sidb *dbapi.SingleInstanceDatabase, ...) corev1.EnvVar
- 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
- func (r *ShardingDatabaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ShardingDatabaseReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ShardingDatabaseReconciler) UpdateSecret(instance *databasev1alpha1.ShardingDatabase, kClient client.Client, ...) (ctrl.Result, error)
- type ShardingTopology
- type SingleInstanceDatabaseReconciler
Constants ¶
const CDBFinalizer = "database.oracle.com/CDBfinalizer"
const CONDITION_REASON_COMPLETE = "ReconcileComplete"
const CONDITION_TYPE_COMPLETE = "Complete"
const ONE = 1
const PDBFinalizer = "database.oracle.com/PDBfinalizer"
const ZERO = 0
Variables ¶
This section is empty.
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 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 ParseTnsAlias ¶
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 ¶
func SetupListenerPrimaryForDG(r *SingleInstanceDatabaseReconciler, p *dbapi.SingleInstanceDatabase, s *dbapi.SingleInstanceDatabase, primaryReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) error
#############################################################################
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 ¶
func SetupPrimaryDatabase(r *SingleInstanceDatabaseReconciler, stdby *dbapi.SingleInstanceDatabase, primary *dbapi.SingleInstanceDatabase, ctx context.Context, req ctrl.Request) error
#############################################################################
Setup primary database for standby singleinstancedatabase
#############################################################################
func SetupStandbyDatabase ¶
func SetupStandbyDatabase(r *SingleInstanceDatabaseReconciler, stdby *dbapi.SingleInstanceDatabase, primary *dbapi.SingleInstanceDatabase, ctx context.Context, req ctrl.Request) error
#############################################################################
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 ¶
func SetupTnsNamesPrimaryForDG(r *SingleInstanceDatabaseReconciler, p *dbapi.SingleInstanceDatabase, s *dbapi.SingleInstanceDatabase, primaryReadyPod corev1.Pod, ctx context.Context, req ctrl.Request) error
#############################################################################
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
#############################################################################
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/controller-runtime@v0.6.4/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/controller-runtime@v0.6.4/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/controller-runtime@v0.9.2/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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) 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 InCluster bool Namespace string // 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/controller-runtime@v0.6.4/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 *databasev1alpha1.ShardingDatabase, kClient client.Client, logger logr.Logger) (ctrl.Result, error)
================ Function to check secret update=============
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/controller-runtime@v0.8.3/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