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

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

                                - variable: env
                                  label: Image Environment
                                  schema:
                                    additional_attrs: true
                                    type: dict
                                    attrs:
                                      - variable: SERVER_ADMIN_USERNAME
                                        label: "Server Admin User"
                                        schema:
                                          type: string
                                          required: true
                                          default: ""
                                      - variable: SERVER_ADMIN_PASSWORD
                                        label: "Server Admin Password"
                                        schema:
                                          type: string
                                          private: true
                                          required: true
                                          default: ""
                                      - variable: server
                                        label: Show Server Settings
                                        schema:
                                          type: boolean
                                          default: false
                                          show_subquestions_if: true
                                          subquestions:
                                            - variable: SERVER_REGISTRATION_DISABLED
                                              label: "Server Registration Disabled"
                                              description: "If registration is enabled or not."
                                              schema:
                                                type: boolean
                                                default: false
                                            - variable: SERVER_ACCOUNT_ACTIVATION_DISABLED
                                              label: "Server Account Activation Disabled"
                                              description: "If accounts need to be activated by an admin before using them."
                                              schema:
                                                type: boolean
                                                default: false
                                            - variable: SERVER_CORS_ALLOWED_ORIGINS
                                              label: "Server Cors Allowed Origin"
                                              description: "A comma-separated list of Allowed CORS origins for the server."
                                              schema:
                                                type: string
                                                required: true
                                                default: "*"
                                            - variable: SERVER_LOG_LEVEL
                                              label: "Server Log Level"
                                              description: "The log level of the server."
                                              schema:
                                                type: string
                                                required: true
                                                default: "info"
                                                enum:
                                                  - value: "debug"
                                                    description: "Debug"
                                                  - value: "info"
                                                    description: "Info"
                                                  - value: "warn"
                                                    description: "Warn"
                                                  - value: "error"
                                                    description: "Error"
                                                  - value: "fatal"
                                                    description: "Fatal"
                                      - variable: games_images
                                        label: Show Games and Images Settings
                                        schema:
                                          type: boolean
                                          default: false
                                          show_subquestions_if: true
                                          subquestions:
                                            - variable: GAMES_INDEX_INTERVAL_IN_MINUTES
                                              label: "Games Index Interval In Minutes"
                                              description: "The index interval in minutes. Determines how often the server should index the list of games."
                                              schema:
                                                type: int
                                                default: 5
                                                min: 1
                                            - variable: IMAGE_GC_KEEP_DAYS
                                              label: "Image GC Keep Days"
                                              description: "The number of days to keep unused images. After this period, images that have not been accessed are deleted."
                                              schema:
                                                type: int
                                                default: 30
                                                min: 1
                                            - variable: IMAGE_GC_INTERVAL_MINUTES
                                              label: "Image GC Interval Minutes"
                                              description: "How often to run the image garbage collector, in minutes."
                                              schema:
                                                type: int
                                                default: 60
                                                min: 1
                                      - variable: rawg
                                        label: Show RAWG Server Settings
                                        schema:
                                          type: boolean
                                          default: false
                                          show_subquestions_if: true
                                          subquestions:
                                            - variable: RAWG_API_URL
                                              label: RAWG API Url
                                              schema:
                                                type: string
                                                required: true
                                                default: https://api.rawg.io/api
                                            - variable: RAWG_API_CACHE_DAYS
                                              label: RAWG API Cache Days
                                              schema:
                                                type: int
                                                default: 7
                                                min: 1
                                            - variable: RAWG_API_KEY
                                              label: RAWG API Key
                                              schema:
                                                type: string
                                                default: ""

# 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: 8080
                              required: true
# Include{serviceExpertRoot}
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
        - variable: logs
          label: "App Logs Storage"
          description: "Stores the Application Logs."
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{persistenceBasic}
        - variable: images
          label: "App Images Storage"
          description: "Stores the Application Images."
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{persistenceBasic}
        - variable: games
          label: "App Games Storage"
          description: "Stores the Application Games."
          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}
