# API Reference

# Packages

# apps.emqx.io/v1beta4

Package v1beta4 contains API Schema definitions for the apps v1beta4 API group

# Resource Types

# BootstrapAPIKey

Appears in:

FieldDescription
key string
secret string

# Condition

Condition saves the state information of the EMQX cluster

Appears in:

FieldDescription
type ConditionTypeStatus of cluster condition.
status ConditionStatus (opens new window)Status of the condition, one of True, False, Unknown.
lastUpdateTime Time (opens new window)The last time this condition was updated.
lastTransitionTime Time (opens new window)Last time the condition transitioned from one status to another.
reason stringThe reason for the condition's last transition.
message stringA human readable message indicating details about the transition.

# ConditionType

Underlying type: string

ConditionType defines the condition that the RF can have

Appears in:

# EmqxBlueGreenUpdate

Appears in:

FieldDescription
initialDelaySeconds integerNumber of seconds before evacuation connection start.
evacuationStrategy EvacuationStrategy

# EmqxBlueGreenUpdateStatus

Appears in:

FieldDescription
originStatefulSet string
currentStatefulSet string
startedAt Time (opens new window)
evacuationsStatus EmqxEvacuationStatus array

# EmqxBroker

EmqxBroker is the Schema for the emqxbrokers API

FieldDescription
apiVersion stringapps.emqx.io/v1beta4
kind stringEmqxBroker
metadata ObjectMeta (opens new window)Refer to Kubernetes API documentation for fields of metadata.
spec EmqxBrokerSpec
status EmqxBrokerStatus

# EmqxBrokerSpec

EmqxBrokerSpec defines the desired state of EmqxBroker

Appears in:

FieldDescription
replicas integer
persistent PersistentVolumeClaimTemplate (opens new window)Persistent describes the common attributes of storage devices
template EmqxTemplate
serviceTemplate ServiceTemplateServiceTemplate defines a logical set of ports and a policy by which to access them

# EmqxBrokerStatus

EmqxBrokerStatus defines the observed state of EmqxBroker

Appears in:

FieldDescription
conditions Condition arrayRepresents the latest available observations of a EMQX current state.
emqxNodes EmqxNode arrayNodes of the EMQX cluster
replicas integerreplicas is the number of Pods created by the EMQX Custom Resource controller.
readyReplicas integerreadyReplicas is the number of pods created for this EMQX Custom Resource with a EMQX Ready.
currentStatefulSetVersion string

# EmqxContainer

Appears in:

FieldDescription
image EmqxImageContainer image. The image is generated by "${Registry}/${Repository}:${Prefix}${Version}${Suffix}".
command string arrayEntrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
args string arrayArguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
workingDir stringContainer's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
ports ContainerPort (opens new window) arrayList of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated.
envFrom EnvFromSource (opens new window) arrayList of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.
env EnvVar (opens new window) arrayList of environment variables to set in the container. Cannot be updated.
resources ResourceRequirements (opens new window)Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
volumeMounts VolumeMount (opens new window) arrayPod volumes to mount into the container's filesystem. Cannot be updated.
volumeDevices VolumeDevice (opens new window) arrayvolumeDevices is the list of block devices to be used by the container.
livenessProbe Probe (opens new window)Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
readinessProbe Probe (opens new window)Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
startupProbe Probe (opens new window)StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
lifecycle Lifecycle (opens new window)Actions that the management system should take in response to container lifecycle events. Cannot be updated.
terminationMessagePath stringOptional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.
terminationMessagePolicy TerminationMessagePolicy (opens new window)Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
securityContext SecurityContext (opens new window)SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
stdin booleanWhether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.
stdinOnce booleanWhether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
tty booleanWhether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.
emqxConfig object (keys:string, values:string)
emqxACL string array
bootstrapAPIKeys BootstrapAPIKey arrayEMQX bootstrap user Cannot be updated.

# EmqxEnterprise

EmqxEnterprise is the Schema for the emqxenterprises API

FieldDescription
apiVersion stringapps.emqx.io/v1beta4
kind stringEmqxEnterprise
metadata ObjectMeta (opens new window)Refer to Kubernetes API documentation for fields of metadata.
spec EmqxEnterpriseSpec
status EmqxEnterpriseStatus

# EmqxEnterpriseSpec

EmqxEnterpriseSpec defines the desired state of EmqxEnterprise

Appears in:

