# Include{groups}
portals:
  open:
# Include{portalLink}
questions:
  # Portal
# Include{global}
# Include{workload}
# Include{workloadDeployment}

# Include{replicas1}
# Include{podSpec}
# Include{containerMain}

                                - variable: env
                                  group: "App Configuration"
                                  label: "Image Environment"
                                  schema:
                                    additional_attrs: true
                                    type: dict
                                    attrs:
                                      - variable: VNC_PASSWORD
                                        label: "VNC_PASSWORD"
                                        description: "Password needed to connect to the application's GUI. See the VNC Password section for more details."
                                        schema:
                                          type: string
                                          private: true
                                          default: ""
# Include{containerBasic}
# Include{containerAdvanced}
  - variable: filebot
    group: "App Configuration"
    label: "FileBot Configuration"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: ENABLE_CJK_FONT
          label: "ENABLE_CJK_FONT"
          description: "When set to true, open-source computer font WenQuanYi Zen Hei is installed. "
          schema:
            type: boolean
            default: false
        - variable: KEEP_APP_RUNNING
          label: "KEEP_APP_RUNNING"
          description: "When set to true, the application will be automatically restarted if it crashes or if a user quits it."
          schema:
            type: boolean
            default: false
        - variable: gui
          label: "GUI Settings"
          description: "Always read description before changing a value here. Also refer to README"
          schema:
            type: boolean
            default: false
            show_subquestions_if: true
            subquestions:
              - variable: DISPLAY_WIDTH
                label: "DISPLAY_WIDTH"
                description: "Width (in pixels) of the application's window."
                schema:
                  type: int
                  default: 1280
                  required: true
              - variable: DISPLAY_HEIGHT
                label: "DISPLAY_HEIGHT"
                description: "Height (in pixels) of the application's window."
                schema:
                  type: int
                  default: 768
                  required: true
              - variable: SECURE_CONNECTION
                label: "SECURE_CONNECTION"
                description: "When set to true, an encrypted connection is used to access the application's GUI (either via a web browser or VNC client). See the Security section for more details."
                schema:
                  type: boolean
                  default: false
        - variable: general
          label: "General FileBot Settings"
          description: "Always read description before changing a value here. Also refer to README"
          schema:
            type: boolean
            default: false
            show_subquestions_if: true
            subquestions:
              - variable: OPENSUBTITLES_USERNAME
                label: "OPENSUBTITLES_USERNAME"
                description: "Username of your OpenSubtitles account. Required to download subtitles."
                schema:
                  type: string
                  default: ""
              - variable: OPENSUBTITLES_PASSWORD
                label: "OPENSUBTITLES_PASSWORD"
                description: "Password of your OpenSubtitles account. Required to download subtitles."
                schema:
                  type: string
                  default: ""
              - variable: FILEBOT_CUSTOM_OPTIONS
                label: "FILEBOT_CUSTOM_OPTIONS"
                description: "Custom arguments to pass to FileBot. This applies to the UI only."
                schema:
                  type: string
                  default: ""
              - variable: USE_FILEBOT_BETA
                label: "USE_FILEBOT_BETA"
                description: "When set to true, FileBot installed under /config/beta (container path) is used."
                schema:
                  type: boolean
                  default: false
        - variable: amc
          label: "Automated Media Center Settings"
          description: "Always read description before changing a value here. Also refer to README"
          schema:
            type: boolean
            default: false
            show_subquestions_if: true
            subquestions:
              - variable: AMC_INTERVAL
                label: "AMC_INTERVAL"
                description: "Time (in seconds) between each invocation of the AMC script."
                schema:
                  type: int
                  default: 1800
              - variable: AMC_INPUT_STABLE_TIME
                label: "AMC_INPUT_STABLE_TIME"
                description: "Time (in seconds) during which properties (e.g. size, time, etc) of files in the watch folder need to remain the same before invoking the AMC script."
                schema:
                  type: int
                  default: 1800
              - variable: AMC_ACTION
                label: "AMC_ACTION"
                description: "Action performed by the AMC script on files."
                schema:
                  type: string
                  default: "test"
                  enum:
                    - value: "test"
                      description: "test"
                    - value: "copy"
                      description: "copy"
                    - value: "move"
                      description: "move"
                    - value: "symlink"
                      description: "symlink"
                    - value: "hardlink"
                      description: "hardlink"
                    - value: "keeplink"
                      description: "keeplink"
                    - value: "duplicate"
                      description: "duplicate"
                    - value: "clone"
                      description: "clone"
              - variable: AMC_CONFLICT
                label: "AMC_CONFLICT"
                description: "Conflict resolution strategy used by the AMC script"
                schema:
                  type: string
                  default: "auto"
                  enum:
                    - value: "auto"
                      description: "auto"
                    - value: "skip"
                      description: "skip"
              - variable: AMC_MATCH_MODE
                label: "AMC_MATCH_MODE"
                description: "Match mode used by the AMC script"
                schema:
                  type: string
                  default: "opportunistic"
                  enum:
                    - value: "opportunistic"
                      description: "opportunistic"
                    - value: "strict"
                      description: "strict"
              - variable: AMC_ARTWORK
                label: "AMC_ARTWORK"
                description: "When set to true, artwork is fetched and NFO file is generated by the AMC script."
                schema:
                  type: boolean
                  default: false
              - variable: AMC_LANG
                label: "AMC_LANG"
                description: "Language used by the AMC script to rename files. Two-characters language code or value like English, French."
                schema:
                  type: string
                  default: "English"
              - variable: AMC_MUSIC_FORMAT
                label: "AMC_MUSIC_FORMAT"
                description: "Define how music files are renamed by the AMC script."
                schema:
                  type: string
                  default: "{plex}"
              - variable: AMC_MOVIE_FORMAT
                label: "AMC_MOVIE_FORMAT"
                description: "Define how movie files are renamed by the AMC script."
                schema:
                  type: string
                  default: "{plex}"
              - variable: AMC_SERIES_FORMAT
                label: "AMC_SERIES_FORMAT"
                description: "Define how TV series files are renamed by the AMC script."
                schema:
                  type: string
                  default: "{plex}"
              - variable: AMC_ANIME_FORMAT
                label: "AMC_ANIME_FORMAT"
                description: "Define how anime files are renamed by the AMC script."
                schema:
                  type: string
                  default: "{plex}"
              - variable: AMC_PROCESS_MUSIC
                label: "AMC_PROCESS_MUSIC"
                description: "When set to true, music files are processed by the AMC script."
                schema:
                  type: boolean
                  default: true
              - variable: AMC_SUBTITLE_LANG
                label: "AMC_SUBTITLE_LANG"
                description: "Comma-separated list of subtitle languages to download. Example: en,de,fr."
                schema:
                  type: string
                  default: ""
              - variable: AMC_CUSTOM_OPTIONS
                label: "AMC_CUSTOM_OPTIONS"
                description: "Custom arguments to pass to the AMC script."
                schema:
                  type: string
                  default: ""
              - variable: AMC_INSTALL_PKGS
                label: "AMC_INSTALL_PKGS"
                description: "Space-separated list of Alpine Linux packages to install."
                schema:
                  type: string
                  default: ""

# Include{containerConfig}
# Include{podOptions}
# Include{serviceRoot}
        - variable: main
          label: "Main Service"
          description: "The Primary service on which the healthcheck runs, often the webUI"
          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: 10268
                              required: true
        - variable: vnc
          label: "VNC Service"
          description: "VNC Service"
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: vnc
                      label: "TCP 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: 10269
                              required: true
# Include{serviceExpertRoot}
            default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
        - variable: config
          label: "App Config Storage"
          description: "Stores the Application Configuration."
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{persistenceBasic}
        - variable: storage
          label: "App Storage Storage"
          description: "Stores the Application Storage."
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{persistenceBasic}
        - variable: watch
          label: "App Watch Storage"
          description: "Stores the Application Watch."
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{persistenceBasic}
        - variable: output
          label: "App Output Storage"
          description: "Stores the Application Output."
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{persistenceBasic}
# Include{persistenceList}
# Include{ingressRoot}
        - variable: main
          label: "Main Ingress"
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressList}
# 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}
