Queue¶
Queue manages a single queue object on an existing IBM MQ queue manager —
a local queue (QLOCAL), an alias (QALIAS), or a remote-queue definition
(QREMOTE), selected by spec.type. The operator reconciles the
desired attributes through mqweb and reports drift via status conditions; it
does not create the queue manager itself.
- API group/version:
messaging.mkurator.dev/v1beta1(also served asv1alpha1via the conversion webhook — see Custom resources). - Short name:
mq(kubectl get mq). - Scope: namespaced;
spec.connectionRefresolves in the same namespace (ADR-0023).
Examples¶
A local queue with a couple of typed and free-form attributes:
apiVersion: messaging.mkurator.dev/v1beta1
kind: Queue
metadata:
name: orders
namespace: mkurator-system
spec:
connectionRef:
name: qm1
queueName: APP.ORDERS
type: local
maxDepth: 5000
description: Orders intake queue
An alias queue pointing at a base queue, and a remote-queue definition, are in
config/samples/
and
messaging_v1beta1_queue_remote.yaml.
Fields¶
API version: messaging.mkurator.dev/v1beta1 · Kind: Queue
.spec¶
| Field | Type | Required | Description |
|---|---|---|---|
adoptionPolicy |
enum(Adopt, AdoptIfMatching, FailIfExists) | no | AdoptionPolicy controls behaviour when the MQ object already exists on first reconcile. |
attributes |
map[string]string | no | Attributes map to MQSC parameters (lowercase keys in mqweb runCommandJSON). Drift-checked vs define-only keys: docs/ATTRIBUTE_RECONCILIATION.md. |
connectionRef |
object | yes | ConnectionRef names a QueueManagerConnection in the same namespace. |
connectionRef.name |
string | yes | — |
defPersistence |
enum(yes, no) | no | DefPersistence is the default message persistence for new messages (MQSC DEFPSIST). Mutually exclusive with attributes.defpsist; typed field takes precedence when folded into the attribute map for mqadmin. |
deletionPolicy |
enum(Delete, Orphan) | no | DeletionPolicy controls MQ cleanup when the CR is deleted. |
description |
string | no | Description is the queue description (MQSC DESCR). Mutually exclusive with attributes.descr; typed field takes precedence when folded into the attribute map for mqadmin. |
get |
enum(enabled, disabled) | no | Get controls whether applications may retrieve messages from the queue (MQSC GET). Mutually exclusive with attributes.get; typed field takes precedence when folded into the attribute map for mqadmin. |
maxDepth |
integer | no | MaxDepth is the maximum number of messages the queue can hold (MQSC MAXDEPTH). Mutually exclusive with attributes.maxdepth; typed field takes precedence when folded into the attribute map for mqadmin. |
put |
enum(enabled, disabled) | no | Put controls whether applications may put messages on the queue (MQSC PUT). Mutually exclusive with attributes.put; typed field takes precedence when folded into the attribute map for mqadmin. |
queueName |
string | yes | QueueName is the IBM MQ object name. |
remoteQueueManager |
string | no | RemoteQueueManager is the name of the remote queue manager (MQSC RQMNAME). Required for type remote when not set via attributes.rqmname (or attributes.remotemanager). Mutually exclusive with attributes.rqmname and attributes.remotemanager; typed field takes precedence when folded into the attribute map for mqadmin. |
suspend |
boolean | no | Suspend pauses MQ reconciliation for this object. Status shows Synced=False ReasonSuspended. |
targetQueue |
string | no | TargetQueue is the local or remote queue name an alias resolves to (MQSC TARGQ). Required for type alias when not set via attributes.targq (or attributes.target). Mutually exclusive with attributes.targq and attributes.target; typed field takes precedence when folded into the attribute map for mqadmin. |
type |
enum(local, alias, remote) | no | Type is the queue kind to define: local (QLOCAL), alias (QALIAS), or remote (QREMOTE). |
xmitQueue |
string | no | XmitQueue is the transmission queue used to reach the remote queue manager (MQSC XMITQ). Required for type remote when not set via attributes.xmitq (or attributes.transmissionqueue). Mutually exclusive with attributes.xmitq and attributes.transmissionqueue; typed field takes precedence when folded into the attribute map for mqadmin. |
.status¶
| Field | Type | Required | Description |
|---|---|---|---|
conditions |
[]object | no | Conditions represent the current state of the queue. |
desiredMQSC |
string | no | DesiredMQSC is a debug/GitOps aid: the DEFINE QLOCAL|QALIAS|QREMOTE REPLACE line equivalent to what the operator applies via mqweb. Not authoritative; do not use this field to drive cluster apply or drift detection. |
lastSyncTime |
string | no | LastSyncTime is set when the object last reconciled successfully. |
message |
string | no | Message is a short, user-facing summary of reconcile state (especially when Synced=False). |
mqObjectExists |
boolean | no | MQObjectExists is true when the IBM MQ object was last observed on the queue manager. |
observedGeneration |
integer | no | ObservedGeneration reflects the generation last successfully synced. |
MQSC mapping and drift¶
Typed fields fold into MQSC attributes; anything without a typed field can be
set through the free-form spec.attributes map. The operator
drift-checks the attributes it manages and re-applies on divergence. The full
per-attribute matrix — including which DISPLAY capabilities are probed at
runtime — lives in
ATTRIBUTE_RECONCILIATION.md.
spec.type |
MQ object | Notes |
|---|---|---|
local (default) |
QLOCAL |
maxDepth, defPersistence, get/put, description |
alias |
QALIAS |
targetQueue names the base object |
remote |
QREMOTE |
remoteQueueManager + optional xmitQueue |
Typed field and matching attributes key are mutually exclusive for the same
MQSC attribute; admission rejects setting both (ADR-0021,
ADR-0025).