Bot
| API version | kobblestone.io/v1alpha1 |
|---|---|
| Kind | Bot |
| Scope | Namespaced |
| kubectl | kubectl 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
authobjectConfigures authentication for online servers.
If not specified, the Bot can only connect to offline servers.
2 fields
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
namestringsignChatbooleanWhether chat messages are signed with the Account’s profile key (secure chat).
Default is false.
configobjectMCC 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.
2 fields
from[]objectMCC 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
inlinestringInline MCC configuration (TOML).
inactivebooleanWhether the Bot should be inactive (not running).
Default is false.
offlineUsernamestringUsername of the Bot when connecting without authentication (offline servers).
Ignored when auth is set. Default is the name of the Bot.
podobjectConfigures the spec of the managed Pod.
9 fields
affinityobjectAffinity of the bot Pod.
3 fields
nodeAffinityobject2 fields
1 field
nodeSelectorTerms[]objectpodAffinityobject2 fields
2 fields
podAffinityTermobject6 fields
labelSelectorobjectmatchLabelKeys[]stringmismatchLabelKeys[]stringnamespaceSelectorobjectnamespaces[]stringtopologyKeystringweightint326 fields
labelSelectorobjectmatchLabelKeys[]stringmismatchLabelKeys[]stringnamespaceSelectorobjectnamespaces[]stringtopologyKeystringpodAntiAffinityobject2 fields
2 fields
podAffinityTermobject6 fields
labelSelectorobjectmatchLabelKeys[]stringmismatchLabelKeys[]stringnamespaceSelectorobjectnamespaces[]stringtopologyKeystringweightint326 fields
labelSelectorobjectmatchLabelKeys[]stringmismatchLabelKeys[]stringnamespaceSelectorobjectnamespaces[]stringtopologyKeystringenv[]objectAdditional environment variables of the bot container (e.g. for C# scripts).
3 fields
namestringvaluestringvalueFromobjectimagestringCustom image for the bot container (e.g. to bundle another MCC version).
Default is ghcr.io/kobblestoneio/bot-runner.
volumeMounts[]objectAdditional 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.
8 fields
bindMountOptions[]stringmountPathstringmountPropagationstringnamestringreadOnlybooleanrecursiveReadOnlystringsubPathstringsubPathExprstringvolumes[]objectAdditional 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.
31 fields
awsElasticBlockStoreobjectazureDiskobjectazureFileobjectcephfsobjectconfigMapobjectcsiobject5 fields
driverstringfsTypestringnodePublishSecretRefobject1 field
namestringreadOnlybooleanvolumeAttributesmap[string]stringdownwardAPIobject3 fields
defaultModeint32defaultUserint64ephemeralobject1 field
volumeClaimTemplateobject2 fields
metadataobjectspecobject9 fields
accessModes[]stringdataSourceobjectdataSourceRefobjectselectorobjectstorageClassNamestringvolumeModestringvolumeNamestringflexVolumeobjectflockerobjectgcePersistentDiskobjectgitRepoobjectimageobjectiscsiobject11 fields
chapAuthDiscoverybooleanchapAuthSessionbooleanfsTypestringinitiatorNamestringiqnstringiscsiInterfacestringlunint32portals[]stringreadOnlybooleantargetPortalstringnamestringpersistentVolumeClaimobjectphotonPersistentDiskobjectportworxVolumeobjectprojectedobject3 fields
defaultModeint32defaultUserint64sources[]object6 fields
clusterTrustBundleobject6 fields
labelSelectorobjectnamestringoptionalbooleanpathstringsignerNamestringuserint64configMapobjectdownwardAPIobjectpodCertificateobject8 fields
certificateChainPathstringcredentialBundlePathstringkeyPathstringkeyTypestringmaxExpirationSecondsint32signerNamestringuserint64userAnnotationsmap[string]stringsecretobjectserviceAccountTokenobjectrbdobjectscaleIOobject10 fields
fsTypestringgatewaystringprotectionDomainstringreadOnlybooleansslEnabledbooleanstorageModestringstoragePoolstringsystemstringvolumeNamestringsecretobjectstorageosobjectvsphereVolumeobjectscripts[]objectScript 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.
5 fields
configMapKeyRefobjectKey of a ConfigMap in the same namespace holding the script.
inlinestringInline content of the script.
Exactly one of inline, configMapKeyRef and secretKeyRef must be set.
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._-]*$
runOnLoginbooleanWhether the script is run after every login (via MCC’s ScriptScheduler).
Default is false.
secretKeyRefobjectKey of a Secret in the same namespace holding the script.
Target this Bot connects to.
3 fields
hoststringCustom 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.
portint32Custom port of the target server.
Can be specified together with targetRef to override the implied port.
- Minimum: 1
- Maximum: 65535
status
addressstringResolved address (host:port) of the target.
conditions[]objectConditions of the Bot.
6 fields
lastTransitionTimestring- Format:
date-time
messagestringobservedGenerationint64reasonstringstatusstringtypestringmessagestringMessage explaining the current state of the Bot.
phasestringCurrent phase of the Bot.
Values:
Inactive: TheBotis inactive (spec.inactive).Pending: TheBotis starting or waiting for itsAccount.Connected: TheBotjoined its target.Disconnected: TheBotlost its connection (kicked, connection lost or login rejected) and is restarted with backoff.messagecontains the reason.
- One of:
Pending,Inactive,Connected,Disconnected
restartsint32How often the bot container was restarted, e.g. after disconnects.
usernamestringUsername the Bot joins with.