FieldDescription
replicas integer
license EmqxLicense
persistent PersistentVolumeClaimTemplate (opens new window)Persistent describes the common attributes of storage devices
blueGreenUpdate EmqxBlueGreenUpdate
template EmqxTemplate
serviceTemplate ServiceTemplateServiceTemplate defines a logical set of ports and a policy by which to access them

# EmqxEnterpriseStatus

EmqxEnterpriseStatus defines the observed state of EmqxEnterprise

Appears in:

FieldDescription
conditions Condition arrayRepresents the latest available observations of a EMQX current state.
emqxNodes EmqxNode arrayNodes of the EMQX cluster
replicas integerreplicas is the number of Pods created by the EMQX Custom Resource controller.
readyReplicas integerreadyReplicas is the number of pods created for this EMQX Custom Resource with a EMQX Ready.
currentStatefulSetVersion string
blueGreenUpdateStatus EmqxBlueGreenUpdateStatus

# EmqxEvacuationStats

Appears in:

FieldDescription
initial_sessions integer
initial_connected integer
current_sessions integer
current_connected integer

# EmqxEvacuationStatus

Appears in:

FieldDescription
node string
stats EmqxEvacuationStats
state string
session_recipients string array
session_goal integer
session_eviction_rate integer
connection_goal integer
connection_eviction_rate integer

# EmqxImage

Appears in:

FieldDescription
registry stringContainer image registry
repository stringContainer image repository Defaults to "emqx/emqx" if kind is EmqxBroker, or "emqx/emqx-ee" if kind is EmqxEnterprise
version stringContainer image tag version, must semver format or "latest"
prefix stringContainer image tag prefix, like "v"
suffix stringContainer image tag suffix, like "-alpine"
pullPolicy PullPolicy (opens new window)Container image pull policy. One of Always, Never, IfNotPresent. Defaults to IfNotPresent. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images

# EmqxLicense

Appears in:

FieldDescription
data integer arrayData contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
stringData stringStringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values.
secretName stringSecretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret

# EmqxNode

Appears in:

FieldDescription
node stringEMQX node name
node_status stringEMQX node status
otp_release stringErlang/OTP version used by EMQX
version stringEMQX version
connections integerMQTT connection count

# EmqxPlugin

EmqxPlugin is the Schema for the emqxplugins API

FieldDescription
apiVersion stringapps.emqx.io/v1beta4
kind stringEmqxPlugin
metadata ObjectMeta (opens new window)Refer to Kubernetes API documentation for fields of metadata.
spec EmqxPluginSpec

# EmqxPluginSpec

EmqxPluginSpec defines the desired state of EmqxPlugin

Appears in:

FieldDescription
pluginName stringMore info: https://www.emqx.io/docs/en/v4.4/advanced/plugins.html#list-of-plugins
selector object (keys:string, values:string)Selector matches the labels of the EMQX
config object (keys:string, values:string)Config defines the configurations of the EMQX plugins

# EmqxTemplate

Appears in:

FieldDescription
metadata ObjectMeta (opens new window)Refer to Kubernetes API documentation for fields of metadata.
spec EmqxTemplateSpec

# EmqxTemplateSpec

Appears in:

FieldDescription
imagePullSecrets LocalObjectReference (opens new window) array
emqxContainer EmqxContainer
extraContainers Container (opens new window) array
initContainers Container (opens new window) array
ephemeralContainers EphemeralContainer (opens new window) array
volumes Volume (opens new window) array
podSecurityContext PodSecurityContext (opens new window)
nodeSelector object (keys:string, values:string)
nodeName string
affinity Affinity (opens new window)
tolerations Toleration (opens new window) array

# EvacuationStrategy

Appears in:

FieldDescription
waitTakeover integer
connEvictRate integer
sessEvictRate integer

# Rebalance

Rebalance is the Schema for the rebalances API

Appears in:

FieldDescription
apiVersion stringapps.emqx.io/v1beta4
kind stringRebalance
metadata ObjectMeta (opens new window)Refer to Kubernetes API documentation for fields of metadata.
spec RebalanceSpec
status RebalanceStatus

# RebalanceCondition

RebalanceCondition describes current state of a EMQX rebalancing job.

Appears in:

FieldDescription
type RebalanceConditionTypeStatus of rebalance condition type. one of Processing, Complete, Failed.
status ConditionStatus (opens new window)Status of the condition, one of True, False, Unknown.
lastUpdateTime Time (opens new window)The last time this condition was updated.
lastTransitionTime Time (opens new window)Last time the condition transitioned from one status to another.
reason stringThe reason for the condition's last transition.
message stringA human readable message indicating details about the transition.

