# Include{groups}
portals: {}
questions:
# Include{global}
# Include{workload}
# Include{workloadDeployment}

# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
                                - variable: imageSelector
                                  label: Select Image
                                  schema:
                                    type: string
                                    default: image
                                    enum:
                                      - value: image
                                        description: Java 17 HotSpot
                                      - value: j19Image
                                        description: Java 19 HotSpot
                                      - value: j17j9Image
                                        description: Java 17 OpenJ9
                                      - value: j17jdkImage
                                        description: Java 17 JDK
                                      - value: j17gceImage
                                        description: Java 17 GraalVM CE
                                      - value: j17alpineImage
                                        description: Java 17 Hotspot(Alpine)
                                      - value: j11jdkImage
                                        description: Java 11 JDK
                                      - value: j11Image
                                        description: Java 11 HotSpot
                                      - value: j11j9Image
                                        description: Java 11 OpenJ9
                                      - value: j8Image
                                        description: Java 8 HotSpot
                                      - value: j8gceImage
                                        description: Java 8 GraalVM CE
                                      - value: j8jdkImage
                                        description: Java 8 JDK
                                      - value: j8j9Image
                                        description: Java 8 OpenJ9

                                - variable: env
                                  label: Image Environment
                                  schema:
                                    additional_attrs: true
                                    type: dict
                                    attrs:
                                      - variable: RCON_PASSWORD
                                        label: RCON_PASSWORD
                                        description: This will only have effect in the first installation or always if OVERRIDE_SERVER_PROPERTIES is enabled
                                        schema:
                                          type: string
                                          private: true
                                          default: ""
                                      - variable: EULA
                                        label: Minecraft Eula
                                        schema:
                                          type: boolean
                                          required: true
                                          default: false
                                      - variable: OVERRIDE_SERVER_PROPERTIES
                                        label: Override Server Properties
                                        description: Enable this to automatically manage the server.properties in the GUI.
                                        schema:
                                          type: boolean
                                          default: false
                                      - variable: VERSION
                                        label: Minecraft Version
                                        description: Set the Minecraft Version - LATEST, SNAPSHOT, or specific version.
                                        schema:
                                          type: string
                                          required: true
                                          default: LATEST
                                      - variable: TYPE
                                        label: Server Type
                                        schema:
                                          type: string
                                          required: true
                                          default: VANILLA
                                          enum:
                                            - value: VANILLA
                                              description: Vanilla
                                            - value: FORGE
                                              description: Forge
                                            - value: FABRIC
                                              description: Fabric
                                            - value: SPIGOT
                                              description: Spigot
                                            - value: BUKKIT
                                              description: Bukkit
                                            - value: PAPER
                                              description: Paper
                                            - value: AIRPLANE
                                              description: Airplane
                                            - value: PURPUR
                                              description: Purpur
                                            - value: MAGMA
                                              description: Magma
                                            - value: MOHIST
                                              description: Mohist
                                            - value: CATSERVER
                                              description: Catserver
                                            - value: CANYON
                                              description: Canyon
                                            - value: SPONGEVANILLA
                                              description: Sponge Vanilla
                                            - value: LIMBO
                                              description: Limbo
                                            - value: CRUCIBLE
                                              description: Crucible
                                            - value: FTBA
                                              description: FTBA
                                            - value: CURSEFORGE
                                              description: Curseforge
                                            - value: QUILT
                                              description: Quilt
                                            - value: PUFFERFISH
                                              description: Pufferfish
                                            - value: CUSTOM
                                              description: Custom
                                      - variable: CUSTOM_SERVER
                                        label: Custom Server
                                        description: URL or a container path to an existing JAR file, will ONLY download once.
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "CUSTOM"]]
                                      - variable: QUILT_LOADER_VERSION
                                        label: Quilt loader version
                                        schema:
                                          type: string
                                          default: "0.16.0"
                                          show_if: [[TYPE, "=", "QUILT"]]
                                      - variable: QUILT_INSTALLER_VERSION
                                        label: Quilt installer version
                                        schema:
                                          type: string
                                          default: "0.4.1"
                                          show_if: [[TYPE, "=", "QUILT"]]
                                      - variable: QUILT_LAUNCHER
                                        label: Quilt launcher
                                        description: Path to a custom launcher jar available to the container relative to /data.
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "QUILT"]]
                                      - variable: QUILT_LAUNCHER_URL
                                        label: Quilt launcher url
                                        description: URL to a custom launcher jar
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "QUILT"]]
                                      - variable: PUFFERFISH_BUILD
                                        label: Pufferfish build
                                        description: "To set the actual SERVER VERSION number set the value as 'build xx' for example xx is 50. set the 'Version' variable as a single branch instead like 'latest' or '1.18' or '1.17'"
                                        schema:
                                          type: string
                                          default: lastSuccessfulBuild
                                          show_if: [[TYPE, "=", "PUFFERFISH"]]
                                      - variable: FORGEVERSION
                                        label: Forge Version
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "FORGE"]]
                                      - variable: FORGE_INSTALLER
                                        label: Forge Installer
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "FORGE"]]
                                      - variable: FORGE_INSTALLER_URL
                                        label: Forge Installer URL
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "FORGE"]]
                                      - variable: FABRIC_LOADER_VERSION
                                        label: Fabric Loader Version
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "FABRIC"]]
                                      - variable: FABRIC_INSTALLER
                                        label: Fabric Installer
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "FABRIC"]]
                                      - variable: FABRIC_INSTALLER_URL
                                        label: Fabric Installer URL
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "FABRIC"]]
                                      - variable: SPIGOT_DOWNLOAD_URL
                                        label: Spigot Download URL
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "SPIGOT"]]
                                      - variable: BUILD_FROM_SOURCE
                                        label: Build Spigot from Source?
                                        schema:
                                          type: boolean
                                          default: false
                                          show_if: [[TYPE, "=", "SPIGOT"]]
                                      - variable: BUKKIT_DOWNLOAD_URL
                                        label: Bukkit Download URL
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "BUKKIT"]]
                                      - variable: PAPERBUILD
                                        label: Paper Build Number
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "PAPER"]]
                                      - variable: PAPER_DOWNLOAD_URL
                                        label: Paper Download URL
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "PAPER"]]
                                      - variable: PACKWIZ_URL
                                        label: Packwiz URL
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "PAPER"]]
                                      - variable: AIRPLANE_BUILD
                                        label: Airplane Build
                                        schema:
                                          type: string
                                          default: lastSuccessfulBuild
                                          show_if: [[TYPE, "=", "AIRPLANE"]]
                                      - variable: MAGMA_CHANNEL
                                        label: Magma Channel
                                        schema:
                                          type: string
                                          default: stable
                                          show_if: [[TYPE, "=", "MAGMA"]]
                                      - variable: MOHIST_BUILD
                                        label: Mohist Build
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "MOHIST"]]
                                      - variable: CANYON_BUILD
                                        label: Canyon Build
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "CANYON"]]
                                      - variable: SPONGEBRANCH
                                        label: Sponge Branch
                                        schema:
                                          type: string
                                          default: STABLE
                                          show_if: [[TYPE, "=", "SPONGEVANILLA"]]
                                      - variable: SPONGEVERSION
                                        label: Sponge Version
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "SPONGEVANILLA"]]
                                      - variable: LIMBO_BUILD
                                        label: Limbo Build
                                        schema:
                                          type: string
                                          default: LATEST
                                          show_if: [[TYPE, "=", "LIMBO"]]
                                      - variable: LIMBO_SCHEMA_FILENAME
                                        label: Limbo Schema Filename
                                        schema:
                                          type: string
                                          default: default.schem
                                          show_if: [[TYPE, "=", "LIMBO"]]
                                      - variable: CRUCIBLE_RELEASE
                                        label: Crucible Release
                                        schema:
                                          type: string
                                          default: latest
                                          show_if: [[TYPE, "=", "CRUCIBLE"]]
                                      - variable: FTB_MODPACK_ID
                                        label: FTB Modpack ID
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "FTBA"]]
                                      - variable: FTB_MODPACK_VERSION_ID
                                        label: FTB Modpack Version ID
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "FTBA"]]
                                      - variable: CF_SERVER_MOD
                                        label: CF Server Mod
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "CURSEFORGE"]]
                                      - variable: CF_BASE_DIR
                                        label: CF Base Dir
                                        schema:
                                          type: string
                                          default: ""
                                          show_if: [[TYPE, "=", "CURSEFORGE"]]
                                      - variable: USE_MODPACK_START_SCRIPT
                                        label: Use Modpack Start Script
                                        schema:
                                          type: boolean
                                          default: true
                                          show_if: [[TYPE, "=", "CURSEFORGE"]]
                                      - variable: FTB_LEGACYJAVAFIXER
                                        label: Fix for <unable to launch forgemodloader>
                                        schema:
                                          type: boolean
                                          default: false
                                          show_if: [[TYPE, "=", "CURSEFORGE"]]
                                      - variable: DIFFICULTY
                                        label: Difficulty
                                        schema:
                                          type: string
                                          required: true
                                          default: easy
                                          enum:
                                            - value: peaceful
                                              description: Peaceful
                                            - value: easy
                                              description: Easy
                                            - value: normal
                                              description: Normal
                                            - value: hard
                                              description: Hard
                                      - variable: WHITELIST
                                        label: Whitelist
                                        schema:
                                          type: string
                                          default: ""
                                      - variable: OPS
                                        label: OPs
                                        schema:
                                          type: string
                                          default: ""
                                      - variable: ICON
                                        label: URL to Server Icon
                                        schema:
                                          type: string
                                          default: ""
                                      - variable: MAX_PLAYERS
                                        label: Max Connected Players
                                        schema:
                                          type: int
                                          required: true
                                          default: 20
                                      - variable: MAX_WORLD_SIZE
                                        label: World Border Radius in blocks
                                        schema:
                                          type: int
                                          required: true
                                          default: 10000
                                      - variable: ALLOW_NETHER
                                        label: Enable Nether
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: ANNOUNCE_PLAYER_ACHIEVEMENTS
                                        label: Enable Announcing Player Achievements
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: ENABLE_COMMAND_BLOCK
                                        label: Enable Command Blocks
                                        schema:
                                          type: boolean
                                          default: false
                                      - variable: FORCE_GAMEMODE
                                        label: Enable Force Game Mode
                                        schema:
                                          type: boolean
                                          default: false
                                      - variable: GENERATE_STRUCTURES
                                        label: Enable Generate Structures
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: HARDCORE
                                        label: Enable Hardcore Mode
                                        description: If set to true, players will be set to spectator mode if they die.
                                        schema:
                                          type: boolean
                                          default: false
                                      - variable: MAX_BUILD_HEIGHT
                                        label: Max World Build Height
                                        schema:
                                          type: int
                                          required: true
                                          default: 256
                                      - variable: MAX_TICK_TIME
                                        label: Max Tick Time
                                        schema:
                                          type: int
                                          required: true
                                          default: 60000
                                      - variable: SPAWN_ANIMALS
                                        label: Enable Spawning Animals
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: SPAWN_MONSTERS
                                        label: Enable Spawning Monsters
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: SPAWN_NPCS
                                        label: Enable Spawning NPCs
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: VIEW_DISTANCE
                                        label: Server View Distance
                                        schema:
                                          type: int
                                          required: true
                                          default: 10
                                      - variable: SEED
                                        label: Level Seed
                                        schema:
                                          type: string
                                          default: ""
                                      - variable: MODE
                                        label: Default Gamemode
                                        schema:
                                          type: string
                                          required: true
                                          default: survival
                                          enum:
                                            - value: survival
                                              description: Survival
                                            - value: creative
                                              description: Creative
                                            - value: adventure
                                              description: Adventure
                                            - value: spectator
                                              description: Spectator
                                      - variable: MOTD
                                        label: Server Message of the Day
                                        schema:
                                          type: string
                                          default: Welcome to Minecraft on TrueNAS Scale!
                                      - variable: PVP
                                        label: Enable PVP
                                        schema:
                                          type: boolean
                                          default: false
                                      - variable: LEVEL_TYPE
                                        label: Level Type
                                        schema:
                                          type: string
                                          required: true
                                          default: DEFAULT
                                      - variable: GENERATOR_SETTINGS
                                        label: Generator Settings
                                        schema:
                                          type: string
                                          default: ""
                                      - variable: LEVEL
                                        label: World Save Name
                                        schema:
                                          type: string
                                          required: true
                                          default: world
                                      - variable: WORLD
                                        label: URL of world download
                                        schema:
                                          type: string
                                          default: ""
                                      - variable: FORCE_REDOWNLOAD
                                        label: Force redownload server files
                                        description: Force re-download of the server file for VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, CURSEFORGE, SPONGEVANILLA server types.
                                        schema:
                                          type: string
                                          default: "false"
                                          enum:
                                            - value: "false"
                                              description: "False"
                                            - value: "true"
                                              description: "True"
                                      - variable: ONLINE_MODE
                                        label: Enable Online Mode
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: USE_FLARE_FLAGS
                                        label: Use Flare Flags
                                        description: Enable to add appropriate flags for the Flare profiler on selected server types - https://github.com/itzg/docker-minecraft-server#enable-flare-flags
                                        schema:
                                          type: boolean
                                          default: false
                                      - variable: USE_AIKAR_FLAGS
                                        label: Use Aikar Flags
                                        description: Optimal JVM flags for GC tuning.
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: USE_SIMD_FLAGS
                                        label: Use SIMD Flags
                                        description: Enable support for optimized SIMD operations.
                                        schema:
                                          type: boolean
                                          default: false
                                      - variable: advanced
                                        label: Show Advanced Server Settings
                                        schema:
                                          type: boolean
                                          default: false
                                          show_subquestions_if: true
                                          subquestions:
                                            - variable: MEMORY
                                              label: Server Memory
                                              schema:
                                                type: string
                                                required: true
                                                default: 2048M
                                            - variable: JVM_OPTS
                                              label: JVM Options
                                              schema:
                                                type: string
                                                default: ""
                                            - variable: JVM_XX_OPTS
                                              label: JVM -X Options
                                              schema:
                                                type: string
                                                default: ""
