Documentation ¶
Index ¶
- Constants
- Variables
- func Add(mgr manager.Manager) error
- func GetImage(imageURL string) (image, imageTag, imageContext string)
- func GetPodStatus(cr *brokerv2alpha4.ActiveMQArtemis, client client.Client, ...) olm.DeploymentStatus
- func ID() int
- func MajorMinorMicro(productVersion string) (major, minor, micro string)
- func MakeContainerPorts(cr *brokerv2alpha4.ActiveMQArtemis) []corev1.ContainerPort
- func MakeEnvVarArrayForCR(cr *brokerv2alpha4.ActiveMQArtemis) []corev1.EnvVar
- func MakeVolumeMounts(cr *brokerv2alpha4.ActiveMQArtemis) []corev1.VolumeMount
- func MakeVolumes(cr *brokerv2alpha4.ActiveMQArtemis) []corev1.Volume
- func NewPersistentVolumeClaimArrayForCR(cr *brokerv2alpha4.ActiveMQArtemis, arrayLength int) *[]corev1.PersistentVolumeClaim
- func NewPodTemplateSpecForCR(customResource *brokerv2alpha4.ActiveMQArtemis) corev1.PodTemplateSpec
- func NewStatefulSetForCR(cr *brokerv2alpha4.ActiveMQArtemis) *appsv1.StatefulSet
- func UpdatePodStatus(cr *brokerv2alpha4.ActiveMQArtemis, client client.Client, ...) error
- type ActiveMQArtemisFSM
- func (amqbfsm *ActiveMQArtemisFSM) Add(s *fsm.IState)
- func (amqbfsm *ActiveMQArtemisFSM) Enter(startStateID int) error
- func (amqbfsm *ActiveMQArtemisFSM) Exit() error
- func (amqbfsm *ActiveMQArtemisFSM) Remove(s *fsm.IState)
- func (amqbfsm *ActiveMQArtemisFSM) Update() (error, int)
- func (amqbfsm *ActiveMQArtemisFSM) UpdateCustomResource(newRc *brokerv2alpha4.ActiveMQArtemis)
- type ActiveMQArtemisIReconciler
- type ActiveMQArtemisReconciler
- func (reconciler *ActiveMQArtemisReconciler) Process(fsm *ActiveMQArtemisFSM, client client.Client, scheme *runtime.Scheme, ...) (uint32, uint8)
- func (reconciler *ActiveMQArtemisReconciler) ProcessAcceptorsAndConnectors(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, ...) uint32
- func (reconciler *ActiveMQArtemisReconciler) ProcessAddressSettings(customResource *brokerv2alpha4.ActiveMQArtemis, ...) bool
- func (reconciler *ActiveMQArtemisReconciler) ProcessConsole(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, ...) uint32
- func (reconciler *ActiveMQArtemisReconciler) ProcessCredentials(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, ...) uint32
- func (reconciler *ActiveMQArtemisReconciler) ProcessDeploymentPlan(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, ...) uint32
- func (reconciler *ActiveMQArtemisReconciler) ProcessResources(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, ...) uint8
- func (reconciler *ActiveMQArtemisReconciler) ProcessStatefulSet(fsm *ActiveMQArtemisFSM, client client.Client, log logr.Logger, firstTime bool) (*appsv1.StatefulSet, bool)
- type ContainerRunningState
- type CreatingK8sResourcesState
- type ReconcileActiveMQArtemis
- type ScalingState
Constants ¶
const ( CreatingK8sResources = "creating_k8s_resources" ConfiguringEnvironment = "configuring_broker_environment" CreatingContainer = "creating_container" ContainerRunning = "running" Scaling = "scaling" )
Names of states
const ( NotCreatedID = -1 CreatingK8sResourcesID = 0 //ConfiguringEnvironment = "configuring_broker_environment" //CreatingContainer = "creating_container" ContainerRunningID = 1 ScalingID = 2 NumActiveMQArtemisFSMStates = 3 )
IDs of states
const ( None = 0 CreatedHeadlessService = 1 << 0 //CreatedPersistentVolumeClaim = 1 << 1 CreatedStatefulSet = 1 << 1 CreatedConsoleJolokiaService = 1 << 2 CreatedMuxProtocolService = 1 << 3 CreatedPingService = 1 << 4 CreatedRouteOrIngress = 1 << 5 CreatedCredentialsSecret = 1 << 6 CreatedNettySecret = 1 << 7 Complete = CreatedHeadlessService | CreatedConsoleJolokiaService | CreatedMuxProtocolService | CreatedStatefulSet | CreatedPingService | CreatedRouteOrIngress | CreatedCredentialsSecret | CreatedNettySecret )
Completion of CreatingK8sResources state
const ( // LatestVersion product version supported LatestVersion = "0.2.0" CompactLatestVersion = "020" // LastMicroVersion product version supported LastMicroVersion = "0.2.0" // LastMinorVersion product version supported LastMinorVersion = "0.1.0" )
const (
ActiveMQArtemisFSMID = 0
)
Machine id
Variables ¶
var CompactFullVersionFromMinorVersion map[string]string = map[string]string{
"01": "010",
"02": "020",
}
var FullVersionFromMinorVersion map[string]string = map[string]string{
"01": "0.1.0",
"02": "0.2.0",
}
var OperandVersionFromOperatorVersion map[string]string = map[string]string{
"0.16.0": "0.1.0",
"0.17.0": "0.2.0",
"0.18.0": "0.2.0",
}
var SupportedVersions = []string{LatestVersion, LastMicroVersion, LastMinorVersion}
SupportedVersions - product versions this operator supports
Functions ¶
func Add ¶
Add creates a new ActiveMQArtemis Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func GetPodStatus ¶
func GetPodStatus(cr *brokerv2alpha4.ActiveMQArtemis, client client.Client, namespacedName types.NamespacedName) olm.DeploymentStatus
func MajorMinorMicro ¶
MajorMinorMicro ...
func MakeContainerPorts ¶
func MakeContainerPorts(cr *brokerv2alpha4.ActiveMQArtemis) []corev1.ContainerPort
func MakeEnvVarArrayForCR ¶
func MakeEnvVarArrayForCR(cr *brokerv2alpha4.ActiveMQArtemis) []corev1.EnvVar
func MakeVolumeMounts ¶
func MakeVolumeMounts(cr *brokerv2alpha4.ActiveMQArtemis) []corev1.VolumeMount
func MakeVolumes ¶
func MakeVolumes(cr *brokerv2alpha4.ActiveMQArtemis) []corev1.Volume
func NewPersistentVolumeClaimArrayForCR ¶
func NewPersistentVolumeClaimArrayForCR(cr *brokerv2alpha4.ActiveMQArtemis, arrayLength int) *[]corev1.PersistentVolumeClaim
func NewPodTemplateSpecForCR ¶
func NewPodTemplateSpecForCR(customResource *brokerv2alpha4.ActiveMQArtemis) corev1.PodTemplateSpec
func NewStatefulSetForCR ¶
func NewStatefulSetForCR(cr *brokerv2alpha4.ActiveMQArtemis) *appsv1.StatefulSet
func UpdatePodStatus ¶
func UpdatePodStatus(cr *brokerv2alpha4.ActiveMQArtemis, client client.Client, ssNamespacedName types.NamespacedName) error
TODO: Test namespacedName to ensure it's the right namespacedName
Types ¶
type ActiveMQArtemisFSM ¶
type ActiveMQArtemisFSM struct {
// contains filtered or unexported fields
}
func MakeActiveMQArtemisFSM ¶
func MakeActiveMQArtemisFSM(instance *brokerv2alpha4.ActiveMQArtemis, _namespacedName types.NamespacedName, r *ReconcileActiveMQArtemis) ActiveMQArtemisFSM
Need to deep-copy the instance?
func NewActiveMQArtemisFSM ¶
func NewActiveMQArtemisFSM(instance *brokerv2alpha4.ActiveMQArtemis, _namespacedName types.NamespacedName, r *ReconcileActiveMQArtemis) *ActiveMQArtemisFSM
func (*ActiveMQArtemisFSM) Add ¶
func (amqbfsm *ActiveMQArtemisFSM) Add(s *fsm.IState)
func (*ActiveMQArtemisFSM) Enter ¶
func (amqbfsm *ActiveMQArtemisFSM) Enter(startStateID int) error
func (*ActiveMQArtemisFSM) Exit ¶
func (amqbfsm *ActiveMQArtemisFSM) Exit() error
func (*ActiveMQArtemisFSM) Remove ¶
func (amqbfsm *ActiveMQArtemisFSM) Remove(s *fsm.IState)
func (*ActiveMQArtemisFSM) Update ¶
func (amqbfsm *ActiveMQArtemisFSM) Update() (error, int)
func (*ActiveMQArtemisFSM) UpdateCustomResource ¶
func (amqbfsm *ActiveMQArtemisFSM) UpdateCustomResource(newRc *brokerv2alpha4.ActiveMQArtemis)
type ActiveMQArtemisIReconciler ¶
type ActiveMQArtemisIReconciler interface { Process(fsm *ActiveMQArtemisFSM, client client.Client, scheme *runtime.Scheme, firstTime bool) uint32 ProcessStatefulSet(fsm *ActiveMQArtemisFSM, client client.Client, log logr.Logger, firstTime bool) (*appsv1.StatefulSet, bool) ProcessCredentials(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32 ProcessDeploymentPlan(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet, firstTime bool) uint32 ProcessAcceptorsAndConnectors(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32 ProcessConsole(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) ProcessResources(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint8 ProcessAddressSettings(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client) bool }
type ActiveMQArtemisReconciler ¶
type ActiveMQArtemisReconciler struct {
// contains filtered or unexported fields
}
func (*ActiveMQArtemisReconciler) Process ¶
func (reconciler *ActiveMQArtemisReconciler) Process(fsm *ActiveMQArtemisFSM, client client.Client, scheme *runtime.Scheme, firstTime bool) (uint32, uint8)
func (*ActiveMQArtemisReconciler) ProcessAcceptorsAndConnectors ¶
func (reconciler *ActiveMQArtemisReconciler) ProcessAcceptorsAndConnectors(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32
func (*ActiveMQArtemisReconciler) ProcessAddressSettings ¶
func (reconciler *ActiveMQArtemisReconciler) ProcessAddressSettings(customResource *brokerv2alpha4.ActiveMQArtemis, prevCustomResource *brokerv2alpha4.ActiveMQArtemis, client client.Client) bool
func (*ActiveMQArtemisReconciler) ProcessConsole ¶
func (reconciler *ActiveMQArtemisReconciler) ProcessConsole(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32
func (*ActiveMQArtemisReconciler) ProcessCredentials ¶
func (reconciler *ActiveMQArtemisReconciler) ProcessCredentials(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32
func (*ActiveMQArtemisReconciler) ProcessDeploymentPlan ¶
func (reconciler *ActiveMQArtemisReconciler) ProcessDeploymentPlan(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet, firstTime bool) uint32
func (*ActiveMQArtemisReconciler) ProcessResources ¶
func (reconciler *ActiveMQArtemisReconciler) ProcessResources(customResource *brokerv2alpha4.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint8
func (*ActiveMQArtemisReconciler) ProcessStatefulSet ¶
func (reconciler *ActiveMQArtemisReconciler) ProcessStatefulSet(fsm *ActiveMQArtemisFSM, client client.Client, log logr.Logger, firstTime bool) (*appsv1.StatefulSet, bool)
type ContainerRunningState ¶
type ContainerRunningState struct {
// contains filtered or unexported fields
}
This is the state we should be in whenever kubernetes resources are stable and only configuration is changing
func MakeContainerRunningState ¶
func MakeContainerRunningState(_parentFSM *ActiveMQArtemisFSM, _namespacedName types.NamespacedName) ContainerRunningState
func NewContainerRunningState ¶
func NewContainerRunningState(_parentFSM *ActiveMQArtemisFSM, _namespacedName types.NamespacedName) *ContainerRunningState
func (*ContainerRunningState) Enter ¶
func (rs *ContainerRunningState) Enter(previousStateID int) error
func (*ContainerRunningState) Exit ¶
func (rs *ContainerRunningState) Exit() error
func (*ContainerRunningState) ID ¶
func (rs *ContainerRunningState) ID() int
func (*ContainerRunningState) Update ¶
func (rs *ContainerRunningState) Update() (error, int)
type CreatingK8sResourcesState ¶
type CreatingK8sResourcesState struct {
// contains filtered or unexported fields
}
This is the state we should be in whenever something happens that requires a change to the kubernetes resources
func MakeCreatingK8sResourcesState ¶
func MakeCreatingK8sResourcesState(_parentFSM *ActiveMQArtemisFSM, _namespacedName types.NamespacedName) CreatingK8sResourcesState
func NewCreatingK8sResourcesState ¶
func NewCreatingK8sResourcesState(_parentFSM *ActiveMQArtemisFSM, _namespacedName types.NamespacedName) *CreatingK8sResourcesState
func (*CreatingK8sResourcesState) Enter ¶
func (rs *CreatingK8sResourcesState) Enter(previousStateID int) error
func (*CreatingK8sResourcesState) Exit ¶
func (rs *CreatingK8sResourcesState) Exit() error
func (*CreatingK8sResourcesState) ID ¶
func (rs *CreatingK8sResourcesState) ID() int
func (*CreatingK8sResourcesState) Update ¶
func (rs *CreatingK8sResourcesState) Update() (error, int)
type ReconcileActiveMQArtemis ¶
type ReconcileActiveMQArtemis struct {
// contains filtered or unexported fields
}
ReconcileActiveMQArtemis reconciles a ActiveMQArtemis object
func (*ReconcileActiveMQArtemis) Reconcile ¶
Reconcile reads that state of the cluster for a ActiveMQArtemis object and makes changes based on the state read and what is in the ActiveMQArtemis.Spec TODO(user): Modify this Reconcile function to implement your Controller logic. This example creates a Pod as an example Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
type ScalingState ¶
type ScalingState struct {
// contains filtered or unexported fields
}
func MakeScalingState ¶
func MakeScalingState(_parentFSM *ActiveMQArtemisFSM, _namespacedName types.NamespacedName) ScalingState
func (*ScalingState) Enter ¶
func (ss *ScalingState) Enter(previousStateID int) error
func (*ScalingState) Exit ¶
func (ss *ScalingState) Exit() error
func (*ScalingState) ID ¶
func (ss *ScalingState) ID() int
func (*ScalingState) Update ¶
func (ss *ScalingState) Update() (error, int)