# Include{groups}
portals:
  open:
# Include{portalLink}
questions:
# Include{global}
  - variable: imageSelector
    group: Container Image
    label: Select Image
    schema:
      type: string
      default: image
      enum:
        - value: image
          description: Default Image
        - value: cudaImage
          description: CUDA
        - value: vaapiImage
          description: VAAPI
# Include{workload}
# Include{workloadDeployment}

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

  - variable: restreamer
    group: App Configuration
    label: Restreamer Configuration
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: general
          label: General
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: hostname
                label: Hostname
                description: Set to the domain name of the host this instance is running on.
                schema:
                  type: string
                  default: ""
              - variable: host_auto
                label: Host Auto
                description: Enable detection of public IP addresses.
                schema:
                  type: boolean
                  default: true
              - variable: tls_enable
                label: TLS Enable
                description: Set to true to enable TLS support.
                schema:
                  type: boolean
                  default: false
              - variable: origins
                label: Origins
                description: List of allowed CORS origins. Will be used for / and /memfs.
                schema:
                  type: list
                  default: []
                  items:
                    - variable: origin
                      label: Origin
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: mimetype_file
                label: Mime Types File
                description: Path to file with MIME type definitions.
                schema:
                  type: string
                  required: true
                  default: mime.types
        - variable: api
          label: API
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: api_auth_username
                label: API Auth Username
                description: Username for auth
                schema:
                  type: string
                  default: ""
                  required: true
              - variable: api_auth_password
                label: API Auth Password
                description: Password for auth.
                schema:
                  type: string
                  default: ""
                  private: true
                  required: true
              - variable: api_read_only
                label: API Read Only
                description: Allow only ready only access to the API
                schema:
                  type: boolean
                  default: false
              - variable: api_access_http_allow
                label: API Access HTTP Allow
                description: List of IP ranges in CIDR notation
                schema:
                  type: list
                  default: []
                  items:
                    - variable: ipRangeAllow
                      label: IP Range to Allow
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: api_access_http_block
                label: API Access HTTP Block
                description: List of IP ranges in CIDR notation
                schema:
                  type: list
                  default: []
                  items:
                    - variable: ipRangeBlock
                      label: IP Range to Block
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: api_access_https_allow
                label: API Access HTTPS Allow
                description: List of IP ranges in CIDR notation
                schema:
                  type: list
                  default: []
                  items:
                    - variable: ipRangeAllow
                      label: IP Range to Allow
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: api_access_https_block
                label: API Access HTTPS Block
                description: List of IP ranges in CIDR notation
                schema:
                  type: list
                  default: []
                  items:
                    - variable: ipRangeBlock
                      label: IP Range to Block
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: api_auth_enable
                label: API Auth Enable
                description: Set to false to disable auth for all clients.
                schema:
                  type: boolean
                  default: true
              - variable: api_auth_disable_localhost
                label: API Auth Disable Localhost
                description: Set to true to disable auth for clients from localhost.
                schema:
                  type: boolean
                  default: false
              - variable: api_auth0_enable
                label: API Auth0 Enable
                description: Enable Auth0.
                schema:
                  type: boolean
                  default: false
              - variable: api_auth0_tenants
                label: API Auth0 Tenants
                description: List of base64 encoded Auth0 tenant JSON objects.
                schema:
                  type: list
                  default: []
                  items:
                    - variable: tenant
                      label: Tenant
                      schema:
                        type: string
                        default: ""
                        required: true
        - variable: storage_disk
          label: Storage Disk
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: disk_max_size_mb
                label: Storage Disk Max Size MByte
                description: Max allowed megabytes for Disk Dir (0 for Unlimited)
                schema:
                  type: int
                  default: 0
              - variable: cache_enable
                label: Storage Disk Cache Enable
                description: Enable cache for files Storage Disk
                schema:
                  type: boolean
                  default: true
              - variable: cache_max_size_mb
                label: Storage Disk Cache Max Size MByte
                description: Max allowed cache size. (0 for Unlimited)
                schema:
                  type: int
                  default: 0
              - variable: cache_ttl
                label: Storage Disk Cache TTL Seconds
                description: Seconds to keep files in cache.
                schema:
                  type: int
                  default: 300
              - variable: cache_max_file_size_mb
                label: Storage Disk Max File Size MBytes
                description: Max. file size to put in cache. (0 for Unlimited)
                schema:
                  type: int
                  default: 0
              - variable: cache_types
                label: Cache Types
                description: List of file extensions to cache
                schema:
                  type: list
                  default: []
                  items:
                    - variable: type
                      label: Type
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: log_max_lines
                label: Log Max Lines
                schema:
                  type: int
                  default: 10000
        - variable: storage_mem
          label: Storage memory
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: storage_mem_auth_enable
                label: Storage Memory Auth Enable
                description: Enable basic auth for PUT,POST, and DELETE on /memfs.
                schema:
                  type: boolean
                  default: true
              - variable: storage_mem_auth_username
                label: Storage Memory Auth Username
                description: Username for Basic-Auth of /memfs. Required if auth is enabled.
                schema:
                  type: string
                  default: ""
                  required: true
                  show_if: [[storage_mem_auth_enable, "=", true]]
              - variable: storage_mem_auth_password
                label: Storage Memory Auth Password
                description: Password for Basic-Auth of /memfs. Required if auth is enabled.
                schema:
                  type: string
                  default: ""
                  private: true
                  required: true
                  show_if: [[storage_mem_auth_enable, "=", true]]
              - variable: storage_mem_max_size_mb
                label: Storage Memory Max Size MBytes
                description: Max. allowed megabytes for /memfs. (0 for Unlimited)
                schema:
                  type: int
                  default: 0
              - variable: storage_mem_purge
                label: Storage Memory Purge
                description: Set to true to remove the oldest entries if the /memfs is full.
                schema:
                  type: boolean
                  default: false
        - variable: rtmp
          label: RTMP
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: rtmp_enable
                label: RTMP Enable
                description: Enable RTMP server.
                schema:
                  type: boolean
                  default: false
              - variable: rtmps_enable
                label: RTMPS Enable
                description: Enable RTMP over TLS (Requires TLS to be enabled)
                schema:
                  type: boolean
                  default: false
              - variable: rtmp_token
                label: RTMP Token
                description: RTMP token for publishing and playing. The token is the value of the URL query parameter token.
                schema:
                  type: string
                  default: ""
                  private: true
              - variable: rtmp_app
                label: RTMP App
                description: RTMP app for publishing.
                schema:
                  type: string
                  default: "/"
        - variable: ffmpeg
          label: FFMPEG
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: ffmpeg_binary
                label: FFMPEG Binary
                description: Path to FFmpeg binary.
                schema:
                  type: string
                  default: ffmpeg
                  required: true
              - variable: ffmpeg_max_processes
                label: FFMPEG Max Processes
                description: Max. allowed simultaneously running FFmpeg instances. (0 for unlimited.)
                schema:
                  type: string
                  default: ffmpeg
              - variable: ffmpeg_access_input_allow
                label: FFMPEG Access Input Allow
                description: List of pattern for allowed input URI
                schema:
                  type: list
                  default: []
                  items:
                    - variable: allowInput
                      label: Allow Input
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: ffmpeg_access_input_block
                label: FFMPEG Access Input Block
                description: List of pattern for blocked input URI
                schema:
                  type: list
                  default: []
                  items:
                    - variable: blockInput
                      label: Block Input
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: ffmpeg_access_output_allow
                label: FFMPEG Access Output Allow
                description: List of pattern for allowed output URI
                schema:
                  type: list
                  default: []
                  items:
                    - variable: allowOutput
                      label: Allow Output
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: ffmpeg_access_output_block
                label: FFMPEG Access Output Block
                description: List of pattern for blocked output URI
                schema:
                  type: list
                  default: []
                  items:
                    - variable: blockOutput
                      label: Block Output
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: ffmpeg_log_max_lines
                label: FFMPEG Log Max Lines
                schema:
                  type: int
                  default: 50
              - variable: ffmpeg_log_max_history
                label: FFMPEG Log Max History
                schema:
                  type: int
                  default: 3
        - variable: playout
          label: Playout
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: playout_enable
                label: Playout Enable
                description: Enable playout API where available
                schema:
                  type: boolean
                  default: false
              - variable: playout_min_port
                label: Playout Min Port
                description: Min. port a playout server per input can run on.
                schema:
                  type: int
                  default: 0
              - variable: playout_max_port
                label: Playout Max Port
                description: Max. port a playout server per input can run on.
                schema:
                  type: int
                  default: 0
        - variable: logs
          label: Logs
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: log_level
                label: Log Level
                schema:
                  type: string
                  default: ""
                  enum:
                    - value: info
                      description: info
                    - value: silent
                      description: silent
                    - value: warn
                      description: warn
                    - value: error
                      description: error
                    - value: debug
                      description: debug
              - variable: log_topics
                label: Log Topics
                description: List of topics to log
                schema:
                  type: list
                  default: []
                  items:
                    - variable: topic
                      label: Topic
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: log_max_lines
                label: Log Max Lines
                schema:
                  type: int
                  default: 10000
        - variable: debug
          label: Debug
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: debug_profiling
                label: Debug Profiling
                description: Set to true to enable profiling endpoint on /profiling.
                schema:
                  type: boolean
                  default: false
              - variable: debug_force_gc
                label: Debug Force GC
                description: Number of seconds between forcing GC to return memory to the OS.
                schema:
                  type: boolean
                  default: false
        - variable: metrics
          label: Metrics
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: metrics_enable
                label: Metrics Enable
                description: Enable collecting historic metrics data.
                schema:
                  type: boolean
                  default: false
              - variable: metrics_prometheus_enable
                label: Prometheus Metrics Enable
                description: Enable prometheus endpoint /metrics.
                schema:
                  type: boolean
                  default: false
              - variable: metrics_range_seconds
                label: Metrics Range Seconds
                description: Seconds to keep history metric data.
                schema:
                  type: int
                  default: 300
              - variable: metrics_interval_seconds
                label: Metrics Interval Seconds
                description: Interval for collecting metrics.
                schema:
                  type: int
                  default: 2
        - variable: sessions
          label: Sessions
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: sessions_enable
                label: Sessions Enable
                description: Enable HLS statistics for /memfs.
                schema:
                  type: boolean
                  default: false
              - variable: sessions_ip_ignore_list
                label: Session IP Ignore List
                description: List of IP ranges in CIDR notation
                schema:
                  type: list
                  default: []
                  items:
                    - variable: ignoreIP
                      label: Ignore IP
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: sessions_timeout_sec
                label: Session Timeout Seconds
                description: Timeout of a session in seconds.
                schema:
                  type: int
                  default: 30
              - variable: sessions_persist
                label: Sessions Persist
                description: Whether to persist the session history
                schema:
                  type: boolean
                  default: false
              - variable: sessions_max_bitrate
                label: Session Max Bitrate
                description: Max. allowed outgoing bitrate in mbit/s. (0 for unlimited.)
                schema:
                  type: int
                  default: 0
              - variable: sessions_max_sessions
                label: Max Session
                description: Max. allowed number of simultaneous sessions. (0 for unlimited.)
                schema:
                  type: int
                  default: 0
        - variable: router
          label: Router
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: router_blocked_prefixes
                label: Blocked Prefixes
                description: List of path prefixes that can't be routed.
                schema:
                  type: list
                  default: []
                  items:
                    - variable: blockedPrefix
                      label: Blocked Prefix
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: router_routes
                label: Routes
                description: "List of route mappings of the form [from]:[to], e.g."
                schema:
                  type: list
                  default: []
                  items:
                    - variable: route
                      label: Route
                      schema:
                        type: string
                        default: ""
                        required: 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: 8080
                              required: true
        - variable: https
          label: HTTPS Service
          description: The HTTPS service
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: https
                      label: HTTPS 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: 8081
                              required: true
        - variable: rtmp
          label: RTmP Service
          description: The RTmP service for live streaming
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: rtmp
                      label: RTMP 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: 1935
                              required: true
        - variable: rtmps
          label: RTMP Secure Service
          description: The RTMP service for live streaming
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: rtmps
                      label: RTSP Secure 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: 1936
                              required: true
        - variable: srt
          label: SRT Data Service
          description: The SRT service for data
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
                    - variable: srt
                      label: SRT 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: 6000
                              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: 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}
        - variable: https
          label: HTTPS Ingress
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressList}

# Include{podSecurityContextRoot}
        - 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}