# Include{containerBasic}
# Include{containerAdvanced}
# Include{containerConfig}
# Include{serviceRoot}
        - variable: main
          label: Main Service
          description: The Primary service on which the Minecraft Server runs on
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: main
                      label: Main Service Port Configuration
                      schema:
                        additional_attrs: true
                        type: dict
                        attrs:
                          - variable: port
                            label: Port
                            description: This port exposes the container port on the service
                            schema:
                              type: int
                              default: 25565
                              required: true
        - variable: rcon
          label: RCON Service
          description: The RCON service.
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: rcon
                      label: RCON Service Port Configuration
                      schema:
                        additional_attrs: true
                        type: dict
                        attrs:
                          - variable: port
                            label: Port
                            description: This port exposes the container port on the service
                            schema:
                              type: int
                              default: 25575
                              required: true
# Include{serviceExpertRoot}
            default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
        - variable: data
          label: App Data Storage
          description: Stores the Application Data.
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{persistenceBasic}
# Include{persistenceList}

# Include{securityContextRoot}
              - variable: runAsUser
                label: "runAsUser"
                description: "The UserID of the user running the application"
                schema:
                  type: int
                  default: 0
              - variable: runAsGroup
                label: "runAsGroup"
                description: "The groupID of the user running the application"
                schema:
                  type: int
                  default: 0
# Include{securityContextContainer}
# Include{securityContextAdvanced}
# Include{securityContextPod}
              - variable: fsGroup
                label: "fsGroup"
                description: "The group that should own ALL storage."
                schema:
                  type: int
                  default: 568

# Include{resources}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{netshoot}
# Include{vpn}
# Include{documentation}
