controllers

package
v0.0.0-...-d13e39c Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: UPL-1.0 Imports: 74 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBGAPI = 0x00000001 /* Debug NewcallApi */
	DBGCRT = 0x00000002 /* Debug pdb creation */
)
View Source
const (
	APEXInstallationPV    = "apex-installation-pv"
	APEXInstallationPVC   = "apex-installation-pvc"
	APEXInstallationMount = "/opt/oracle/apex"
)

Definitions of Standards

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

name of our custom finalizer

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"

Variables

View Source
var APEXInstallationExternal string = "false"
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 APEXInstallationVolumeDefine

func APEXInstallationVolumeDefine(ctx context.Context, ordssrvs *dbapi.OrdsSrvs) corev1.Volume

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 ContainerEnv

func ContainerEnv(lrest *dbapi.LREST) []corev1.EnvVar

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 GetRestrictedFields

func GetRestrictedFields() map[string]struct{}

GetRestrictedFields returns a set of field names that are restricted from being updated.

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 IsStaticProvisioningUsed

func IsStaticProvisioningUsed(ctx context.Context, c client.Client, storageClassName string) bool

func NewCallAPIAllPdbs

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

func NewCallAPISQL

func NewCallAPISQL(intr interface{}, ctx context.Context, req ctrl.Request, lrpdb *dbapi.LRPDB, url string, payload interface{}, 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 ParseSQLPayload

func ParseSQLPayload(payload *PLSQLPayLoad) string

func PodVolumes

func PodVolumes(lrest *dbapi.LREST) []corev1.Volume

func RestartListenerInDatabase

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

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

Restarting listners in database

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

func SearchElementInDbList

func SearchElementInDbList(element string, TheList []string) bool

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(ctx context.Context, 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/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

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

func (r *DbcsSystemReconciler) DeleteDataGuard(
	ctx context.Context,
	compartmentId string,
	log logr.Logger,
	dbClient database.DatabaseClient,
	dbcsInst *databasev4.DbcsSystem,
) error

func (*DbcsSystemReconciler) EnableDataGuard

func (r *DbcsSystemReconciler) EnableDataGuard(
	ctx context.Context,
	compartmentId string,
	log logr.Logger,
	dbClient database.DatabaseClient,
	dbcsSystem *databasev4.DbcsSystem,
	kubeClient client.Client,
	nwClient core.VirtualNetworkClient,
	wrClient workrequests.WorkRequestClient,
	databaseID string,
	dataGuardConfig *databasev4.DataGuardConfig,
) error

Enable Dataguard

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

func (r *LRESTReconciler) LrpdbCreation(ctx context.Context, req ctrl.Request, lrest *dbapi.LREST, dbinfo []interface{}, idx int) error

func (*LRESTReconciler) PdbAutoDiscover

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

func (*LRESTReconciler) SelectFromVpdbs

func (r *LRESTReconciler) SelectFromVpdbs(ctx context.Context, req ctrl.Request, lrest *dbapi.LREST) ([]interface{}, error)

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

func (r *LRPDBReconciler) AutoDiscoverActivation(ctx context.Context, req ctrl.Request, lrpdb *dbapi.LRPDB, active bool) 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) CloneLRPDB

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

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

  • CLONE PDB

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

func (*LRPDBReconciler) CloseLRPDB

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

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

  • CLOSE PDB

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

func (*LRPDBReconciler) CreateLRPDB

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

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

  • CREATE PDB

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

func (*LRPDBReconciler) DecryptWithPrivKey

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

func (*LRPDBReconciler) DeleteLRPDB

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

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

  • DELETE PDB - IMPERATIVE APPROAC

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

func (*LRPDBReconciler) DeleteLRPDBDeclarative

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

func (*LRPDBReconciler) GetConfigMap

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

func (*LRPDBReconciler) GetConfigMapCode

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

func (*LRPDBReconciler) GetOpenMode

func (r *LRPDBReconciler) GetOpenMode(rsp string, openmode *string) error

func (*LRPDBReconciler) GetPdbSize

func (r *LRPDBReconciler) GetPdbSize(ctx context.Context, req ctrl.Request, lrpdb *dbapi.LRPDB, pdbaname string) string

func (*LRPDBReconciler) GetPdbSize2

func (r *LRPDBReconciler) GetPdbSize2(rsp string, pdbsize *string) error

func (*LRPDBReconciler) GetRestricted

func (r *LRPDBReconciler) GetRestricted(rsp string, restrictmode *string) 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) MonitorLRPDB

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

func (*LRPDBReconciler) OpenLRPDB

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

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

  • OPEN PDB

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

func (*LRPDBReconciler) PlugLRPDB

func (r *LRPDBReconciler) PlugLRPDB(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)

*** RECONCILIATION LOOP ***

func (*LRPDBReconciler) SetupWithManager

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

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

  • SetupWithManager sets up the controller with the Manager

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

func (*LRPDBReconciler) UnplugLRPDB

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

func (*LRPDBReconciler) UpdateStatus

func (r *LRPDBReconciler) UpdateStatus(ctx context.Context, req ctrl.Request, lrpdb *databasev4.LRPDB)

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 OracleRestartReconciler

type OracleRestartReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
	Config *rest.Config

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

OracleRestartReconciler reconciles a OracleRestart object

func (*OracleRestartReconciler) GetOldSpec

GetOldSpec retrieves the old spec from annotations. Returns nil, nil if the annotation does not exist.

func (*OracleRestartReconciler) Reconcile

func (r *OracleRestartReconciler) 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 OracleRestart 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 (*OracleRestartReconciler) SetCurrentSpec

func (r *OracleRestartReconciler) SetCurrentSpec(ctx context.Context, oracleRestart *oraclerestartdb.OracleRestart, req ctrl.Request) error

SetCurrentSpec stores the current spec as an annotation with retry logic, updating only if the annotation value has changed.

func (*OracleRestartReconciler) SetupWithManager

func (r *OracleRestartReconciler) 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
	Log      logr.Logger
}

OrdsSrvsReconciler reconciles a OrdsSrvs object

func (*OrdsSrvsReconciler) APEXInstallationPVCDefine

func (r *OrdsSrvsReconciler) APEXInstallationPVCDefine(ctx context.Context, ordssrvs *dbapi.OrdsSrvs) *corev1.PersistentVolumeClaim

func (*OrdsSrvsReconciler) ApexInstallationPVCReconcile

func (r *OrdsSrvsReconciler) ApexInstallationPVCReconcile(ctx context.Context, ordssrvs *dbapi.OrdsSrvs) (err error)

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

  • APEX Installation PVC Reconcile ************************************************

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, ordssrvs *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, ordssrvs *dbapi.OrdsSrvs, kind string) (err error)

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

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

type PLSQLPayLoad

type PLSQLPayLoad struct {
	Values    map[string]string
	Sqltokens []string
}

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

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