Reference

Bot

API versionkobblestone.io/v1alpha1
KindBot
ScopeNamespaced
kubectlkubectl get bots

A Bot is a single Minecraft-Console-Client (MCC) instance connected to exactly one target.

If the Bot should connect to an online server, it needs to reference an authorized Account (which is allowed to access the server). Otherwise it joins with offlineUsername.

The Bot is programmed with MCC’s own means: its configuration (config, TOML as in MinecraftClient.ini, e.g. to enable built-in ChatBots) and scripts (scripts, MCC command scripts or C# scripts).

spec

authobject

Configures authentication for online servers.

If not specified, the Bot can only connect to offline servers.

2 fields
accountRefobjectrequired

Reference to an Account in the same namespace this Bot authenticates with.

The Bot mounts the Account’s session Secret and is restarted whenever the session is refreshed. While the Account is not authorized, the Bot stays Pending.

1 field
namestring
signChatboolean

Whether chat messages are signed with the Account’s profile key (secure chat).

Default is false.

configobject

MCC configuration in TOML (the format of MinecraftClient.ini).

Layers are merged in this order, later layers win: generated defaults, inline, from (in order), generated ScriptScheduler tasks for scripts with runOnLogin, and finally the settings managed by Kobblestone (Main.General.Account, Main.General.Server, Main.General.AccountType, session caches and Signature), which cannot be overridden.

Tables are merged, arrays of tables (e.g. ChatBot.ScriptScheduler.TaskList) are concatenated.

Documentation
2 fields
from[]object

MCC configuration (TOML) from keys of ConfigMaps or Secrets, merged after inline in order.

Use Secrets for confidential settings (e.g. tokens of chat bridges); they are mounted into the Bot directly and never read by the operator.

2 fields

Key of a ConfigMap in the same namespace.

Documentation
3 fields
keystring
namestring
optionalboolean

Key of a Secret in the same namespace.

Documentation
3 fields
keystring
namestring
optionalboolean
inlinestring

Inline MCC configuration (TOML).

inactiveboolean

Whether the Bot should be inactive (not running).

Default is false.

Username of the Bot when connecting without authentication (offline servers).

Ignored when auth is set. Default is the name of the Bot.

podobject

Configures the spec of the managed Pod.

9 fields
affinityobject

Affinity of the bot Pod.

Documentation
3 fields
2 fields
2 fields
2 fields
3 fields
keystring
operatorstring
values[]string
matchFields[]object
3 fields
keystring
operatorstring
values[]string
weightint32
1 field
2 fields
3 fields
keystring
operatorstring
values[]string
matchFields[]object
3 fields
keystring
operatorstring
values[]string
2 fields
2 fields
6 fields
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
namespaces[]string
weightint32
6 fields
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
namespaces[]string
2 fields
2 fields
6 fields
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
namespaces[]string
weightint32
6 fields
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
namespaces[]string
env[]object

Additional environment variables of the bot container (e.g. for C# scripts).

Documentation
3 fields
namestring
valuestring
valueFromobject
5 fields
3 fields
keystring
namestring
optionalboolean
fieldRefobject
2 fields
fieldPathstring
4 fields
keystring
optionalboolean
pathstring
3 fields
divisorstring
resourcestring
3 fields
keystring
namestring
optionalboolean
imagestring

Custom image for the bot container (e.g. to bundle another MCC version).

Default is ghcr.io/kobblestoneio/bot-runner.

Documentation

Image pull policy of the bot container.

Documentation
nodeNamestring

Name of the node the bot Pod is scheduled on.

Documentation
nodeSelectormap[string]string

Node selector of the bot Pod.

Documentation
tolerations[]object

Tolerations of the bot Pod.

Documentation
5 fields
effectstring
keystring
operatorstring
valuestring
volumeMounts[]object

Additional volume mounts of the bot container. MCC’s working directory is /data, so mount paths below it (e.g. /data/files) are accessible to scripts with relative paths.

Documentation
8 fields
mountPathstring
namestring
readOnlyboolean
subPathstring
volumes[]object

Additional volumes of the bot Pod, e.g. a PersistentVolumeClaim with data files for scripts.

Names starting with kobblestone- are reserved for the volumes added by Kobblestone.

Documentation
31 fields
4 fields
fsTypestring
readOnlyboolean
volumeIDstring
azureDiskobject
6 fields
diskNamestring
diskURIstring
fsTypestring
kindstring
readOnlyboolean
azureFileobject
3 fields
readOnlyboolean
shareNamestring
cephfsobject
6 fields
monitors[]string
pathstring
readOnlyboolean
secretRefobject
1 field
namestring
userstring
cinderobject
4 fields
fsTypestring
readOnlyboolean
secretRefobject
1 field
namestring
volumeIDstring
configMapobject
5 fields
items[]object
4 fields
keystring
modeint32
pathstring
userint64
namestring
optionalboolean
csiobject
5 fields
driverstring
fsTypestring
1 field
namestring
readOnlyboolean
volumeAttributesmap[string]string
3 fields
items[]object
5 fields
fieldRefobject
2 fields
fieldPathstring
modeint32
pathstring
3 fields
divisorstring
resourcestring
userint64
emptyDirobject
3 fields
mediumstring
modeint32
sizeLimitstring
ephemeralobject
1 field
2 fields
metadataobject
specobject
9 fields
accessModes[]string
3 fields
apiGroupstring
kindstring
namestring
4 fields
apiGroupstring
kindstring
namestring
namespacestring
resourcesobject
2 fields
limitsmap[string]string
requestsmap[string]string
selectorobject
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
fcobject
5 fields
fsTypestring
lunint32
readOnlyboolean
targetWWNs[]string
wwids[]string
5 fields
driverstring
fsTypestring
optionsmap[string]string
readOnlyboolean
secretRefobject
1 field
namestring
flockerobject
2 fields
4 fields
fsTypestring
pdNamestring
readOnlyboolean
gitRepoobject
3 fields
directorystring
revisionstring
glusterfsobject
3 fields
endpointsstring
pathstring
readOnlyboolean
hostPathobject
2 fields
pathstring
typestring
imageobject
2 fields
referencestring
iscsiobject
11 fields
fsTypestring
iqnstring
lunint32
portals[]string
readOnlyboolean
secretRefobject
1 field
namestring
namestring
nfsobject
3 fields
pathstring
readOnlyboolean
serverstring
2 fields
claimNamestring
readOnlyboolean
2 fields
fsTypestring
pdIDstring
3 fields
fsTypestring
readOnlyboolean
volumeIDstring
projectedobject
3 fields
sources[]object
6 fields
6 fields
2 fields
3 fields
keystring
operatorstring
values[]string
matchLabelsmap[string]string
namestring
optionalboolean
pathstring
userint64
configMapobject
3 fields
items[]object
4 fields
keystring
modeint32
pathstring
userint64
namestring
optionalboolean
1 field
items[]object
5 fields
fieldRefobject
2 fields
fieldPathstring
modeint32
pathstring
3 fields
divisorstring
resourcestring
userint64
secretobject
3 fields
items[]object
4 fields
keystring
modeint32
pathstring
userint64
namestring
optionalboolean
4 fields
audiencestring
pathstring
userint64
quobyteobject
6 fields
groupstring
readOnlyboolean
registrystring
tenantstring
userstring
volumestring
rbdobject
8 fields
fsTypestring
imagestring
keyringstring
monitors[]string
poolstring
readOnlyboolean
secretRefobject
1 field
namestring
userstring
scaleIOobject
10 fields
fsTypestring
gatewaystring
readOnlyboolean
secretRefobject
1 field
namestring
sslEnabledboolean
systemstring
secretobject
5 fields
items[]object
4 fields
keystring
modeint32
pathstring
userint64
optionalboolean
storageosobject
5 fields
fsTypestring
readOnlyboolean
secretRefobject
1 field
namestring
resourcesobject

Resource requirements of the Bot container.

Documentation
3 fields
claims[]object
2 fields
namestring
requeststring
limitsmap[string]string
requestsmap[string]string
scripts[]object

Script files placed in MCC’s working directory, so they can be run with /script <name> or by the ScriptScheduler.

Files ending with .cs are MCC C# scripts (starting with //MCCScript 1.0), all others MCC command scripts.

Documentation
5 fields

Key of a ConfigMap in the same namespace holding the script.

3 fields
keystring
namestring
optionalboolean
inlinestring

Inline content of the script.

Exactly one of inline, configMapKeyRef and secretKeyRef must be set.

namestringrequired

File name of the script in MCC’s working directory, e.g. farm.cs or greet.txt.

  • Pattern: ^[A-Za-z0-9][A-Za-z0-9._-]*$
runOnLoginboolean

Whether the script is run after every login (via MCC’s ScriptScheduler).

Default is false.

Key of a Secret in the same namespace holding the script.

3 fields
keystring
namestring
optionalboolean
targetobjectrequired

Target this Bot connects to.

3 fields
hoststring

Custom host (IP or hostname) of the target server.

This is required when targetRef is not specified. Otherwise, it overrides the target host implied by targetRef.

portint32

Custom port of the target server.

Can be specified together with targetRef to override the implied port.

  • Minimum: 1
  • Maximum: 65535
targetRefobject

Reference to a target object.

This may be one of the following types: Server, Network.

If you want to connect through Router instances, you must set the host parameter to a hostname that routes accordingly.

4 fields
apiGroupstring
kindstring
namestring
namespacestring

status

addressstring

Resolved address (host:port) of the target.

conditions[]object

Conditions of the Bot.

6 fields
  • Format: date-time
messagestring
reasonstring
statusstring
typestring
messagestring

Message explaining the current state of the Bot.

phasestring

Current phase of the Bot.

Values:

  • Inactive: The Bot is inactive (spec.inactive).
  • Pending: The Bot is starting or waiting for its Account.
  • Connected: The Bot joined its target.
  • Disconnected: The Bot lost its connection (kicked, connection lost or login rejected) and is restarted with backoff. message contains the reason.
  • One of: Pending, Inactive, Connected, Disconnected

How often the bot container was restarted, e.g. after disconnects.

usernamestring

Username the Bot joins with.