Documentation
¶
Index ¶
- Constants
- Variables
- func GetBrokerConfigHandler(brokerNamespacedName types.NamespacedName) (handler common.ActiveMQArtemisConfigHandler)
- func GetDefaultLabels(cr *brokerv1beta1.ActiveMQArtemis) map[string]string
- func GetPodStatus(cr *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, ...) olm.DeploymentStatus
- func GetQueueConfig(addressRes *brokerv1beta1.ActiveMQArtemisAddress) (string, bool, error)
- func GetStatefulSetNameForPod(client client.Client, pod *types.NamespacedName) (string, int, map[string]string)
- func HexShaHashOfMap(props []string) string
- func MajorMinorMicro(productVersion string) (major, minor, micro string)
- func MakeContainerPorts(cr *brokerv1beta1.ActiveMQArtemis) []corev1.ContainerPort
- func MakeEnvVarArrayForCR(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers) []corev1.EnvVar
- func MakeVolumeMounts(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers) []corev1.VolumeMount
- func MakeVolumes(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers) []corev1.Volume
- func NewPersistentVolumeClaimArrayForCR(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, arrayLength int) *[]corev1.PersistentVolumeClaim
- func ReleaseController(brokerCRName string)
- func UpdatePodStatus(cr *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, ...) error
- type ActiveMQArtemisAddressReconciler
- type ActiveMQArtemisIReconciler
- type ActiveMQArtemisQueueConfiguration
- type ActiveMQArtemisReconciler
- func (r *ActiveMQArtemisReconciler) AddBrokerConfigHandler(namespacedName types.NamespacedName, ...) error
- func (r *ActiveMQArtemisReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
- func (r *ActiveMQArtemisReconciler) RemoveBrokerConfigHandler(namespacedName types.NamespacedName)
- func (r *ActiveMQArtemisReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ActiveMQArtemisReconciler) UpdatePodForSecurity(securityHandlerNamespacedName types.NamespacedName, ...) error
- type ActiveMQArtemisReconcilerImpl
- func (reconciler *ActiveMQArtemisReconcilerImpl) CurrentDeployedResources(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client)
- func (reconciler *ActiveMQArtemisReconcilerImpl) ExposureDefinitionForCR(namespacedName types.NamespacedName, labels map[string]string, ...) rtclient.Object
- func (reconciler *ActiveMQArtemisReconcilerImpl) NewPodTemplateSpecForCR(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, ...) *corev1.PodTemplateSpec
- func (reconciler *ActiveMQArtemisReconcilerImpl) NewStatefulSetForCR(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, ...) *appsv1.StatefulSet
- func (reconciler *ActiveMQArtemisReconcilerImpl) Process(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, ...) bool
- func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessAcceptorsAndConnectors(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, ...)
- func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessConsole(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, ...)
- func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessCredentials(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, ...)
- func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessDeploymentPlan(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, ...)
- func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessResources(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, ...) error
- func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessStatefulSet(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, ...) *appsv1.StatefulSet
- type ActiveMQArtemisScaledownReconciler
- type ActiveMQArtemisSecurityConfigHandler
- func (r *ActiveMQArtemisSecurityConfigHandler) Config(initContainers []corev1.Container, outputDirRoot string, ...) (value []string)
- func (r *ActiveMQArtemisSecurityConfigHandler) GetDefaultLabels() map[string]string
- func (r *ActiveMQArtemisSecurityConfigHandler) IsApplicableFor(brokerNamespacedName types.NamespacedName) bool
- type ActiveMQArtemisSecurityReconciler
- type AddressDeployment
- type AddressObserver
- type AddressRetry
- type JkInfo
- type Namers
- type SSInfoData
- type StatefulSetInfo
- type ValueInfo
Constants ¶
const AnnotationDrainerPodTemplate = "statefulsets.kubernetes.io/drainer-pod-template"
const AnnotationStatefulSet = "statefulsets.kubernetes.io/drainer-pod-owner"
const (
TCPLivenessPort = 8161
)
Variables ¶
var StopCh chan struct{}
Functions ¶
func GetBrokerConfigHandler ¶
func GetBrokerConfigHandler(brokerNamespacedName types.NamespacedName) (handler common.ActiveMQArtemisConfigHandler)
func GetDefaultLabels ¶
func GetDefaultLabels(cr *brokerv1beta1.ActiveMQArtemis) map[string]string
func GetPodStatus ¶
func GetPodStatus(cr *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, namespacedName types.NamespacedName) olm.DeploymentStatus
func GetQueueConfig ¶
func GetQueueConfig(addressRes *brokerv1beta1.ActiveMQArtemisAddress) (string, bool, error)
convert QueueConfiguration to json string
func HexShaHashOfMap ¶
func MajorMinorMicro ¶
func MakeContainerPorts ¶
func MakeContainerPorts(cr *brokerv1beta1.ActiveMQArtemis) []corev1.ContainerPort
func MakeEnvVarArrayForCR ¶
func MakeEnvVarArrayForCR(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers) []corev1.EnvVar
func MakeVolumeMounts ¶
func MakeVolumeMounts(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers) []corev1.VolumeMount
func MakeVolumes ¶
func MakeVolumes(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers) []corev1.Volume
func NewPersistentVolumeClaimArrayForCR ¶
func NewPersistentVolumeClaimArrayForCR(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, arrayLength int) *[]corev1.PersistentVolumeClaim
func ReleaseController ¶
func ReleaseController(brokerCRName string)
func UpdatePodStatus ¶
func UpdatePodStatus(cr *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, namespacedName types.NamespacedName) error
Types ¶
type ActiveMQArtemisAddressReconciler ¶
ActiveMQArtemisAddressReconciler reconciles a ActiveMQArtemisAddress object
func (*ActiveMQArtemisAddressReconciler) Reconcile ¶
func (r *ActiveMQArtemisAddressReconciler) Reconcile(ctx context.Context, request 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 ActiveMQArtemisAddress 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.10.0/pkg/reconcile
func (*ActiveMQArtemisAddressReconciler) SetupWithManager ¶
func (r *ActiveMQArtemisAddressReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ActiveMQArtemisIReconciler ¶
type ActiveMQArtemisIReconciler interface { Process(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, scheme *runtime.Scheme, firstTime bool) uint32 ProcessStatefulSet(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, log logr.Logger, firstTime bool) (*appsv1.StatefulSet, bool) ProcessCredentials(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32 ProcessDeploymentPlan(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet, firstTime bool) uint32 ProcessAcceptorsAndConnectors(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint32 ProcessConsole(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) ProcessResources(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet) uint8 }
type ActiveMQArtemisQueueConfiguration ¶
type ActiveMQArtemisQueueConfiguration struct { Name *string `json:"name,omitempty"` Address *string `json:"address,omitempty"` RoutingType *string `json:"routing-type,omitempty"` FilterString *string `json:"filter-string,omitempty"` Durable *bool `json:"durable,omitempty"` User *string `json:"user,omitempty"` MaxConsumers *int32 `json:"max-consumers,omitempty"` Exclusive *bool `json:"exclusive,omitempty"` GroupRebalance *bool `json:"group-rebalance,omitempty"` GroupRebalancePauseDispatch *bool `json:"group-rebalance-pause-dispatch,omitempty"` GroupBuckets *int32 `json:"group-buckets,omitempty"` GroupFirstKey *string `json:"group-first-key,omitempty"` LastValue *bool `json:"last-value,omitempty"` LastValueKey *string `json:"last-value-key,omitempty"` NonDestructive *bool `json:"non-destructive,omitempty"` PurgeOnNoConsumers *bool `json:"purge-on-no-consumers,omitempty"` Enabled *bool `json:"enabled,omitempty"` ConsumersBeforeDispatch *int32 `json:"consumers-before-dispatch,omitempty"` DelayBeforeDispatch *int64 `json:"delay-before-dispatch,omitempty"` ConsumerPriority *int32 `json:"consumer-priority,omitempty"` AutoDelete *bool `json:"auto-delete,omitempty"` AutoDeleteDelay *int64 `json:"auto-delete-delay,omitempty"` AutoDeleteMessageCount *int64 `json:"auto-delete-message-count,omitempty"` RingSize *int64 `json:"ring-size,omitempty"` ConfigurationManaged *bool `json:"configuration-managed,omitempty"` Temporary *bool `json:"temporary,omitempty"` AutoCreateAddress *bool `json:"auto-create-address,omitempty"` Transient *bool `json:"transient,omitempty"` Internal *bool `json:"internal,omitempty"` Id *int64 `json:"id,omitempty"` }
type ActiveMQArtemisReconciler ¶
type ActiveMQArtemisReconciler struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
ActiveMQArtemisReconciler reconciles a ActiveMQArtemis object
func NewReconcileActiveMQArtemis ¶
func NewReconcileActiveMQArtemis(c client.Client, s *runtime.Scheme) ActiveMQArtemisReconciler
only test uses this
func (*ActiveMQArtemisReconciler) AddBrokerConfigHandler ¶
func (r *ActiveMQArtemisReconciler) AddBrokerConfigHandler(namespacedName types.NamespacedName, handler common.ActiveMQArtemisConfigHandler, toReconcile bool) error
func (*ActiveMQArtemisReconciler) Reconcile ¶
func (r *ActiveMQArtemisReconciler) Reconcile(ctx context.Context, request 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 ActiveMQArtemis 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.10.0/pkg/reconcile
func (*ActiveMQArtemisReconciler) RemoveBrokerConfigHandler ¶
func (r *ActiveMQArtemisReconciler) RemoveBrokerConfigHandler(namespacedName types.NamespacedName)
func (*ActiveMQArtemisReconciler) SetupWithManager ¶
func (r *ActiveMQArtemisReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*ActiveMQArtemisReconciler) UpdatePodForSecurity ¶
func (r *ActiveMQArtemisReconciler) UpdatePodForSecurity(securityHandlerNamespacedName types.NamespacedName, handler common.ActiveMQArtemisConfigHandler) error
type ActiveMQArtemisReconcilerImpl ¶
type ActiveMQArtemisReconcilerImpl struct {
// contains filtered or unexported fields
}
func (*ActiveMQArtemisReconcilerImpl) CurrentDeployedResources ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) CurrentDeployedResources(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client)
func (*ActiveMQArtemisReconcilerImpl) ExposureDefinitionForCR ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) ExposureDefinitionForCR(namespacedName types.NamespacedName, labels map[string]string, targetServiceName string, targetPortName string, passthroughTLS bool) rtclient.Object
func (*ActiveMQArtemisReconcilerImpl) NewPodTemplateSpecForCR ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) NewPodTemplateSpecForCR(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, current *corev1.PodTemplateSpec) *corev1.PodTemplateSpec
func (*ActiveMQArtemisReconcilerImpl) NewStatefulSetForCR ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) NewStatefulSetForCR(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, currentStateFullSet *appsv1.StatefulSet) *appsv1.StatefulSet
func (*ActiveMQArtemisReconcilerImpl) Process ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) Process(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, client rtclient.Client, scheme *runtime.Scheme) bool
func (*ActiveMQArtemisReconcilerImpl) ProcessAcceptorsAndConnectors ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessAcceptorsAndConnectors(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, client rtclient.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet)
func (*ActiveMQArtemisReconcilerImpl) ProcessConsole ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessConsole(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, client rtclient.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet)
func (*ActiveMQArtemisReconcilerImpl) ProcessCredentials ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessCredentials(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, client rtclient.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet)
func (*ActiveMQArtemisReconcilerImpl) ProcessDeploymentPlan ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessDeploymentPlan(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, client rtclient.Client, scheme *runtime.Scheme, currentStatefulSet *appsv1.StatefulSet)
func (*ActiveMQArtemisReconcilerImpl) ProcessResources ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessResources(customResource *brokerv1beta1.ActiveMQArtemis, client rtclient.Client, scheme *runtime.Scheme) error
func (*ActiveMQArtemisReconcilerImpl) ProcessStatefulSet ¶
func (reconciler *ActiveMQArtemisReconcilerImpl) ProcessStatefulSet(customResource *brokerv1beta1.ActiveMQArtemis, namer Namers, client rtclient.Client, log logr.Logger) *appsv1.StatefulSet
type ActiveMQArtemisScaledownReconciler ¶
type ActiveMQArtemisScaledownReconciler struct { client.Client Scheme *runtime.Scheme Config *rest.Config }
ActiveMQArtemisScaledownReconciler reconciles a ActiveMQArtemisScaledown object
func (*ActiveMQArtemisScaledownReconciler) Reconcile ¶
func (r *ActiveMQArtemisScaledownReconciler) Reconcile(ctx context.Context, request 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 ActiveMQArtemisScaledown 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.10.0/pkg/reconcile
func (*ActiveMQArtemisScaledownReconciler) SetupWithManager ¶
func (r *ActiveMQArtemisScaledownReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ActiveMQArtemisSecurityConfigHandler ¶
type ActiveMQArtemisSecurityConfigHandler struct { SecurityCR *brokerv1beta1.ActiveMQArtemisSecurity NamespacedName types.NamespacedName // contains filtered or unexported fields }
func (*ActiveMQArtemisSecurityConfigHandler) GetDefaultLabels ¶
func (r *ActiveMQArtemisSecurityConfigHandler) GetDefaultLabels() map[string]string
func (*ActiveMQArtemisSecurityConfigHandler) IsApplicableFor ¶
func (r *ActiveMQArtemisSecurityConfigHandler) IsApplicableFor(brokerNamespacedName types.NamespacedName) bool
type ActiveMQArtemisSecurityReconciler ¶
type ActiveMQArtemisSecurityReconciler struct { client.Client Scheme *runtime.Scheme BrokerReconciler *ActiveMQArtemisReconciler }
ActiveMQArtemisSecurityReconciler reconciles a ActiveMQArtemisSecurity object
func (*ActiveMQArtemisSecurityReconciler) Reconcile ¶
func (r *ActiveMQArtemisSecurityReconciler) Reconcile(ctx context.Context, request 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 ActiveMQArtemisSecurity 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.10.0/pkg/reconcile
func (*ActiveMQArtemisSecurityReconciler) SetupWithManager ¶
func (r *ActiveMQArtemisSecurityReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type AddressDeployment ¶
type AddressDeployment struct { AddressResource brokerv1beta1.ActiveMQArtemisAddress //a 0-len array means all statefulsets SsTargetNameBuilders []SSInfoData }
type AddressObserver ¶
type AddressObserver struct {
// contains filtered or unexported fields
}
func NewAddressObserver ¶
func NewAddressObserver( kubeclientset kubernetes.Interface, client client.Client, scheme *runtime.Scheme) *AddressObserver
func (*AddressObserver) Run ¶
func (c *AddressObserver) Run(C chan types.NamespacedName) error
type AddressRetry ¶
type AddressRetry struct {
// contains filtered or unexported fields
}
type Namers ¶
type Namers struct { SsGlobalName string SsNameBuilder namer.NamerData SvcHeadlessNameBuilder namer.NamerData SvcPingNameBuilder namer.NamerData PodsNameBuilder namer.NamerData SecretsCredentialsNameBuilder namer.NamerData SecretsConsoleNameBuilder namer.NamerData SecretsNettyNameBuilder namer.NamerData LabelBuilder selectors.LabelerData GLOBAL_DATA_PATH string }
func MakeNamers ¶
func MakeNamers(customResource *brokerv1beta1.ActiveMQArtemis) *Namers
type StatefulSetInfo ¶
type StatefulSetInfo struct { NamespacedName types.NamespacedName Labels map[string]string }
func GetDeployedStatefuleSetNames ¶
func GetDeployedStatefuleSetNames(client client.Client, targetCrNames []types.NamespacedName) []StatefulSetInfo
get the statefulset names