v2alpha2activemqartemis

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreatingK8sResources   = "creating_k8s_resources"
	ConfiguringEnvironment = "configuring_broker_environment"
	CreatingContainer      = "creating_container"
	ContainerRunning       = "running"
	Scaling                = "scaling"
)

Names of states

View Source
const (
	NotCreatedID           = -1
	CreatingK8sResourcesID = 0
	//ConfiguringEnvironment = "configuring_broker_environment"
	//CreatingContainer      = "creating_container"
	ContainerRunningID          = 1
	ScalingID                   = 2
	NumActiveMQArtemisFSMStates = 3
)

IDs of states

View Source
const (
	None                   = 0
	CreatedHeadlessService = 1 << 0
	//CreatedPersistentVolumeClaim = 1 << 1
	CreatedStatefulSet               = 1 << 1
	CreatedConsoleJolokiaService     = 1 << 2
	CreatedMuxProtocolService        = 1 << 3
	CreatedPingService               = 1 << 4
	CreatedRouteOrIngress            = 1 << 5
	CreatedUserPasswordSecret        = 1 << 6
	CreatedClusterUserPasswordSecret = 1 << 7

	Complete = CreatedHeadlessService |

		CreatedConsoleJolokiaService |
		CreatedMuxProtocolService |
		CreatedStatefulSet |
		CreatedPingService |
		CreatedRouteOrIngress |
		CreatedUserPasswordSecret |
		CreatedClusterUserPasswordSecret
)

Completion of CreatingK8sResources state

View Source
const (
	// CurrentVersion product version supported
	CurrentVersion = "7.7.0"
	// LastMicroVersion product version supported
	LastMicroVersion = "7.6.0"
	// LastMinorVersion product version supported
	LastMinorVersion = "7.6.0"
)
View Source
const (
	ActiveMQArtemisFSMID = 0
)

Machine id

Variables

SupportedVersions - product versions this operator supports

Functions

func Add

func Add(mgr manager.Manager) error

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 *brokerv2alpha2.ActiveMQArtemis, client client.Client, namespacedName types.NamespacedName) olm.DeploymentStatus

func ID

func ID() int

func MajorMinorMicro

func MajorMinorMicro(productVersion string) (major, minor, micro string)

MajorMinorMicro ...

func MakeEnvVarArrayForCR

func MakeEnvVarArrayForCR(cr *brokerv2alpha2.ActiveMQArtemis) []corev1.EnvVar

func MakeVolumes

func MakeVolumes(cr *brokerv2alpha2.ActiveMQArtemis) []corev1.Volume

func NewPersistentVolumeClaimArrayForCR

func NewPersistentVolumeClaimArrayForCR(cr *brokerv2alpha2.ActiveMQArtemis, arrayLength int) *[]corev1.PersistentVolumeClaim

func NewPodTemplateSpecForCR

func NewPodTemplateSpecForCR(customResource *brokerv2alpha2.ActiveMQArtemis) corev1.PodTemplateSpec

func UpdatePodStatus

func UpdatePodStatus(cr *brokerv2alpha2.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 *brokerv2alpha2.ActiveMQArtemis, _namespacedName types.NamespacedName, r *ReconcileActiveMQArtemis) ActiveMQArtemisFSM

Need to deep-copy the instance?

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)

type ActiveMQArtemisIReconciler

type ActiveMQArtemisIReconciler interface {
	Process(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet, firstTime bool) uint32
	ProcessDeploymentPlan(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet, firstTime bool) uint32
	ProcessAcceptors(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet)
	ProcessConnectors(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet)
	ProcessConsole(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet)
}

type ActiveMQArtemisReconciler

type ActiveMQArtemisReconciler struct {
	// contains filtered or unexported fields
}

func (*ActiveMQArtemisReconciler) Process

func (reconciler *ActiveMQArtemisReconciler) Process(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet, firstTime bool, allObjects []resource.KubernetesResource) (uint32, uint8)

func (*ActiveMQArtemisReconciler) ProcessAcceptors

func (reconciler *ActiveMQArtemisReconciler) ProcessAcceptors(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32

func (*ActiveMQArtemisReconciler) ProcessConnectors

func (reconciler *ActiveMQArtemisReconciler) ProcessConnectors(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32

func (*ActiveMQArtemisReconciler) ProcessConsole

func (reconciler *ActiveMQArtemisReconciler) ProcessConsole(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32

func (*ActiveMQArtemisReconciler) ProcessDeploymentPlan

func (reconciler *ActiveMQArtemisReconciler) ProcessDeploymentPlan(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet, firstTime bool) uint32

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)

Jump to

Keyboard shortcuts

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