v2alpha3activemqartemis

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: Apache-2.0 Imports: 48 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
	CreatedCredentialsSecret     = 1 << 6
	CreatedNettySecret           = 1 << 7

	Complete = CreatedHeadlessService |

		CreatedConsoleJolokiaService |
		CreatedMuxProtocolService |
		CreatedStatefulSet |
		CreatedPingService |
		CreatedRouteOrIngress |
		CreatedCredentialsSecret |
		CreatedNettySecret
)

Completion of CreatingK8sResources state

View Source
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"
)
View Source
const (
	ActiveMQArtemisFSMID = 0
)

Machine id

Variables

View Source
var CompactFullVersionFromMinorVersion map[string]string = map[string]string{
	"01": "010",
	"02": "020",
}
View Source
var FullVersionFromMinorVersion map[string]string = map[string]string{
	"01": "0.1.0",
	"02": "0.2.0",
}
View Source
var OperandVersionFromOperatorVersion map[string]string = map[string]string{
	"0.16.0": "0.1.0",
	"0.17.0": "0.2.0",
}

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 GetImage

func GetImage(imageURL string) (image, imageTag, imageContext string)

func GetPodStatus

func GetPodStatus(cr *brokerv2alpha3.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 *brokerv2alpha3.ActiveMQArtemis) []corev1.EnvVar

func MakeVolumes

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

func NewPersistentVolumeClaimArrayForCR

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

func NewPodTemplateSpecForCR

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

func UpdatePodStatus

func UpdatePodStatus(cr *brokerv2alpha3.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 *brokerv2alpha3.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)

func (*ActiveMQArtemisFSM) UpdateCustomResource added in v0.18.0

func (amqbfsm *ActiveMQArtemisFSM) UpdateCustomResource(newRc *brokerv2alpha3.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 *brokerv2alpha3.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32
	ProcessDeploymentPlan(customResource *brokerv2alpha3.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet, firstTime bool) uint32
	ProcessAcceptorsAndConnectors(customResource *brokerv2alpha3.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32
	ProcessConsole(customResource *brokerv2alpha3.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet)
	ProcessResources(customResource *brokerv2alpha3.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint8
	ProcessAddressSettings(customResource *brokerv2alpha3.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 *brokerv2alpha3.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32

func (*ActiveMQArtemisReconciler) ProcessAddressSettings added in v0.18.0

func (reconciler *ActiveMQArtemisReconciler) ProcessAddressSettings(customResource *brokerv2alpha3.ActiveMQArtemis, prevCustomResource *brokerv2alpha3.ActiveMQArtemis, client client.Client) bool

func (*ActiveMQArtemisReconciler) ProcessConsole

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

func (*ActiveMQArtemisReconciler) ProcessCredentials

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

func (*ActiveMQArtemisReconciler) ProcessDeploymentPlan

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

func (*ActiveMQArtemisReconciler) ProcessResources

func (reconciler *ActiveMQArtemisReconciler) ProcessResources(customResource *brokerv2alpha3.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)

Jump to

Keyboard shortcuts

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