v2alpha2activemqartemis

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 47 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 (
	// LatestVersion operand version supported
	LatestVersion        = "0.1.0"
	CompactLatestVersion = "010"
	// LastMicroVersion operand version supported
	LastMicroVersion = "0.1.0"
	// LastMinorVersion operand 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",
}
View Source
var FullVersionFromMinorVersion map[string]string = map[string]string{
	"01": "0.1.0",
}
View Source
var OperandVersionFromOperatorVersion map[string]string = map[string]string{
	"0.16.0": "0.1.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 added in v0.16.0

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

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
	ProcessAcceptorsAndConnectors(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32
	ProcessConsole(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet)
	ProcessUpgrade(customResource *brokerv2alpha2.ActiveMQArtemis, client client.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint8
}

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) ProcessAcceptorsAndConnectors added in v0.16.0

func (reconciler *ActiveMQArtemisReconciler) ProcessAcceptorsAndConnectors(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

func (*ActiveMQArtemisReconciler) ProcessUpgrade added in v0.16.0

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

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 NewReconcileActiveMQArtemis added in v0.18.0

func NewReconcileActiveMQArtemis(c client.Client, s *runtime.Scheme) ReconcileActiveMQArtemis

func (*ReconcileActiveMQArtemis) GetClient added in v0.18.0

func (r *ReconcileActiveMQArtemis) GetClient() client.Client

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