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

# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
# Include{containerBasic}
# Include{containerAdvanced}

  - variable: secretEnv
    group: "App Configuration"
    label: "Image Secrets"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: SPOTWEB_USERNAME
          label: "Admin username"
          description: "Username to configure for the admin of this installation."
          schema:
            type: string
            default: ""
            valid_chars: ^((?!god|mod|spot|admin|drazix|superuser|supervisor|root|anonymous)[^<>])*$
            required: true
        - variable: SPOTWEB_PASSWORD
          label: "Admin password"
          description: "Password to configure for the admin of this installation."
          schema:
            type: string
            default: ""
            valid_chars: "[a-zA-Z0-9!@#$%^&*?]{8,}"
            private: true
            required: true
  - variable: env
    group: "App Configuration"
    label: "Image Environment"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: SPOTWEB_SYSTEMTYPE
          label: "System Type"
          description: "System type to configure during initialization."
          schema:
            type: string
            required: true
            default: "single"
            enum:
              - value: "single"
                description: "Singe User System"
              - value: "shared"
                description: "Shared System"
              - value: "public"
                description: "Public System"
        - variable: SPOTWEB_FIRSTNAME
          label: "Admin first name"
          description: "The first name of the admin user."
          schema:
            type: string
            required: true
            default: "firstname"
            valid_chars: ^([^<>]{2})([^<>]*)$
        - variable: SPOTWEB_LASTNAME
          label: "Admin last name"
          description: "Last name of the admin user."
          schema:
            type: string
            required: true
            default: "lastname"
            valid_chars: ^([^<>]{2})([^<>]*)$
        - variable: SPOTWEB_MAIL
          label: "Admin mail adres"
          description: "Email adres to configure for the provided admin user."
          schema:
            type: string
            required: true
            default: firstname@lastname.com
            valid_chars: ^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
        - variable: SPOTWEB_RETRIEVE
          label: "SPOTWEB_RETRIEVE"
          description: "Schedule on which to automatically retrieve new spots."
          schema:
            type: string
            default: "15min"
            enum:
              - value: "1min"
                description: "Each minute"
              - value: "5min"
                description: "Every 5 minutes"
              - value: "15min"
                description: "Every 15 minutes"
              - value: "hourly"
                description: "Every hour"
              - value: "weekly"
                description: "Once a week"
              - value: "monthly"
                description: "Once a month"
# Include{containerConfig}
# Include{serviceRoot}
        - variable: main
          label: "Main Service"
          description: "Spotweb Web UI and API endpoint"
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: main
                      label: "Web Interface"
                      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: 10050
                              editable: true
                              required: true
# Include{serviceExpertRoot}
            default: false
# Include{serviceExpert}
# Include{serviceList}
# 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 this App 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}