# RebalanceConditionType

Underlying type: string

Appears in:

# RebalanceList

RebalanceList contains a list of Rebalance

FieldDescription
apiVersion stringapps.emqx.io/v1beta4
kind stringRebalanceList
metadata ListMeta (opens new window)Refer to Kubernetes API documentation for fields of metadata.
items Rebalance array

# RebalancePhase

Underlying type: string

Appears in:

# RebalanceSpec

RebalanceSpec represents the desired spec of Rebalance

Appears in:

FieldDescription
instanceName stringInstanceName represents the name of EmqxEnterprise CR
rebalanceStrategy RebalanceStrategyRebalanceStrategy represents the strategy of EMQX rebalancing More info: https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing

# RebalanceState

Rebalance defines the observed Rebalancing state of EMQX

Appears in:

FieldDescription
state stringState represents the state of emqx cluster rebalancing.
session_eviction_rate integerSessionEvictionRate represents the node session evacuation rate per second.
recipients string arrayRecipients represent the target node for rebalancing.
node stringNode represents the rebalancing scheduling node.
donors string arrayDonors represent the source nodes for rebalancing.
coordinator_node stringCoordinatorNode represents the node currently undergoing rebalancing.
connection_eviction_rate integerConnectionEvictionRate represents the node session evacuation rate per second.

# RebalanceStatus

RebalanceStatus represents the current state of Rebalance

Appears in:

FieldDescription
conditions RebalanceCondition arrayThe latest available observations of an object's current state. When Rebalance fails, the condition will have type "Failed" and status false. When Rebalance is in processing, the condition will have a type "Processing" and status true. When Rebalance is completed, the condition will have a type "Complete" and status true.
phase RebalancePhasePhase represents the phase of Rebalance.
rebalanceStates RebalanceState array
startedTime Time (opens new window)StartedTime Represents the time when rebalance job start.
completedTime Time (opens new window)CompletedTime Represents the time when the rebalance job was completed.

# RebalanceStrategy

RebalanceStrategy represents the strategy of EMQX rebalancing

Appears in:

FieldDescription
connEvictRate integerConnEvictRate represents the source node client disconnect rate per second. same to conn-evict-rate in EMQX Rebalancing (opens new window) The value must be greater than 0
sessEvictRate integerSessEvictRate represents the source node session evacuation rate per second. same to sess-evict-rate in EMQX Rebalancing (opens new window) The value must be greater than 0 Defaults to 500.
waitTakeover integerWaitTakeover represents the time in seconds to wait for a client to reconnect to take over the session after all connections are disconnected. same to wait-takeover in EMQX Rebalancing (opens new window) The value must be greater than 0 Defaults to 60 seconds.
waitHealthCheck integerWaitHealthCheck represents the time (in seconds) to wait for the LB to remove the source node from the list of active backend nodes. After the specified waiting time is exceeded,the rebalancing task will start. same to wait-health-check in EMQX Rebalancing (opens new window) The value must be greater than 0 Defaults to 60 seconds.
absConnThreshold integerAbsConnThreshold represents the absolute threshold for checking connection balance. same to abs-conn-threshold in EMQX Rebalancing (opens new window) The value must be greater than 0 Defaults to 1000.
relConnThreshold stringRelConnThreshold represents the relative threshold for checkin connection balance. same to rel-conn-threshold in EMQX Rebalancing (opens new window) the usage of float highly discouraged, as support for them varies across languages. So we define the RelConnThreshold field as string type and you not float type The value must be greater than "1.0" Defaults to "1.1".
absSessThreshold integerAbsSessThreshold represents the absolute threshold for checking session connection balance. same to abs-sess-threshold in EMQX Rebalancing (opens new window) The value must be greater than 0 Default to 1000.
relSessThreshold stringRelSessThreshold represents the relative threshold for checking session connection balance. same to rel-sess-threshold in EMQX Rebalancing (opens new window) the usage of float highly discouraged, as support for them varies across languages. So we define the RelSessThreshold field as string type and you not float type The value must be greater than "1.0" Defaults to "1.1".

# ServiceTemplate

Appears in:

FieldDescription
metadata ObjectMeta (opens new window)Refer to Kubernetes API documentation for fields of metadata.
spec ServiceSpec (opens new window)