# 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: NEXTCLOUD_ADMIN_USER
          label: "NEXTCLOUD_ADMIN_USER (First Install Only)"
          description: "Sets the initial nextcloud's admin username, changing this variable after first launch will NOT change admin's username"
          schema:
            type: string
            required: true
            default: "REPLACETHIS"
        - variable: NEXTCLOUD_ADMIN_PASSWORD
          label: "NEXTCLOUD_ADMIN_PASSWORD (First Install Only)"
          description: "Sets the initial nextcloud's admin password, changing this variable after first launch will NOT change admin's password"
          schema:
            type: string
            private: true
            required: true
            default: "REPLACETHIS"
  - variable: env
    group: "App Configuration"
    label: "Image Environment"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: TRUSTED_PROXIES
          label: "Trusted Proxies (Advanced)"
          description: "Sets nextcloud Trusted Proxies"
          schema:
            type: string
            default: "172.16.0.0/16 127.0.0.1"
        - variable: PHP_MEMORY_LIMIT
          label: "PHP_MEMORY_LIMIT"
          description: "Sets php memory_limit setting"
          schema:
            type: string
            default: "1G"
        - variable: PHP_UPLOAD_LIMIT
          label: "PHP_UPLOAD_LIMIT"
          description: "Sets php upload_max_filesize and post_max_size settings"
          schema:
            type: string
            default: "10G"
        - variable: AccessIP
          label: "Access IP"
          description: "Set to the IP-Address used to reach Nextcloud. Most often the Service or NodePort IP (Ensure this is correct!)"
          schema:
            type: string
            required: true
            $ref:
              - "definitions/nodeIP"
  - variable: nextcloud
    group: "App Configuration"
    label: "Nextcloud Configuration"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: default_phone_region
          label: "Default Phone Region"
          description: "Sets the default phone region in ISO_3166-1 format (e.g. US). https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements"
          schema:
            type: string
            valid_chars: '^[A-Z]{2}$'
            default: "US"
  - variable: imaginary
    group: "App Configuration"
    label: "Preview Generation Configuration"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: preview_max_x
          label: "Preview Max X"
          description: "The maximum width, in pixels, of a preview."
          schema:
            type: int
            required: true
            default: 2048
        - variable: preview_max_y
          label: "Preview Max Y"
          description: "The maximum height, in pixels, of a preview."
          schema:
            type: int
            required: true
            default: 2048
        - variable: preview_max_memory
          label: "Preview Max Memory"
          description: "Max memory in MB for generating image previews."
          schema:
            type: int
            required: true
            default: 512
        - variable: preview_max_filesize_image
          label: "Preview Max Filesize Image"
          description: "Max file size in MB for generating image previews."
          schema:
            type: int
            required: true
            default: 150
        - variable: preview_png
          label: "Generate previews for PNG"
          schema:
            type: boolean
            default: true
        - variable: preview_jpeg
          label: "Generate previews for JPEG "
          schema:
            type: boolean
            default: true
        - variable: preview_gif
          label: "Generate previews for GIF"
          schema:
            type: boolean
            default: true
        - variable: preview_bmp
          label: "Generate previews for BMP"
          schema:
            type: boolean
            default: true
        - variable: preview_xbitmap
          label: "Generate previews for XBitmap"
          schema:
            type: boolean
            default: true
        - variable: preview_mp3
          label: "Generate previews for MP3"
          schema:
            type: boolean
            default: true
        - variable: preview_markdown
          label: "Generate previews for MarkDown"
          schema:
            type: boolean
            default: true
        - variable: preview_opendoc
          label: "Generate previews for OpenDocument"
          schema:
            type: boolean
            default: true
        - variable: preview_txt
          label: "Generate previews for TXT"
          schema:
            type: boolean
            default: true
        - variable: preview_krita
          label: "Generate previews for Krita"
          schema:
            type: boolean
            default: true
        - variable: preview_illustrator
          label: "Generate previews for Illustrator"
          schema:
            type: boolean
            default: false
        - variable: preview_heic
          label: "Generate previews for HEIC"
          schema:
            type: boolean
            default: false
        - variable: preview_movie
          label: "Generate previews for Movie"
          schema:
            type: boolean
            default: false
        - variable: preview_msoffice2003
          label: "Generate previews for MSOffice2003"
          schema:
            type: boolean
            default: false
        - variable: preview_msoffice2007
          label: "Generate previews for MSOffice2007"
          schema:
            type: boolean
            default: false
        - variable: preview_msofficedoc
          label: "Generate previews for MSOfficeDoc"
          schema:
            type: boolean
            default: false
        - variable: preview_pdf
          label: "Generate previews for PDF"
          schema:
            type: boolean
            default: false
        - variable: preview_photoshop
          label: "Generate previews for Photoshop"
          schema:
            type: boolean
            default: false
        - variable: preview_postscript
          label: "Generate previews for Postscript"
          schema:
            type: boolean
            default: false
        - variable: preview_staroffice
          label: "Generate previews for StarOffice"
          schema:
            type: boolean
            default: false
        - variable: preview_svg
          label: "Generate previews for SVG"
          schema:
            type: boolean
            default: false
        - variable: preview_tiff
          label: "Generate previews for TIFF"
          schema:
            type: boolean
            default: false
        - variable: preview_font
          label: "Generate previews for Font"
          schema:
            type: boolean
            default: false
# 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: 10020
                              required: true
# Include{serviceExpertRoot}
            default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
        - variable: html
          label: "App html Storage"
          description: "Stores the Application html."
          schema:
            additional_attrs: true
            type: dict
            attrs:
# Include{persistenceBasic}
        - variable: data
          label: "UserData Storage"
          description: "Stores the User 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}
# 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: 33

# Include{resources}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{netshoot}
# Include{vpn}
# Include{documentation}
