# Include{groups}
portals:
  open:
# Include{portalLink}
questions:
# 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: INIT_USER
                                        label: Init User
                                        schema:
                                          type: string
                                          required: true
                                          default: ""
                                      - variable: INIT_GROUP
                                        label: Init Group
                                        schema:
                                          type: string
                                          required: true
                                          default: ""
                                      - variable: INIT_PASSWORD
                                        label: Init Password
                                        schema:
                                          type: string
                                          required: true
                                          private: true
                                          default: ""
                                      - variable: DOMAIN
                                        label: Domain
                                        description: DOMAIN is used to generate urls
                                        schema:
                                          type: string
                                          default: ""
                                      - variable: LANG
                                        label: Language
                                        schema:
                                          type: string
                                          required: true
                                          default: en
                                      - variable: ALLOW_BOTS
                                        label: Allow Bots
                                        schema:
                                          type: boolean
                                          default: false
                                      - variable: ALLOW_VIDEO_UPLOAD
                                        label: Allow Video Upload
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: ALLOW_IMAGE_UPLOAD
                                        label: Allow Image Upload
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: ALLOW_PDF_UPLOAD
                                        label: Allow PDF Upload
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: ALLOW_AUDIO_UPLOAD
                                        label: Allow Audio Upload
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: IDLE_HOURS
                                        label: Idle Hours
                                        description: Indicate hours during which heavy operations can occur
                                        schema:
                                          type: string
                                          required: true
                                          default: 01-07
                                      - variable: VIDEO_CONVERSION_THREADS
                                        label: Video Coversion Threads
                                        description: Number of threads to use for video conversion
                                        schema:
                                          type: int
                                          required: true
                                          default: 1
                                      - variable: VIDEO_FORMAT_NOT_CONVERTED
                                        label: Video Format Not Converted
                                        description: VIDEO_FORMAT_NOT_CONVERTED is a comma (',') separated list
                                        schema:
                                          type: string
                                          required: true
                                          default: video/mp4
                                      - variable: VIDEO_SIZE_NOT_CONVERTED
                                        label: Video Size Not Converted
                                        description: VIDEO_SIZE_NOT_CONVERTED is in Mo
                                        schema:
                                          type: int
                                          required: true
                                          default: 10
                                      - variable: MAX_TASK_LOCK_DURATION
                                        label: Max Task Lock Duration
                                        description: This is the time in seconds before it considers the task as stalled and clears the lock
                                        schema:
                                          type: int
                                          required: true
                                          default: 14400
                                      - variable: ALLOW_EMAIL
                                        label: Allow Email
                                        schema:
                                          type: boolean
                                          default: false
                                          show_subquestions_if: true
                                          subquestions:
                                            - variable: MAILER_DSN
                                              label: Mailer DSN
                                              schema:
                                                type: string
                                                default: null://localhost
                                            - variable: mailer_auth_mode
                                              label: Mailer Auth Mode
                                              schema:
                                                type: string
                                                default: cram-md5
                                            - variable: mailer_username
                                              label: Mailer Username
                                              schema:
                                                type: string
                                                default: ""
                                            - variable: mailer_password
                                              label: Mailer Passowrd
                                              schema:
                                                type: string
                                                private: true
                                                default: ""
                                            - variable: mailer_port
                                              label: Mailer Port
                                              schema:
                                                type: int
                                                default: 587
                                            - variable: mailer_host
                                              label: Mailer Host
                                              schema:
                                                type: string
                                                default: ""
                                            - variable: mailer_transport
                                              label: Mailer Transport
                                              schema:
                                                type: string
                                                default: smtp
                                            - variable: mailer_encryption
                                              label: Mailer Encryption
                                              schema:
                                                type: string
                                                default: tls
                                      - variable: enable_cron_config
                                        label: Configure Cron
                                        schema:
                                          type: boolean
                                          default: false
                                          show_subquestions_if: true
                                          subquestions:
                                            - variable: CRON_CONVERT_IMAGES
                                              label: CRON Convert Images
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 60
                                            - variable: CRON_CONVERT_VIDEO
                                              label: CRON Convert Video
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 3600
                                            - variable: CRON_NOTIFICATION_EMAILS
                                              label: CRON Notification Emails
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 3600
                                            - variable: CRON_COMPRESS_GIFS
                                              label: CRON Compress GIFs
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 3600
                                            - variable: CRON_BOT_ACTIVATE
                                              label: CRON Bot Activate
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 3600
                                            - variable: CRON_CLEAN_CACHE
                                              label: CRON Clean Cache
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 86400
                                            - variable: CRON_CLEAN_NOTIFICATIONS
                                              label: CRON Clean Notifications
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 604800
                                            - variable: CRON_CLEAN_FILES
                                              label: CRON Clean Files
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 604800
                                            - variable: CRON_CLEAN_MESSAGES
                                              label: CRON Clean Messages
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 604800
                                            - variable: CRON_CLEAN_GROUPS
                                              label: CRON Clean Groups
                                              description: Task execution intervals in seconds
                                              schema:
                                                type: int
                                                default: 2592000
# Include{containerBasic}
# Include{containerAdvanced}
# 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: 10283
                              required: true
# Include{serviceExpertRoot}
# 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{ingressRoot}
        - variable: main
          label: Main Ingress
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressAdvanced}
# 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}
