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

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

  - variable: vikunja
    group: App Configuration
    label: Vikunja Configuration
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: service
          label: Service
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: jwtttl
                label: JWT TTL
                description: The duration of the issued JWT tokens in seconds.
                schema:
                  type: int
                  required: true
                  default: 259200
              - variable: jwtttllong
                label: JWT TTL Long
                description: The duration of the “remember me” time in seconds. When the login request is made with the long param set, the token returned will be valid for this period.
                schema:
                  type: int
                  required: true
                  default: 2592000
              - variable: motd
                label: Message of the Day
                description: Set the motd message, available from the /info endpoint
                schema:
                  type: string
                  default: ""
              - variable: frontendurl
                label: Frontend URL
                description: The URL of the frontend, used to send password reset emails.
                schema:
                  type: string
                  required: true
                  default: ""
              - variable: maxitemsperpage
                label: Max Item per Page
                description: The max number of items which can be returned per page.
                schema:
                  type: int
                  required: true
                  default: 50
              - variable: maxavatarsize
                label: Max Avatar Size
                description: |
                  The maximum size clients will be able to request for user avatars.
                  If clients request a size bigger than this, it will be changed on the fly.
                schema:
                  type: int
                  required: true
                  default: 1024
              - variable: enablecaldav
                label: Enable CalDAV
                description: Enable the CalDAV endpoint, see the docs for more details.
                schema:
                  type: boolean
                  default: true
              - variable: enablelinksharing
                label: Enable Link Sharing
                description: Enable sharing of lists via a link.
                schema:
                  type: boolean
                  default: true
              - variable: enableregistration
                label: Enable Registration
                description: Whether to let new users registering themselves or not
                schema:
                  type: boolean
                  default: true
              - variable: enabletaskattachments
                label: Enable Task Attachments
                description: Whether to enable task attachments or not
                schema:
                  type: boolean
                  default: true
              - variable: enabletaskcomments
                label: Enable Task Comments
                description: Whether task comments should be enabled or not
                schema:
                  type: boolean
                  default: true
              - variable: enabletotp
                label: Enable TOTP
                description: Whether TOTP is enabled. In most cases you want to leave that enabled.
                schema:
                  type: boolean
                  default: true
              - variable: enableemailreminders
                label: Enable E-Mail Reminders
                description: |
                  If enabled, vikunja will send an email to everyone who is either assigned to a task
                  or created it when a task reminder is due.
                schema:
                  type: boolean
                  default: true
              - variable: enableuserdeletion
                label: Enable User Deletion
                description: |
                  If true, will allow users to request the complete deletion of their account.
                  When using external authentication methods it may be required to coordinate with
                  them in order to delete the account. This setting will not affect the cli commands for user deletion.
                schema:
                  type: boolean
                  default: true
        - variable: cors
          label: CORS
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: enabled
                label: Enabled
                description: Whether to enable or disable cors headers.
                schema:
                  type: boolean
                  default: true
                  show_subquestions_if: true
                  subquestions:
                    - variable: origins
                      label: Origins
                      description: A list of origins which may access the api. These need to include the protocol (http:// or https://) and port, if any.
                      schema:
                        type: list
                        default: []
                        items:
                          - variable: originEntry
                            label: ""
                            schema:
                              type: string
                              required: true
                              default: ""
                    - variable: maxage
                      label: Max Age
                      description: How long (in seconds) the results of a preflight request can be cached.
                      schema:
                        type: int
                        required: true
                        default: 0
        - variable: ratelimit
          label: Rate Limit
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: enabled
                label: Enabled
                description: Whether or not to enable the rate limit.
                schema:
                  type: boolean
                  default: false
                  show_subquestions_if: true
                  subquestions:
                    - variable: kind
                      label: Kind
                      description: The kind on which rates are based. Can be either “user” for a rate limit per user or “ip” for an ip-based rate limit.
                      schema:
                        type: string
                        required: true
                        default: user
                        enum:
                          - value: user
                            description: User
                          - value: ip
                            description: IP
                    - variable: period
                      label: Period
                      description: The time period in seconds for the limit.
                      schema:
                        type: int
                        required: true
                        default: 60
                    - variable: limit
                      label: Limit
                      description: The max number of requests a user is allowed to do in the configured time period.
                      schema:
                        type: int
                        required: true
                        default: 100
        - variable: files
          label: Files
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: maxsize
                label: Max Size
                description: The maximum size of a file, as a human-readable string.
                schema:
                  type: string
                  required: true
                  default: 20MB
        - variable: avatar
          label: Avatar
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: gravatarexpiration
                label: Gravatar Expiration
                description: When using gravatar, this is the duration in seconds until a cached gravatar user avatar expires
                schema:
                  type: int
                  required: true
                  default: 3600
        - variable: legal
          label: Legal
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: imprinturl
                label: Imprint URL
                description: Legal urls Will be shown in the frontend if configured here
                schema:
                  type: string
                  default: ""
              - variable: privacyurl
                label: Privacy URL
                description: Legal urls Will be shown in the frontend if configured here
                schema:
                  type: string
                  default: ""
        - variable: mailer
          label: Mailer
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: enabled
                label: Enabled
                description: Whether to enable the mailer or not. If it is disabled, all users are enabled right away and password reset is not possible.
                schema:
                  type: boolean
                  default: false
                  show_subquestions_if: true
                  subquestions:
                    - variable: host
                      label: Host
                      description: SMTP Host
                      schema:
                        type: string
                        required: true
                        default: ""
                    - variable: port
                      label: Port
                      description: SMTP Port
                      schema:
                        type: int
                        required: true
                        default: 587
                    - variable: authtype
                      label: Auth Type
                      description: SMTP Auth Type. Can be either plain, login or cram-md5.
                      schema:
                        type: string
                        required: true
                        default: plain
                        enum:
                          - value: plain
                            description: Plain
                          - value: login
                            description: Login
                          - value: cram-md5
                            description: Cram-MD5
                    - variable: username
                      label: Username
                      description: SMTP Username
                      schema:
                        type: string
                        required: true
                        default: ""
                    - variable: password
                      label: Password
                      description: SMTP Password
                      schema:
                        type: string
                        required: true
                        default: ""
                    - variable: fromemail
                      label: From E-Mail
                      description: The default from address when sending emails
                      schema:
                        type: string
                        required: true
                        default: ""
                    - variable: skiptlsverify
                      label: Skip TLS Verify
                      description: Wether to skip verification of the tls certificate on the server
                      schema:
                        type: boolean
                        default: false
                    - variable: forcessl
                      label: Force SSL
                      description: By default, vikunja will try to connect with starttls, use this option to force it to use ssl.
                      schema:
                        type: boolean
                        default: true
                    - variable: queuelength
                      label: Queue Length
                      description: The length of the mail queue.
                      schema:
                        type: int
                        required: true
                        default: 100
                    - variable: queuetimeout
                      label: Queue Timeout
                      description: The timeout in seconds after which the current open connection to the mail server will be closed.
                      schema:
                        type: int
                        required: true
                        default: 100
        - variable: log
          label: Log
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: enabled
                label: Enabled
                description: Whether to show any logging at all or none
                schema:
                  type: boolean
                  default: false
                  show_subquestions_if: true
                  subquestions:
                    - variable: path
                      label: Path
                      description: A folder where all the log files should go.
                      schema:
                        type: string
                        required: true
                        default: /app/vikunja/logs
                    - variable: standard
                      label: Standard
                      description: Where the normal log should go.
                      schema:
                        type: string
                        required: true
                        default: stdout
                        enum:
                          - value: stdout
                            description: stdout
                          - value: stderr
                            description: stderr
                          - value: file
                            description: File
                          - value: "off"
                            description: "Off"
                    - variable: level
                      label: Level
                      description: Change the log level.
                      schema:
                        type: string
                        show_if: [["standard", "!=", "off"]]
                        required: true
                        default: INFO
                        enum:
                          - value: INFO
                            description: INFO
                          - value: NOTICE
                            description: NOTICE
                          - value: WARNING
                            description: WARNING
                          - value: ERROR
                            description: ERROR
                          - value: CRITICAL
                            description: CRITICAL
                          - value: DEBUG
                            description: DEBUG
                    - variable: database
                      label: Database
                      description: Whether or not to log database queries. Useful for debugging.
                      schema:
                        type: string
                        required: true
                        default: "off"
                        enum:
                          - value: stdout
                            description: stdout
                          - value: stderr
                            description: stderr
                          - value: file
                            description: File
                          - value: "off"
                            description: "Off"
                    - variable: databaselevel
                      label: Database Level
                      description: The log level for database log messages.
                      schema:
                        type: string
                        show_if: [["database", "!=", "off"]]
                        required: true
                        default: INFO
                        enum:
                          - value: INFO
                            description: INFO
                          - value: NOTICE
                            description: NOTICE
                          - value: WARNING
                            description: WARNING
                          - value: ERROR
                            description: ERROR
                          - value: CRITICAL
                            description: CRITICAL
                          - value: DEBUG
                            description: DEBUG
                    - variable: http
                      label: HTTP
                      description: Whether to log http requests or not.
                      schema:
                        type: string
                        required: true
                        default: stdout
                        enum:
                          - value: stdout
                            description: stdout
                          - value: stderr
                            description: stderr
                          - value: file
                            description: File
                          - value: "off"
                            description: "Off"
                    - variable: echo
                      label: Echo
                      description: Echo has its own logging which usually is unnecessary, which is why it is disabled by default.
                      schema:
                        type: string
                        required: true
                        default: "off"
                        enum:
                          - value: stdout
                            description: stdout
                          - value: stderr
                            description: stderr
                          - value: file
                            description: File
                          - value: "off"
                            description: "Off"
                    - variable: events
                      label: Events
                      description: Whether or not to log events.
                      schema:
                        type: string
                        required: true
                        default: stdout
                        enum:
                          - value: stdout
                            description: stdout
                          - value: stderr
                            description: stderr
                          - value: file
                            description: File
                          - value: "off"
                            description: "Off"
                    - variable: eventslevel
                      label: Events Level
                      description: The log level for event log messages.
                      schema:
                        type: string
                        show_if: [["events", "!=", "off"]]
                        required: true
                        default: INFO
                        enum:
                          - value: INFO
                            description: INFO
                          - value: ERROR
                            description: ERROR
                          - value: DEBUG
                            description: DEBUG
        - variable: defaultsettings
          label: Default Settings
          description: |
            Provide default settings for new users. When a new user is created, these settings will automatically be set for the user.
            If you change them in the config file afterwards they will not be changed back for existing users.
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: avatar_provider
                label: Avatar Provider
                description: The avatar source for the user.
                schema:
                  type: string
                  required: true
                  default: initials
                  enum:
                    - value: initials
                      description: Initials
                    - value: gravatar
                      description: Gravatar
                    - value: marble
                      description: Marble
                    - value: upload
                      description: Upload
              - variable: avatar_file_id
                label: Avatar File ID
                description: The id of the file used as avatar.
                schema:
                  type: int
                  show_if: [["avatar_provider", "=", "upload"]]
                  required: true
                  default: 0
              - variable: email_reminders_enabled
                label: Enable Email Reminders
                description: If set to true users will get task reminders via email.
                schema:
                  type: boolean
                  default: false
              - variable: discoverable_by_name
                label: Discoverable by Name
                description: If set to true will allow other users to find this user when searching for parts of their name.
                schema:
                  type: boolean
                  default: false
              - variable: discoverable_by_email
                label: Discoverable by E-Mail
                description: If set to true will allow other users to find this user when searching for their exact email.
                schema:
                  type: boolean
                  default: false
              - variable: overdue_tasks_reminders_enabled
                label: Enable Overdue Task Reminders
                description: If set to true will send an email every day with all overdue tasks at a configured time.
                schema:
                  type: boolean
                  default: false
              - variable: overdue_tasks_reminders_time
                label: Overdue Task Reminder Time
                description: When to send the overdue task reminder email.
                schema:
                  type: string
                  required: true
                  default: "09:00"
              - variable: default_list_id
                label: Default List ID
                description: The id of the default list. Make sure users actually have access to this list when setting this value.
                schema:
                  type: int
                  required: true
                  default: 0
              - variable: week_start
                label: Week Start
                description: Start of the week for the user. 0 is sunday, 1 is monday and so on.
                schema:
                  type: int
                  required: true
                  default: 0
              - variable: language
                label: Language
                description: |
                  The language of the user interface. Must be an ISO 639-1 language code.
                  Will default to the browser language the user uses when signing up.
                schema:
                  type: string
                  default: ""
              - variable: timezone
                label: Timezone
                description: The time zone of each individual user. This will affect when users get reminders and overdue task emails.
                schema:
                  type: string
                  default: ""
        - variable: backgrounds
          label: Backgrounds
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: enabled
                label: Enabled
                description: Whether to enable backgrounds for lists at all.
                schema:
                  type: boolean
                  default: false
                  show_subquestions_if: true
                  subquestions:
                    - variable: providers
                      label: Providers
                      schema:
                        additional_attrs: true
                        type: dict
                        attrs:
                          - variable: upload
                            label: Upload
                            schema:
                              additional_attrs: true
                              type: dict
                              attrs:
                                - variable: enabled
                                  label: Enabled
                                  description: Whether to enable uploaded list backgrounds
                                  schema:
                                    type: boolean
                                    default: true
                          - variable: unsplash
                            label: Unsplash
                            schema:
                              additional_attrs: true
                              type: dict
                              attrs:
                                - variable: enabled
                                  label: Enabled
                                  description: Whether to enable setting backgrounds from unsplash as list backgrounds
                                  schema:
                                    type: boolean
                                    default: false
                                    show_subquestions_if: true
                                    subquestions:
                                      - variable: accesstoken
                                        label: Access Token
                                        description: |
                                           You need to create an application for your installation at
                                           https://unsplash.com/oauth/applications/new and set the access token below.
                                        schema:
                                          type: string
                                          required: true
                                          default: ""
                                      - variable: applicationid
                                        label: Application ID
                                        description: The unsplash application id is only used for ping back and required as per their api guidelines.
                                        schema:
                                          type: string
                                          required: true
                                          default: ""
        - variable: auth
          label: Auth
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: local
                label: Local
                schema:
                  additional_attrs: true
                  type: dict
                  attrs:
                    - variable: enabled
                      label: Enabled
                      description: Enable or disable local authentication
                      schema:
                        type: boolean
                        default: true
              - variable: openid
                label: OpenID
                schema:
                  additional_attrs: true
                  type: dict
                  attrs:
                    - variable: enabled
                      label: Enabled
                      description: Enable or disable OpenID Connect authentication
                      schema:
                        type: boolean
                        default: true
                        show_subquestions_if: true
                        subquestions:
                          - variable: redirecturl
                            label: Redirect URL
                            description: The URL to redirect clients to. Defaults to the configured frontend URL.
                            schema:
                              type: string
                              default: ""
                          - variable: providers
                            label: Providers
                            schema:
                              type: list
                              default: []
                              items:
                                - variable: providerEntry
                                  label: ""
                                  schema:
                                    additional_attrs: true
                                    type: dict
                                    attrs:
                                      - variable: name
                                        label: Name
                                        description: The name of the provider as it will appear in the frontend.
                                        schema:
                                          type: string
                                          required: true
                                          default: ""
                                      - variable: authurl
                                        label: Auth URL
                                        description: The auth url to send users to if they want to authenticate using OpenID Connect.
                                        schema:
                                          type: string
                                          required: true
                                          default: ""
                                      - variable: logouturl
                                        label: Logout URL
                                        description: The oidc logout url that users will be redirected to on logout.
                                        schema:
                                          type: string
                                          default: ""
                                      - variable: clientid
                                        label: Client ID
                                        description: The client ID used to authenticate Vikunja at the OpenID Connect provider.
                                        schema:
                                          type: string
                                          required: true
                                          default: ""
                                      - variable: clientsecret
                                        label: Client Secret
                                        description: The client secret used to authenticate Vikunja at the OpenID Connect provider.
                                        schema:
                                          type: string
                                          required: true
                                          default: ""
        - variable: migration
          label: Migration
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: todoist
                label: Todoist
                schema:
                  additional_attrs: true
                  type: dict
                  attrs:
                    - variable: enabled
                      label: Enabled
                      description: Whether to enable the todoist migrator or not
                      schema:
                        type: boolean
                        default: false
                        show_subquestions_if: true
                        subquestions:
                          - variable: clientid
                            label: Client ID
                            description: |
                              The client id, required for making requests to the todoist api
                              You need to register your vikunja instance at https://developer.todoist.com/appconsole.html to get this
                            schema:
                              type: string
                              required: true
                              default: ""
                          - variable: clientsecret
                            label: Client Secret
                            description: The client secret, also required for making requests to the todoist api
                            schema:
                              type: string
                              required: true
                              default: ""
                          - variable: redirecturl
                            label: Redirect URL
                            description: The url where clients are redirected after they authorized Vikunja to access their todoist items.
                            schema:
                              type: string
                              required: true
                              default: <frontend url>/migrate/todoist
              - variable: trello
                label: Trello
                schema:
                  additional_attrs: true
                  type: dict
                  attrs:
                    - variable: enabled
                      label: Enabled
                      description: Whether to enable the trello migrator or not
                      schema:
                        type: boolean
                        default: false
                        show_subquestions_if: true
                        subquestions:
                          - variable: key
                            label: Key
                            description: |
                              The client id, required for making requests to the trello api.
                              You need to register your vikunja instance at https://trello.com/app-key,
                              (log in before you visit that link) to get this.
                            schema:
                              type: string
                              required: true
                              default: ""
                          - variable: redirecturl
                            label: Redirect URL
                            description: The url where clients are redirected after they authorized Vikunja to access their trello cards.
                            schema:
                              type: string
                              required: true
                              default: <frontend url>/migrate/trello
              - variable: microsofttodo
                label: Microsoft To Do
                schema:
                  additional_attrs: true
                  type: dict
                  attrs:
                    - variable: enabled
                      label: Enabled
                      description: Wheter to enable the microsoft todo migrator or not
                      schema:
                        type: boolean
                        default: false
                        show_subquestions_if: true
                        subquestions:
                          - variable: clientid
                            label: Client ID
                            description: |
                              The client id, required for making requests to the microsoft graph api
                              See https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#register-an-application
                              for information about how to register your Vikunja instance.
                            schema:
                              type: string
                              required: true
                              default: ""
                          - variable: clientsecret
                            label: Client Secret
                            description: The client secret, also required for making requests to the microsoft graph api
                            schema:
                              type: string
                              required: true
                              default: ""
                          - variable: redirecturl
                            label: Redirect URL
                            description: The url where clients are redirected after they authorized Vikunja to access their microsoft todo tasks.
                            schema:
                              type: string
                              required: true
                              default: <frontend url>/migrate/microsoft-todo

# 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: 10220
                              required: true
# Include{serviceExpertRoot}
            default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
        - variable: files
          label: App Files Storage
          description: Stores the Application Files.
          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 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{metrics}
# Include{prometheusRule}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{netshoot}
# Include{vpn}
# Include{documentation}
