Skip to content

Channel

Channel manages a single channel object on an existing IBM MQ queue manager — a server-connection channel (SVRCONN), a sender channel (SDR), or a receiver channel (RCVR), 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, nor does it start or stop the channel.

  • API group/version: messaging.mkurator.dev/v1beta1 (also served as v1alpha1 via the conversion webhook — see Custom resources).
  • Short name: chl (kubectl get chl).
  • Scope: namespaced; spec.connectionRef resolves in the same namespace (ADR-0023).

Channel variants

spec.type MQ object Purpose Notes
svrconn (default) SVRCONN Inbound client connections connName/xmitQueue not valid
sdr SDR Outbound message channel to a remote queue manager requires connName and xmitQueue
rcvr RCVR Inbound message channel from a remote sender connName/xmitQueue not valid (IBM MQ rejects CONNAME on CHLTYPE(RCVR))

Examples

A server-connection channel with TLS and typed attributes:

apiVersion: messaging.mkurator.dev/v1beta1
kind: Channel
metadata:
  name: orders-app
  namespace: mkurator-system
spec:
  connectionRef:
    name: qm1
  channelName: ORDERS.APP
  type: svrconn
  description: Application server-connection channel
  maxMsgLength: 4194304
  transportType: tcp
  shareConv: 10
  mcaUser: appuser
  maxInstances: 100
  maxInstancesClient: 50
  sslCipherSpec: TLS_RSA_WITH_AES_128_CBC_SHA256
  sslClientAuth: required

A sender channel adds the outbound connection name and transmission queue:

apiVersion: messaging.mkurator.dev/v1beta1
kind: Channel
metadata:
  name: to-qm2
  namespace: mkurator-system
spec:
  connectionRef:
    name: qm1
  channelName: QM1.QM2
  type: sdr
  connName: qm2.example.com(1414)
  xmitQueue: QM2.XMIT

The svrconn sample is in config/samples/. A typed field and its matching attribute key are mutually exclusive for the same MQSC attribute (admission rejects setting both).

Fields

API version: messaging.mkurator.dev/v1beta1 · Kind: Channel

.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.
channelName string yes ChannelName is the IBM MQ channel name (e.g. ORDERS.APP).
connName string no ConnName is the remote connection name for sender channels (MQSC CONNAME), e.g. qm2.example.com(1414). Required for type sdr when not set via attributes.conname. Not valid on RCVR channels (IBM MQ rejects CONNAME on CHLTYPE(RCVR)). Mutually exclusive with attributes.conname; typed field takes precedence when folded into the attribute map for mqadmin.
connectionRef object yes ConnectionRef names a QueueManagerConnection in the same namespace.
connectionRef.name string yes
deletionPolicy enum(Delete, Orphan) no DeletionPolicy controls MQ cleanup when the CR is deleted.
description string no Description is the channel description (MQSC DESCR). Mutually exclusive with attributes.descr; typed field takes precedence when folded into the attribute map for mqadmin.
maxInstances integer no MaxInstances is the maximum number of simultaneous channel instances (MQSC MAXINST). Mutually exclusive with attributes.maxinst; typed field takes precedence when folded into the attribute map for mqadmin.
maxInstancesClient integer no MaxInstancesClient is the maximum number of client connections per channel instance (MQSC MAXINSTC). Mutually exclusive with attributes.maxinstc; typed field takes precedence when folded into the attribute map for mqadmin.
maxMsgLength integer no MaxMsgLength is the maximum message length in bytes (MQSC MAXMSGL). Mutually exclusive with attributes.maxmsgl; typed field takes precedence when folded into the attribute map for mqadmin.
mcaUser string no McaUser is the MCA user ID for authority checks on this channel (MQSC MCAUSER). Mutually exclusive with attributes.mcauser; typed field takes precedence when folded into the attribute map for mqadmin.
shareConv integer no ShareConv is the maximum number of conversations shared per TCP/IP connection (MQSC SHARECNV). 0 disables conversation sharing (legacy mode); 1 enables MQ V7+ features without sharing; 2+ allows up to that many shared conversations. Mutually exclusive with attributes.sharecnv; typed field takes precedence when folded into the attribute map for mqadmin.
sslCipherSpec string no SslCipherSpec is the TLS cipher specification for the channel (MQSC SSLCIPH). Use an empty string or omit to disable TLS on the channel. Mutually exclusive with attributes.sslciph; typed field takes precedence when folded into the attribute map for mqadmin.
sslClientAuth enum(required, optional, asqmgr) no SslClientAuth controls whether the remote party must present an X.509 client certificate during TLS handshake (MQSC SSLCAUTH). Only effective when sslCipherSpec is non-empty. Mutually exclusive with attributes.sslcauth; 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.
transportType enum(tcp, lu62) no TransportType is the channel transport protocol (MQSC TRPTYPE). Mutually exclusive with attributes.trptype; typed field takes precedence when folded into the attribute map for mqadmin.
type enum(svrconn, sdr, rcvr) no Type is the channel kind to define. svrconn, sdr, and rcvr are reconciled in v1beta1.
xmitQueue string no XmitQueue is the transmission queue used by a sender channel (MQSC XMITQ). Required for type sdr when not set via attributes.xmitq. Mutually exclusive with attributes.xmitq; 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 channel.
desiredMQSC string no DesiredMQSC is a debug/GitOps aid: the DEFINE CHANNEL 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.

Typed field MQSC attribute Notes
description DESCR (descr) Free-text channel description
maxMsgLength MAXMSGL (maxmsgl) Maximum message length in bytes
transportType TRPTYPE (trptype) tcp / lu62 transport protocol
shareConv SHARECNV (sharecnv) Shared conversations per TCP/IP connection (svrconn)
mcaUser MCAUSER (mcauser) MCA user ID for authority checks
maxInstances MAXINST (maxinst) Maximum simultaneous channel instances (svrconn)
maxInstancesClient MAXINSTC (maxinstc) Maximum client connections per instance (svrconn)
sslCipherSpec SSLCIPH (sslciph) TLS cipher spec; empty disables TLS
sslClientAuth SSLCAUTH (sslcauth) Require a client certificate (only with sslCipherSpec)
connName CONNAME (conname) Remote connection name — sdr only
xmitQueue XMITQ (xmitq) Transmission queue — sdr only

Drift keys are type-aware: sdr channels track conname/xmitq, while rcvr channels omit them (IBM MQ rejects CONNAME on CHLTYPE(RCVR)). Sender channels require connName and xmitQueue (or their conname/xmitq attribute equivalents); admission rejects an sdr channel missing either.

Typed field and matching attributes key are mutually exclusive for the same MQSC attribute; admission rejects setting both (ADR-0021, ADR-0025).

See also