MaxScale
k8s.mariadb.com / v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: MaxScale
metadata:
name: example
apiVersion
string
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kind
string
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata
object
spec object
MaxScaleSpec defines the desired state of MaxScale.
admin object
Admin configures the admin REST API and GUI.
guiEnabled
boolean
GuiEnabled indicates whether the admin GUI should be enabled.
port
integer
Port where the admin REST API and GUI will be exposed.
format:
int32affinity object
Affinity to be used in the Pod.
antiAffinityEnabled
boolean
AntiAffinityEnabled configures PodAntiAffinity so each Pod is scheduled in a different Node, enabling HA.
Make sure you have at least as many Nodes available as the replicas to not end up with unscheduled Pods.
nodeAffinity object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#nodeaffinity-v1-core
preferredDuringSchedulingIgnoredDuringExecution []object
preference object required
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#nodeselectorterm-v1-core
matchExpressions []object
key
string required
operator
string required
A node selector operator is the set of operators that can be used in
a node selector requirement.
values
[]string
matchFields []object
key
string required
operator
string required
A node selector operator is the set of operators that can be used in
a node selector requirement.
values
[]string
weight
integer required
format:
int32requiredDuringSchedulingIgnoredDuringExecution object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#nodeselector-v1-core
nodeSelectorTerms []object required
matchExpressions []object
key
string required
operator
string required
A node selector operator is the set of operators that can be used in
a node selector requirement.
values
[]string
matchFields []object
key
string required
operator
string required
A node selector operator is the set of operators that can be used in
a node selector requirement.
values
[]string
podAntiAffinity object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podantiaffinity-v1-core.
preferredDuringSchedulingIgnoredDuringExecution []object
podAffinityTerm object required
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podaffinityterm-v1-core.
labelSelector object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#labelselector-v1-meta
matchExpressions []object
key
string required
operator
string required
A label selector operator is the set of operators that can be used in a selector requirement.
values
[]string
matchLabels
object
topologyKey
string required
weight
integer required
format:
int32requiredDuringSchedulingIgnoredDuringExecution []object
labelSelector object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#labelselector-v1-meta
matchExpressions []object
key
string required
operator
string required
A label selector operator is the set of operators that can be used in a selector requirement.
values
[]string
matchLabels
object
topologyKey
string required
args
[]string
Args to be used in the Container.
auth object
Auth defines the credentials required for MaxScale to connect to MariaDB.
adminPasswordSecretKeyRef object
AdminPasswordSecretKeyRef is Secret key reference to the admin password to call the admin REST API. It is defaulted if not provided.
generate
boolean
Generate indicates whether the Secret should be generated if the Secret referenced is not present.
key
string required
name
string
adminUsername
string
AdminUsername is an admin username to call the admin REST API. It is defaulted if not provided.
clientMaxConnections
integer
ClientMaxConnections defines the maximum number of connections that the client can establish.
If HA is enabled, make sure to increase this value, as more MaxScale replicas implies more connections.
It defaults to 30 times the number of MaxScale replicas.
format:
int32clientPasswordSecretKeyRef object
ClientPasswordSecretKeyRef is Secret key reference to the password to connect to MaxScale. It is defaulted if not provided.
If the referred Secret is labeled with "k8s.mariadb.com/watch", updates may be performed to the Secret in order to update the password.
generate
boolean
Generate indicates whether the Secret should be generated if the Secret referenced is not present.
key
string required
name
string
clientUsername
string
ClientUsername is the user to connect to MaxScale. It is defaulted if not provided.
deleteDefaultAdmin
boolean
DeleteDefaultAdmin determines whether the default admin user should be deleted after the initial configuration. If not provided, it defaults to true.
generate
boolean
Generate defies whether the operator should generate users and grants for MaxScale to work.
It only supports MariaDBs specified via spec.mariaDbRef.
metricsPasswordSecretKeyRef object
MetricsPasswordSecretKeyRef is Secret key reference to the metrics password to call the admib REST API. It is defaulted if metrics are enabled.
If the referred Secret is labeled with "k8s.mariadb.com/watch", updates may be performed to the Secret in order to update the password.
generate
boolean
Generate indicates whether the Secret should be generated if the Secret referenced is not present.
key
string required
name
string
metricsUsername
string
MetricsUsername is an metrics username to call the REST API. It is defaulted if metrics are enabled.
monitorMaxConnections
integer
MonitorMaxConnections defines the maximum number of connections that the monitor can establish.
If HA is enabled, make sure to increase this value, as more MaxScale replicas implies more connections.
It defaults to 30 times the number of MaxScale replicas.
format:
int32monitorPasswordSecretKeyRef object
MonitorPasswordSecretKeyRef is Secret key reference to the password used by MaxScale monitor to connect to MariaDB server. It is defaulted if not provided.
If the referred Secret is labeled with "k8s.mariadb.com/watch", updates may be performed to the Secret in order to update the password.
generate
boolean
Generate indicates whether the Secret should be generated if the Secret referenced is not present.
key
string required
name
string
monitorUsername
string
MonitorUsername is the user used by MaxScale monitor to connect to MariaDB server. It is defaulted if not provided.
serverMaxConnections
integer
ServerMaxConnections defines the maximum number of connections that the server can establish.
If HA is enabled, make sure to increase this value, as more MaxScale replicas implies more connections.
It defaults to 30 times the number of MaxScale replicas.
format:
int32serverPasswordSecretKeyRef object
ServerPasswordSecretKeyRef is Secret key reference to the password used by MaxScale to connect to MariaDB server. It is defaulted if not provided.
If the referred Secret is labeled with "k8s.mariadb.com/watch", updates may be performed to the Secret in order to update the password.
generate
boolean
Generate indicates whether the Secret should be generated if the Secret referenced is not present.
key
string required
name
string
serverUsername
string
ServerUsername is the user used by MaxScale to connect to MariaDB server. It is defaulted if not provided.
syncMaxConnections
integer
SyncMaxConnections defines the maximum number of connections that the sync can establish.
If HA is enabled, make sure to increase this value, as more MaxScale replicas implies more connections.
It defaults to 30 times the number of MaxScale replicas.
format:
int32syncPasswordSecretKeyRef object
SyncPasswordSecretKeyRef is Secret key reference to the password used by MaxScale config to connect to MariaDB server. It is defaulted when HA is enabled.
If the referred Secret is labeled with "k8s.mariadb.com/watch", updates may be performed to the Secret in order to update the password.
generate
boolean
Generate indicates whether the Secret should be generated if the Secret referenced is not present.
key
string required
name
string
syncUsername
string
MonitoSyncUsernamerUsername is the user used by MaxScale config sync to connect to MariaDB server. It is defaulted when HA is enabled.
command
[]string
Command to be used in the Container.
config object
Config defines the MaxScale configuration.
params
object
Params is a key value pair of parameters to be used in the MaxScale static configuration file.
Any parameter supported by MaxScale may be specified here. See reference:
https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-maxscale-configuration-guide/#global-settings.
sync object
Sync defines how to replicate configuration across MaxScale replicas. It is defaulted when HA is enabled.
database
string
Database is the MariaDB logical database where the 'maxscale_config' table will be created in order to persist and synchronize config changes. If not provided, it defaults to 'mysql'.
interval
string
Interval defines the config synchronization interval. It is defaulted if not provided.
timeout
string
Interval defines the config synchronization timeout. It is defaulted if not provided.
volumeClaimTemplate object
VolumeClaimTemplate provides a template to define the PVCs for storing MaxScale runtime configuration files. It is defaulted if not provided.
accessModes
[]string
metadata object
Metadata to be added to the PVC metadata.
annotations
object
Annotations to be added to children resources.
labels
object
Labels to be added to children resources.
resources object
VolumeResourceRequirements describes the storage resource requirements for a volume.
limits
object
Limits describes the maximum amount of compute resources allowed.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
requests
object
Requests describes the minimum amount of compute resources required.
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
otherwise to an implementation-defined value. Requests cannot exceed Limits.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
selector object
A label selector is a label query over a set of resources. The result of matchLabels and
matchExpressions are ANDed. An empty label selector matches all objects. A null
label selector matches no objects.
matchExpressions []object
matchExpressions is a list of label selector requirements. The requirements are ANDed.
key
string required
key is the label key that the selector applies to.
operator
string required
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
values
[]string
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
matchLabels
object
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
storageClassName
string
connection object
Connection provides a template to define the Connection for MaxScale.
healthCheck object
HealthCheck to be used in the Connection.
interval
string
Interval used to perform health checks.
retryInterval
string
RetryInterval is the interval used to perform health check retries.
params
object
Params to be used in the Connection.
port
integer
Port to connect to. If not provided, it defaults to the MariaDB port or to the first MaxScale listener.
format:
int32
secretName
string
SecretName to be used in the Connection.
secretTemplate object
SecretTemplate to be used in the Connection.
databaseKey
string
DatabaseKey to be used in the Secret.
format
string
Format to be used in the Secret.
hostKey
string
HostKey to be used in the Secret.
key
string
Key to be used in the Secret.
metadata object
Metadata to be added to the Secret object.
annotations
object
Annotations to be added to children resources.
labels
object
Labels to be added to children resources.
passwordKey
string
PasswordKey to be used in the Secret.
portKey
string
PortKey to be used in the Secret.
usernameKey
string
UsernameKey to be used in the Secret.
serviceName
string
ServiceName to be used in the Connection.
env []object
Env represents the environment variables to be injected in a container.
name
string required
Name of the environment variable. Must be a C_IDENTIFIER.
value
string
valueFrom object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#envvarsource-v1-core.
configMapKeyRef object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#configmapkeyselector-v1-core.
key
string required
name
string
fieldRef object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#objectfieldselector-v1-core.
apiVersion
string
fieldPath
string required
secretKeyRef object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#secretkeyselector-v1-core.
key
string required
name
string
envFrom []object
EnvFrom represents the references (via ConfigMap and Secrets) to environment variables to be injected in the container.
configMapRef object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#localobjectreference-v1-core.
name
string
prefix
string
secretRef object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#localobjectreference-v1-core.
name
string
guiKubernetesService object
GuiKubernetesService defines a template for a Kubernetes Service object to connect to MaxScale's GUI.
allocateLoadBalancerNodePorts
boolean
AllocateLoadBalancerNodePorts Service field.
externalTrafficPolicy
string
ExternalTrafficPolicy Service field.
loadBalancerIP
string
LoadBalancerIP Service field.
loadBalancerSourceRanges
[]string
LoadBalancerSourceRanges Service field.
metadata object
Metadata to be added to the Service metadata.
annotations
object
Annotations to be added to children resources.
labels
object
Labels to be added to children resources.
sessionAffinity
string
SessionAffinity Service field.
type
string
Type is the Service type. One of `ClusterIP`, `NodePort` or `LoadBalancer`. If not defined, it defaults to `ClusterIP`.
enum:
ClusterIP, NodePort, LoadBalancer
image
string
Image name to be used by the MaxScale instances. The supported format is `<image>:<tag>`.
Only MaxScale official images are supported.
imagePullPolicy
string
ImagePullPolicy is the image pull policy. One of `Always`, `Never` or `IfNotPresent`. If not defined, it defaults to `IfNotPresent`.
enum:
Always, Never, IfNotPresentimagePullSecrets []object
ImagePullSecrets is the list of pull Secrets to be used to pull the image.
name
string
inheritMetadata object
InheritMetadata defines the metadata to be inherited by children resources.
annotations
object
Annotations to be added to children resources.
labels
object
Labels to be added to children resources.
kubernetesService object
KubernetesService defines a template for a Kubernetes Service object to connect to MaxScale.
allocateLoadBalancerNodePorts
boolean
AllocateLoadBalancerNodePorts Service field.
externalTrafficPolicy
string
ExternalTrafficPolicy Service field.
loadBalancerIP
string
LoadBalancerIP Service field.
loadBalancerSourceRanges
[]string
LoadBalancerSourceRanges Service field.
metadata object
Metadata to be added to the Service metadata.
annotations
object
Annotations to be added to children resources.
labels
object
Labels to be added to children resources.
sessionAffinity
string
SessionAffinity Service field.
type
string
Type is the Service type. One of `ClusterIP`, `NodePort` or `LoadBalancer`. If not defined, it defaults to `ClusterIP`.
enum:
ClusterIP, NodePort, LoadBalancerlivenessProbe object
LivenessProbe to be used in the Container.
exec object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#execaction-v1-core.
command
[]string
failureThreshold
integer
format:
int32httpGet object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#httpgetaction-v1-core.
host
string
path
string
port
string | integer required
scheme
string
URIScheme identifies the scheme used for connection to a host for Get actions
initialDelaySeconds
integer
format:
int32
periodSeconds
integer
format:
int32
successThreshold
integer
format:
int32tcpSocket object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#tcpsocketaction-v1-core.
host
string
port
string | integer required
timeoutSeconds
integer
format:
int32mariaDbRef object
MariaDBRef is a reference to the MariaDB that MaxScale points to. It is used to initialize the servers field.
name
string
namespace
string
waitForIt
boolean
WaitForIt indicates whether the controller using this reference should wait for MariaDB to be ready.
metrics object
Metrics configures metrics and how to scrape them.
enabled
boolean
Enabled is a flag to enable Metrics
exporter object
Exporter defines the metrics exporter container.
affinity object
Affinity to be used in the Pod.
antiAffinityEnabled
boolean
AntiAffinityEnabled configures PodAntiAffinity so each Pod is scheduled in a different Node, enabling HA.
Make sure you have at least as many Nodes available as the replicas to not end up with unscheduled Pods.
nodeAffinity object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#nodeaffinity-v1-core
preferredDuringSchedulingIgnoredDuringExecution []object
preference object required
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#nodeselectorterm-v1-core
matchExpressions []object
key
string required
operator
string required
A node selector operator is the set of operators that can be used in
a node selector requirement.
values
[]string
matchFields []object
key
string required
operator
string required
A node selector operator is the set of operators that can be used in
a node selector requirement.
values
[]string
weight
integer required
format:
int32requiredDuringSchedulingIgnoredDuringExecution object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#nodeselector-v1-core
nodeSelectorTerms []object required
matchExpressions []object
key
string required
operator
string required
A node selector operator is the set of operators that can be used in
a node selector requirement.
values
[]string
matchFields []object
key
string required
operator
string required
A node selector operator is the set of operators that can be used in
a node selector requirement.
values
[]string
podAntiAffinity object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podantiaffinity-v1-core.
preferredDuringSchedulingIgnoredDuringExecution []object
podAffinityTerm object required
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podaffinityterm-v1-core.
labelSelector object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#labelselector-v1-meta
matchExpressions []object
key
string required
operator
string required
A label selector operator is the set of operators that can be used in a selector requirement.
values
[]string
matchLabels
object
topologyKey
string required
weight
integer required
format:
int32requiredDuringSchedulingIgnoredDuringExecution []object
labelSelector object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#labelselector-v1-meta
matchExpressions []object
key
string required
operator
string required
A label selector operator is the set of operators that can be used in a selector requirement.
values
[]string
matchLabels
object
topologyKey
string required
args
[]string
Args to be used in the Container.
image
string
Image name to be used as metrics exporter. The supported format is `<image>:<tag>`.
Only mysqld-exporter >= v0.15.0 is supported: https://github.com/prometheus/mysqld_exporter
imagePullPolicy
string
ImagePullPolicy is the image pull policy. One of `Always`, `Never` or `IfNotPresent`. If not defined, it defaults to `IfNotPresent`.
enum:
Always, Never, IfNotPresentimagePullSecrets []object
ImagePullSecrets is the list of pull Secrets to be used to pull the image.
name
string
nodeSelector
object
NodeSelector to be used in the Pod.
podMetadata object
PodMetadata defines extra metadata for the Pod.
annotations
object
Annotations to be added to children resources.
labels
object
Labels to be added to children resources.
podSecurityContext object
SecurityContext holds pod-level security attributes and common container settings.
appArmorProfile object
AppArmorProfile defines a pod or container's AppArmor settings.
localhostProfile
string
localhostProfile indicates a profile loaded on the node that should be used.
The profile must be preconfigured on the node to work.
Must match the loaded name of the profile.
Must be set if and only if type is "Localhost".
type
string required
type indicates which kind of AppArmor profile will be applied.
Valid options are:
Localhost - a profile pre-loaded on the node.
RuntimeDefault - the container runtime's default profile.
Unconfined - no AppArmor enforcement.
fsGroup
integer
format:
int64
fsGroupChangePolicy
string
PodFSGroupChangePolicy holds policies that will be used for applying fsGroup to a volume
when volume is mounted.
runAsGroup
integer
format:
int64
runAsNonRoot
boolean
runAsUser
integer
format:
int64seLinuxOptions object
SELinuxOptions are the labels to be applied to the container
level
string
Level is SELinux level label that applies to the container.
role
string
Role is a SELinux role label that applies to the container.
type
string
Type is a SELinux type label that applies to the container.
user
string
User is a SELinux user label that applies to the container.
seccompProfile object
SeccompProfile defines a pod/container's seccomp profile settings.
Only one profile source may be set.
localhostProfile
string
localhostProfile indicates a profile defined in a file on the node should be used.
The profile must be preconfigured on the node to work.
Must be a descending path, relative to the kubelet's configured seccomp profile location.
Must be set if type is "Localhost". Must NOT be set for any other type.
type
string required
type indicates which kind of seccomp profile will be applied.
Valid options are:
Localhost - a profile defined in a file on the node should be used.
RuntimeDefault - the container runtime default profile should be used.
Unconfined - no profile should be applied.
supplementalGroups
[]integer
port
integer
Port where the exporter will be listening for connections.
format:
int32
priorityClassName
string
PriorityClassName to be used in the Pod.
resources object
Resources describes the compute resource requirements.
limits
object
ResourceList is a set of (resource name, quantity) pairs.
requests
object
ResourceList is a set of (resource name, quantity) pairs.
securityContext object
SecurityContext holds container-level security attributes.
allowPrivilegeEscalation
boolean
capabilities object
Adds and removes POSIX capabilities from running containers.
add
[]string
Added capabilities
drop
[]string
Removed capabilities
privileged
boolean
readOnlyRootFilesystem
boolean
runAsGroup
integer
format:
int64
runAsNonRoot
boolean
runAsUser
integer
format:
int64tolerations []object
Tolerations to be used in the Pod.
effect
string
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
key
string
Key is the taint key that the toleration applies to. Empty means match all taint keys.
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
operator
string
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
tolerationSeconds
integer
TolerationSeconds represents the period of time the toleration (which must be
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
it is not set, which means tolerate the taint forever (do not evict). Zero and
negative values will be treated as 0 (evict immediately) by the system.
format:
int64
value
string
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
serviceMonitor object
ServiceMonitor defines the ServiceMonior object.
interval
string
Interval for scraping metrics.
jobLabel
string
JobLabel to add to the ServiceMonitor object.
prometheusRelease
string
PrometheusRelease is the release label to add to the ServiceMonitor object.
scrapeTimeout
string
ScrapeTimeout defines the timeout for scraping metrics.
monitor object
Monitor monitors MariaDB server instances. It is required if 'spec.mariaDbRef' is not provided.
cooperativeMonitoring
string
CooperativeMonitoring enables coordination between multiple MaxScale instances running monitors. It is defaulted when HA is enabled.
enum:
majority_of_all, majority_of_running
interval
string
Interval used to monitor MariaDB servers. It is defaulted if not provided.
module
string
Module is the module to use to monitor MariaDB servers. It is mandatory when no MariaDB reference is provided.
name
string
Name is the identifier of the monitor. It is defaulted if not provided.
params
object
Params defines extra parameters to pass to the monitor.
Any parameter supported by MaxScale may be specified here. See reference:
https://mariadb.com/kb/en/mariadb-maxscale-2308-common-monitor-parameters/.
Monitor specific parameter are also supported:
https://mariadb.com/kb/en/mariadb-maxscale-2308-galera-monitor/#galera-monitor-optional-parameters.
https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-monitor/#configuration.
suspend
boolean
Suspend indicates whether the current resource should be suspended or not.
This can be useful for maintenance, as disabling the reconciliation prevents the operator from interfering with user operations during maintenance activities.
nodeSelector
object
NodeSelector to be used in the Pod.
podDisruptionBudget object
PodDisruptionBudget defines the budget for replica availability.
maxUnavailable
string | integer
MaxUnavailable defines the number of maximum unavailable Pods.
minAvailable
string | integer
MinAvailable defines the number of minimum available Pods.
podMetadata object
PodMetadata defines extra metadata for the Pod.
annotations
object
Annotations to be added to children resources.
labels
object
Labels to be added to children resources.
podSecurityContext object
SecurityContext holds pod-level security attributes and common container settings.
appArmorProfile object
AppArmorProfile defines a pod or container's AppArmor settings.
localhostProfile
string
localhostProfile indicates a profile loaded on the node that should be used.
The profile must be preconfigured on the node to work.
Must match the loaded name of the profile.
Must be set if and only if type is "Localhost".
type
string required
type indicates which kind of AppArmor profile will be applied.
Valid options are:
Localhost - a profile pre-loaded on the node.
RuntimeDefault - the container runtime's default profile.
Unconfined - no AppArmor enforcement.
fsGroup
integer
format:
int64
fsGroupChangePolicy
string
PodFSGroupChangePolicy holds policies that will be used for applying fsGroup to a volume
when volume is mounted.
runAsGroup
integer
format:
int64
runAsNonRoot
boolean
runAsUser
integer
format:
int64seLinuxOptions object
SELinuxOptions are the labels to be applied to the container
level
string
Level is SELinux level label that applies to the container.
role
string
Role is a SELinux role label that applies to the container.
type
string
Type is a SELinux type label that applies to the container.
user
string
User is a SELinux user label that applies to the container.
seccompProfile object
SeccompProfile defines a pod/container's seccomp profile settings.
Only one profile source may be set.
localhostProfile
string
localhostProfile indicates a profile defined in a file on the node should be used.
The profile must be preconfigured on the node to work.
Must be a descending path, relative to the kubelet's configured seccomp profile location.
Must be set if type is "Localhost". Must NOT be set for any other type.
type
string required
type indicates which kind of seccomp profile will be applied.
Valid options are:
Localhost - a profile defined in a file on the node should be used.
RuntimeDefault - the container runtime default profile should be used.
Unconfined - no profile should be applied.
supplementalGroups
[]integer
priorityClassName
string
PriorityClassName to be used in the Pod.
readinessProbe object
ReadinessProbe to be used in the Container.
exec object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#execaction-v1-core.
command
[]string
failureThreshold
integer
format:
int32httpGet object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#httpgetaction-v1-core.
host
string
path
string
port
string | integer required
scheme
string
URIScheme identifies the scheme used for connection to a host for Get actions
initialDelaySeconds
integer
format:
int32
periodSeconds
integer
format:
int32
successThreshold
integer
format:
int32tcpSocket object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#tcpsocketaction-v1-core.
host
string
port
string | integer required
timeoutSeconds
integer
format:
int32
replicas
integer
Replicas indicates the number of desired instances.
format:
int32
requeueInterval
string
RequeueInterval is used to perform requeue reconciliations. If not defined, it defaults to 10s.
resources object
Resources describes the compute resource requirements.
limits
object
ResourceList is a set of (resource name, quantity) pairs.
requests
object
ResourceList is a set of (resource name, quantity) pairs.
securityContext object
SecurityContext holds security configuration that will be applied to a container.
allowPrivilegeEscalation
boolean
capabilities object
Adds and removes POSIX capabilities from running containers.
add
[]string
Added capabilities
drop
[]string
Removed capabilities
privileged
boolean
readOnlyRootFilesystem
boolean
runAsGroup
integer
format:
int64
runAsNonRoot
boolean
runAsUser
integer
format:
int64servers []object
Servers are the MariaDB servers to forward traffic to. It is required if 'spec.mariaDbRef' is not provided.
address
string required
Address is the network address of the MariaDB server.
maintenance
boolean
Maintenance indicates whether the server is in maintenance mode.
name
string required
Name is the identifier of the MariaDB server.
params
object
Params defines extra parameters to pass to the server.
Any parameter supported by MaxScale may be specified here. See reference:
https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-maxscale-configuration-guide/#server_1.
port
integer
Port is the network port of the MariaDB server. If not provided, it defaults to 3306.
format:
int32
protocol
string
Protocol is the MaxScale protocol to use when communicating with this MariaDB server. If not provided, it defaults to MariaDBBackend.
serviceAccountName
string
ServiceAccountName is the name of the ServiceAccount to be used by the Pods.
services []object
Services define how the traffic is forwarded to the MariaDB servers. It is defaulted if not provided.
listener object required
MaxScaleListener defines how the MaxScale server will listen for connections.
name
string
Name is the identifier of the listener. It is defaulted if not provided
params
object
Params defines extra parameters to pass to the listener.
Any parameter supported by MaxScale may be specified here. See reference:
https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-maxscale-configuration-guide/#listener_1.
port
integer required
Port is the network port where the MaxScale server will listen.
format:
int32
protocol
string
Protocol is the MaxScale protocol to use when communicating with the client. If not provided, it defaults to MariaDBProtocol.
suspend
boolean
Suspend indicates whether the current resource should be suspended or not.
This can be useful for maintenance, as disabling the reconciliation prevents the operator from interfering with user operations during maintenance activities.
name
string required
Name is the identifier of the MaxScale service.
params
object
Params defines extra parameters to pass to the service.
Any parameter supported by MaxScale may be specified here. See reference:
https://mariadb.com/kb/en/mariadb-maxscale-2308-mariadb-maxscale-configuration-guide/#service_1.
Router specific parameter are also supported:
https://mariadb.com/kb/en/mariadb-maxscale-2308-readwritesplit/#configuration.
https://mariadb.com/kb/en/mariadb-maxscale-2308-readconnroute/#configuration.
router
string required
Router is the type of router to use.
enum:
readwritesplit, readconnroute
suspend
boolean
Suspend indicates whether the current resource should be suspended or not.
This can be useful for maintenance, as disabling the reconciliation prevents the operator from interfering with user operations during maintenance activities.
startupProbe object
StartupProbe to be used in the Container.
exec object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#execaction-v1-core.
command
[]string
failureThreshold
integer
format:
int32httpGet object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#httpgetaction-v1-core.
host
string
path
string
port
string | integer required
scheme
string
URIScheme identifies the scheme used for connection to a host for Get actions
initialDelaySeconds
integer
format:
int32
periodSeconds
integer
format:
int32
successThreshold
integer
format:
int32tcpSocket object
Refer to the Kubernetes docs: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#tcpsocketaction-v1-core.
host
string
port
string | integer required
timeoutSeconds
integer
format:
int32
suspend
boolean
Suspend indicates whether the current resource should be suspended or not.
This can be useful for maintenance, as disabling the reconciliation prevents the operator from interfering with user operations during maintenance activities.
tls object
TLS defines the PKI to be used with MaxScale.
adminCASecretRef object
AdminCASecretRef is a reference to a Secret containing the admin certificate authority keypair. It is used to establish trust and issue certificates for the MaxScale's administrative REST API and GUI.
One of:
- Secret containing both the 'ca.crt' and 'ca.key' keys. This allows you to bring your own CA to Kubernetes to issue certificates.
- Secret containing only the 'ca.crt' in order to establish trust. In this case, either adminCertSecretRef or adminCertIssuerRef fields must be provided.
If not provided, a self-signed CA will be provisioned to issue the server certificate.
name
string
adminCertIssuerRef object
AdminCertIssuerRef is a reference to a cert-manager issuer object used to issue the MaxScale's administrative REST API and GUI certificate. cert-manager must be installed previously in the cluster.
It is mutually exclusive with adminCertSecretRef.
By default, the Secret field 'ca.crt' provisioned by cert-manager will be added to the trust chain. A custom trust bundle may be specified via adminCASecretRef.
group
string
Group of the resource being referred to.
kind
string
Kind of the resource being referred to.
name
string required
Name of the resource being referred to.
adminCertSecretRef object
AdminCertSecretRef is a reference to a TLS Secret used by the MaxScale's administrative REST API and GUI.
name
string
enabled
boolean
Enabled indicates whether TLS is enabled, determining if certificates should be issued and mounted to the MaxScale instance.
It is enabled by default when the referred MariaDB instance (via mariaDbRef) has TLS enabled and enforced.
listenerCASecretRef object
ListenerCASecretRef is a reference to a Secret containing the listener certificate authority keypair. It is used to establish trust and issue certificates for the MaxScale's listeners.
One of:
- Secret containing both the 'ca.crt' and 'ca.key' keys. This allows you to bring your own CA to Kubernetes to issue certificates.
- Secret containing only the 'ca.crt' in order to establish trust. In this case, either listenerCertSecretRef or listenerCertIssuerRef fields must be provided.
If not provided, a self-signed CA will be provisioned to issue the listener certificate.
name
string
listenerCertIssuerRef object
ListenerCertIssuerRef is a reference to a cert-manager issuer object used to issue the MaxScale's listeners certificate. cert-manager must be installed previously in the cluster.
It is mutually exclusive with listenerCertSecretRef.
By default, the Secret field 'ca.crt' provisioned by cert-manager will be added to the trust chain. A custom trust bundle may be specified via listenerCASecretRef.
group
string
Group of the resource being referred to.
kind
string
Kind of the resource being referred to.
name
string required
Name of the resource being referred to.
listenerCertSecretRef object
ListenerCertSecretRef is a reference to a TLS Secret used by the MaxScale's listeners.
name
string
replicationSSLEnabled
boolean
ReplicationSSLEnabled specifies whether the replication SSL is enabled. If enabled, the SSL options will be added to the server configuration.
It is enabled by default when the referred MariaDB instance (via mariaDbRef) has replication enabled.
If the MariaDB servers are manually provided by the user via the 'servers' field, this must be set by the user as well.
serverCASecretRef object
ServerCASecretRef is a reference to a Secret containing the MariaDB server CA certificates. It is used to establish trust with MariaDB servers.
The Secret should contain a 'ca.crt' key in order to establish trust.
If not provided, and the reference to a MariaDB resource is set (mariaDbRef), it will be defaulted to the referred MariaDB CA bundle.
name
string
serverCertSecretRef object
ServerCertSecretRef is a reference to a TLS Secret used by MaxScale to connect to the MariaDB servers.
If not provided, and the reference to a MariaDB resource is set (mariaDbRef), it will be defaulted to the referred MariaDB client certificate (clientCertSecretRef).
name
string
verifyPeerCertificate
boolean
VerifyPeerCertificate specifies whether the peer certificate's signature should be validated against the CA.
It is disabled by default.
verifyPeerHost
boolean
VerifyPeerHost specifies whether the peer certificate's SANs should match the peer host.
It is disabled by default.
tolerations []object
Tolerations to be used in the Pod.
effect
string
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
key
string
Key is the taint key that the toleration applies to. Empty means match all taint keys.
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
operator
string
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
tolerationSeconds
integer
TolerationSeconds represents the period of time the toleration (which must be
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
it is not set, which means tolerate the taint forever (do not evict). Zero and
negative values will be treated as 0 (evict immediately) by the system.
format:
int64
value
string
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
topologySpreadConstraints []object
TopologySpreadConstraints to be used in the Pod.
labelSelector object
A label selector is a label query over a set of resources. The result of matchLabels and
matchExpressions are ANDed. An empty label selector matches all objects. A null
label selector matches no objects.
matchExpressions []object
matchExpressions is a list of label selector requirements. The requirements are ANDed.
key
string required
key is the label key that the selector applies to.
operator
string required
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
values
[]string
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
matchLabels
object
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
matchLabelKeys
[]string
maxSkew
integer required
format:
int32
minDomains
integer
format:
int32
nodeAffinityPolicy
string
NodeInclusionPolicy defines the type of node inclusion policy
nodeTaintsPolicy
string
NodeInclusionPolicy defines the type of node inclusion policy
topologyKey
string required
whenUnsatisfiable
string required
updateStrategy object
UpdateStrategy defines the update strategy for the StatefulSet object.
rollingUpdate object
RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
maxUnavailable
string | integer
The maximum number of pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding up. This can not be 0.
Defaults to 1. This field is alpha-level and is only honored by servers that enable the
MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
will be counted towards MaxUnavailable.
partition
integer
Partition indicates the ordinal at which the StatefulSet should be partitioned
for updates. During a rolling update, all pods from ordinal Replicas-1 to
Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched.
This is helpful in being able to do a canary based deployment. The default value is 0.
format:
int32
type
string
Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
volumeMounts []object
VolumeMounts to be used in the Container.
mountPath
string required
name
string required
This must match the Name of a Volume.
readOnly
boolean
subPath
string
status object
MaxScaleStatus defines the observed state of MaxScale
conditions []object
Conditions for the MaxScale object.
lastTransitionTime
string required
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format:
date-time
message
string required
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength:
32768
observedGeneration
integer
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format:
int64minimum:
0
reason
string required
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
pattern:
^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$minLength:
1maxLength:
1024
status
string required
status of the condition, one of True, False, Unknown.
enum:
True, False, Unknown
type
string required
type of condition in CamelCase or in foo.example.com/CamelCase.
pattern:
^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$maxLength:
316configSync object
ConfigSync is the state of config sync.
databaseVersion
integer required
maxScaleVersion
integer required
listeners []object
Listeners is the state of the listeners in the MaxScale API.
name
string required
state
string required
monitor object
Monitor is the state of the monitor in the MaxScale API.
name
string required
state
string required
monitorSpec
string
MonitorSpec is a hashed version of spec.monitor to be able to track changes during reconciliation.
primaryServer
string
PrimaryServer is the primary server in the MaxScale API.
replicas
integer
Replicas indicates the number of current instances.
format:
int32servers []object
Servers is the state of the servers in the MaxScale API.
name
string required
state
string required
serversSpec
string
ServersSpec is a hashed version of spec.servers to be able to track changes during reconciliation.
services []object
Services is the state of the services in the MaxScale API.
name
string required
state
string required
servicesSpec
string
ServicesSpec is a hashed version of spec.services to be able to track changes during reconciliation.
tls object
TLS aggregates the status of the certificates used by the MaxScale instance.
adminCert object
AdminCert is the status of the admin certificate.
issuer
string required
Issuer is the issuer of the current certificate.
notAfter
string
NotAfter indicates that the certificate is not valid after the given date.
format:
date-time
notBefore
string
NotBefore indicates that the certificate is not valid before the given date.
format:
date-time
subject
string required
Subject is the subject of the current certificate.
caBundle []object
CABundle is the status of the Certificate Authority bundle.
issuer
string required
Issuer is the issuer of the current certificate.
notAfter
string
NotAfter indicates that the certificate is not valid after the given date.
format:
date-time
notBefore
string
NotBefore indicates that the certificate is not valid before the given date.
format:
date-time
subject
string required
Subject is the subject of the current certificate.
listenerCert object
ListenerCert is the status of the listener certificate.
issuer
string required
Issuer is the issuer of the current certificate.
notAfter
string
NotAfter indicates that the certificate is not valid after the given date.
format:
date-time
notBefore
string
NotBefore indicates that the certificate is not valid before the given date.
format:
date-time
subject
string required
Subject is the subject of the current certificate.
serverCert object
ServerCert is the status of the MariaDB server certificate.
issuer
string required
Issuer is the issuer of the current certificate.
notAfter
string
NotAfter indicates that the certificate is not valid after the given date.
format:
date-time
notBefore
string
NotBefore indicates that the certificate is not valid before the given date.
format:
date-time
subject
string required
Subject is the subject of the current certificate.
No matches. Try .spec.admin for an exact path