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

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

  - variable: env
    group: "App Configuration"
    label: "Image Environment"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: MONGO_CONNECTION
          label: "MONGO_CONNECTION"
          description: "Container Variable MONGOCONNECTION"
          schema:
            type: string
            default: "mongodb://db-user:db-password@mongodb-instance:port/db-name"
        - variable: DISPLAY_UNITS
          label: "DISPLAY_UNITS"
          description: "Set to mgdl or mmol"
          schema:
            type: string
            default: ""
        - variable: BASE_URL
          label: "BASE_URL"
          description: "Container Variable BASEURL"
          schema:
            type: string
            default: ""
        - variable: API_SECRET
          label: "API_SECRET"
          description: "Container Variable APISECRET    Should be a complex key"
          schema:
            type: string
            default: ""
        - variable: ENABLE
          label: "ENABLE"
          description: "Container Variable ENABLE"
          schema:
            type: string
            default: "delta direction upbat timeago devicestatus errorcodes ar2 simplealarms profile"
        - variable: BG_HIGH
          label: "BG_HIGH"
          description: "Container Variable BGHIGH"
          schema:
            type: string
            default: ""
        - variable: BG_LOW
          label: "BG_LOW"
          description: "Container Variable BGLOW"
          schema:
            type: string
            default: ""
        - variable: BG_TARGET_BOTTOM
          label: "BG_TARGET_BOTTOM"
          description: "Container Variable BGTARGETBOTTOM"
          schema:
            type: string
            default: ""
        - variable: BG_TARGET_TOP
          label: "BG_TARGET_TOP"
          description: "Container Variable BGTARGETTOP"
          schema:
            type: string
            default: ""
        - variable: THEME
          label: "THEME"
          description: "Container Variable THEME"
          schema:
            type: string
            default: "colors"
        - variable: TIME_FORMAT
          label: "TIME_FORMAT"
          description: "Container Variable TIMEFORMAT"
          schema:
            type: string
            default: "24"
        - variable: INSECURE_USE_HTTP
          label: "INSECURE_USE_HTTP"
          description: "Container Variable INSECUREUSEHTTPSet to true if used with reverse proxy"
          schema:
            type: string
            default: "true"
# Include{containerConfig}
# 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: 1337
                              required: true
# Include{serviceExpertRoot}
# 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{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}
