# Include{groups}
portals:
  open:
    protocols:
      - "$kubernetes-resource_configmap_portal_protocol"
    host:
      - "$kubernetes-resource_configmap_portal_host"
    ports:
      - "$variable-service.supervisor.ports.supervisor.port"
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: SUPERVISOR_HTTP_USER
                                        label: Supervisor HTTP User
                                        schema:
                                          type: string
                                          default: admin
                                          required: true
                                      - variable: SUPERVISOR_HTTP_PASS
                                        label: Supervisor HTTP Pass
                                        schema:
                                          type: string
                                          required: true
                                          private: true
                                          default: ""
                                      - variable: SERVER_PASS
                                        label: Server Pass
                                        schema:
                                          type: string
                                          private: true
                                          default: ""
                                          min_length: 5
                                      - variable: STATUS_HTTP
                                        label: Status HTTP
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: SUPERVISOR_HTTP
                                        label: Supervisor HTTP
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: SERVER_NAME
                                        label: Server Name
                                        schema:
                                          type: string
                                          default: My Server
                                          required: true
                                      - variable: WORLD_NAME
                                        label: World Name
                                        schema:
                                          type: string
                                          default: Dedicated
                                          required: true
                                      - variable: SERVER_PUBLIC
                                        label: Server Public
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: UPDATE_INTERVAL
                                        label: Update Interval
                                        schema:
                                          type: int
                                          default: 10800
                                          required: true
                                      - variable: BACKUPS
                                        label: Backups
                                        schema:
                                          type: boolean
                                          default: true
                                      - variable: BACKUPS_INTERVAL
                                        label: Backups Interval
                                        schema:
                                          type: int
                                          default: 43200
                                          required: true
                                      - variable: BACKUPS_DIRECTORY
                                        label: Backups Directory
                                        schema:
                                          type: string
                                          default: /backups
                                          required: true
                                      - variable: BACKUPS_MAX_AGE
                                        label: Backups Max Age
                                        schema:
                                          type: int
                                          default: 3
                                          required: true
# 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: 9010
                              required: true
        - variable: supervisor
          label: supervisor Service
          description: The supervisor service
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: supervisor
                      label: supervisor 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: 9011
                              required: true
        - variable: valheim
          label: valheim Service
          description: The valheim Game service
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: valheim1
                      label: valheim-1 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: 2456
                              required: true
                    - variable: valheim2
                      label: valheim-2 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: 2457
                              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: backups
          label: App backups Storage
          description: Stores the Application backups.
          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}
        - variable: supervisor
          label: supervisor 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}
