controllers

package
v0.0.0-...-bb344e4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: UPL-1.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const CDBFinalizer = "database.oracle.com/CDBfinalizer"
View Source
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 EnableFlashbackInDatabase

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

func GetAllPdbInDatabase

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

Standby DB Setup

func GetDatabaseAdminPassword

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

func GetTotalDatabasePods

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

Primary DB Setup

func ParseTnsAlias

func ParseTnsAlias(tns *string, pdbsrv *string)

func RestartListenerInDatabase

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

func SetupInitParamsPrimaryForDG

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

func SetupTnsNamesForPDBListInDatabase

func SetupTnsNamesForPDBListInDatabase(r *SingleInstanceDatabaseReconciler, d *dbapi.SingleInstanceDatabase,
	dbReadyPod corev1.Pod, ctx context.Context, req ctrl.Request, pdbList []string) 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

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/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) 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

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

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

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/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

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 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 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/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) Reconcile

func (r *PDBReconciler) 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 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/controller-runtime@v0.9.2/pkg/reconcile

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 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

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

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

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

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

Jump to

Keyboard shortcuts

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