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

# Include{replicas1}
# Include{podSpec}
# Include{containerMain}

# Include{containerBasic}
# Include{containerAdvanced}
  - variable: timezoneandlocale
    group: "App Configuration"
    label: "Timezone and Localization"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: N8N_DEFAULT_LOCALE
          label: "Default Locale (Leave empty for default)"
          description: "A locale identifier, compatible with the Accept-Language header."
          schema:
            type: string
            default: ""
  - variable: deployment
    group: "App Configuration"
    label: "Deployment"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: N8N_HOST
          label: "Host"
          description: "Host name n8n runs on."
          schema:
            type: string
            required: true
            default: ""
        - variable: N8N_EDITOR_BASE_URL
          label: "Base URL"
          description: "Public URL where users can access the editor. Also used for emails sent from n8n."
          schema:
            type: string
            default: ""
        - variable: N8N_CONFIG_FILES
          label: "Config Files (Leave empty for default)"
          description: "Use to provide the path to any JSON configuration file(s)"
          schema:
            type: string
            default: ""
        - variable: N8N_DISABLE_UI
          label: "Disable UI"
          description: "Whether the UI should be disabled"
          schema:
            type: boolean
            default: false
        - variable: N8N_TEMPLATES_ENABLED
          label: "Enable Templates"
          description: "Enable workflow templates."
          schema:
            type: boolean
            default: false
            show_subquestions_if:
            subquestions:
              - variable: N8N_TEMPLATES_HOST
                label: "Templates Host (Leave empty for default)"
                description: "Change this if creating your own workflow template library."
                schema:
                  type: string
                  default: ""
        - variable: N8N_ENCRYPTION_KEY
          label: "Encryption Key (Leave empty for default)"
          description: "Provide a custom key used to encrypt credentials in the n8n database. By default a random key is generated on first launch"
          schema:
            type: string
            default: ""
        - variable: N8N_PERSONALIZATION_ENABLED
          label: "Enable Personalization"
          description: "Whether to ask users personalization questions and then customize n8n accordingly"
          schema:
            type: boolean
            default: true
        - variable: N8N_VERSION_NOTIFICATIONS_ENABLED
          label: "Enable Version Notifications"
          description: "When enabled, notifications of new versions and security updates are provided"
          schema:
            type: boolean
            default: true
        - variable: N8N_DIAGNOSTICS_ENABLED
          label: "Enable Diagnostics"
          description: "Whether to share selected, anonymous telemetry with n8n"
          schema:
            type: boolean
            default: false
        - variable: N8N_HIRING_BANNER_ENABLED
          label: "Enable Hiring Banner"
          description: "Whether to show the n8n hiring banner in the console."
          schema:
            type: boolean
            default: false
  - variable: workflows
    group: "App Configuration"
    label: "Workflows"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: WORKFLOWS_DEFAULT_NAME
          label: "Workflows Default Name (Leave empty for default)"
          description: "The default name used for new workflows"
          schema:
            type: string
            default: ""
        - variable: N8N_ONBOARDING_FLOW_DISABLED
          label: "Enable Onboarding Flow"
          description: "Whether to show onboarding tips when creating a new workflow."
          schema:
            type: boolean
            default: false
        - variable: N8N_WORKFLOW_TAGS_DISABLED
          label: "Disable Workflow Tags"
          description: "Whether to disable workflow tags."
          schema:
            type: boolean
            default: false
  - variable: executions
    group: "App Configuration"
    label: "Executions"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: EXECUTIONS_PROCESS
          label: "Execution Process"
          description: "Whether processes are executed in their own process or the main process"
          schema:
            type: string
            default: ""
            enum:
              - value: ""
                description: "Default"
              - value: "main"
                description: "Main"
              - value: "own"
                description: "Own"
        - variable: EXECUTIONS_MODE
          label: "Execution Mode"
          description: "Whether processes should run directly or via queue"
          schema:
            type: string
            default: ""
            enum:
              - value: ""
                description: "Default"
              - value: "regular"
                description: "Regular"
              - value: "queue"
                description: "Queue"
        - variable: EXECUTIONS_TIMEOUT
          label: "Execution Timeout (Leave empty for default)"
          description: "The maximum run time (in seconds) before stopping a workflow execution. Set to -1 to disable."
          schema:
            type: int
        - variable: EXECUTIONS_TIMEOUT_MAX
          label: "Max Execution Timeout (Leave empty for default)"
          description: "The max execution time (in seconds) that can be set for a workflow individually"
          schema:
            type: int
        - variable: EXECUTIONS_DATA_SAVE_ON_ERROR
          label: "Execution Data Save on Error"
          description: "Whether n8n saves execution data on error."
          schema:
            type: string
            default: ""
            enum:
              - value: ""
                description: "Default"
              - value: "all"
                description: "All"
              - value: "none"
                description: "None"
        - variable: EXECUTIONS_DATA_SAVE_ON_SUCCESS
          label: "Execution Data Save on Success"
          description: "Whether execution data is saved on success"
          schema:
            type: string
            default: ""
            enum:
              - value: ""
                description: "Default"
              - value: "all"
                description: "All"
              - value: "none"
                description: "None"
        - variable: EXECUTIONS_DATA_SAVE_ON_PROGRESS
          label: "Execution Data Save on Progress"
          description: "Whether to save progress for each node executed"
          schema:
            type: boolean
            default: false
        - variable: EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS
          label: "Execution Data Save on Manual Executions"
          description: "Whether to save data of executions when started manually"
          schema:
            type: boolean
            default: false
        - variable: EXECUTIONS_DATA_MAX_AGE
          label: "Execution Data Max Age (Leave empty for default)"
          description: "The execution age (in hours) before it is deleted"
          schema:
            type: int
        - variable: EXECUTIONS_DATA_PRUNE
          label: "Execution Data Prune"
          description: "Whether to delete data of past executions on a rolling basis"
          schema:
            type: boolean
            default: false
            show_subquestions_if:
            subquestions:
              - variable: EXECUTIONS_DATA_PRUNE_TIMEOUT
                label: "Data Prune Timeout (Leave empty for default)"
                description: "The timeout (in seconds) after execution data has been pruned"
                schema:
                  type: int
  - variable: n8n_security
    group: "App Configuration"
    label: "Security"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: N8N_BLOCK_ENV_ACCESS_IN_NODE
          label: "Block Environment Access in Node"
          description: "Whether to allow users to access environment variables in expressions and the function node"
          schema:
            type: boolean
            default: false
        - variable: N8N_BASIC_AUTH_ACTIVE
          label: "Enable Basic Auth"
          description: "Whether basic auth should be activated for editor and REST-API access"
          schema:
            type: boolean
            default: false
            show_subquestions_if: true
            subquestions:
              - variable: N8N_BASIC_AUTH_USER
                label: "Basic Auth User (Leave empty for default)"
                description: "The name of the n8n user for basic authentication"
                schema:
                  type: string
                  default: ""
              - variable: N8N_BASIC_AUTH_PASSWORD
                label: "Basic Auth Password (Leave empty for default)"
                description: "The password of the n8n user for basic authentication"
                schema:
                  type: string
                  default: ""
              - variable: N8N_BASIC_AUTH_HASH
                label: "Enable Basic Auth Hash"
                description: "Whether the basic authentication password is hashed"
                schema:
                  type: boolean
                  default: false
        - variable: N8N_JWT_AUTH_ACTIVE
          label: "Enable JWT Auth"
          description: "Whether JWT authentication should be activated for editor and REST-API access"
          schema:
            type: boolean
            default: false
            show_subquestions_if: true
            subquestions:
              - variable: N8N_JWT_AUTH_HEADER
                label: "JWT Auth Header (Leave empty for default)"
                description: "The request header containing a signed JWT"
                schema:
                  type: string
                  default: ""
              - variable: N8N_JWT_AUTH_HEADER_VALUE_PREFIX
                label: "JWT Auth Header Prefix to strip (Leave empty for default)"
                description: "Optional. The request header value prefix to strip"
                schema:
                  type: string
                  default: ""
              - variable: N8N_JWKS_URI
                label: "JWT Set URI (Leave empty for default)"
                description: "The URI to fetch JWK Set for JWT authentication"
                schema:
                  type: string
                  default: ""
              - variable: N8N_JWT_ISSUER
                label: "JWT Issuer (Leave empty for default)"
                description: "Optional. The expected JWT issuer"
                schema:
                  type: string
                  default: ""
              - variable: N8N_JWT_NAMESPACE
                label: "JWT Namespace (Leave empty for default)"
                description: "Optional. The expected JWT namespace"
                schema:
                  type: string
                  default: ""
              - variable: N8N_JWT_ALLOWED_TENANT
                label: "JWT Allowed Tenant (Leave empty for default)"
                description: "Optional. The allowed JWT tenant"
                schema:
                  type: string
                  default: ""
              - variable: N8N_JWT_ALLOWED_TENANT_KEY
                label: "JWT Allowed Tenant Key (Leave empty for default)"
                description: "Optional. The JWT tenant key name to inspect within the JWT namespace"
                schema:
                  type: string
                  default: ""
        - variable: N8N_AUTH_EXCLUDE_ENDPOINTS
          label: "Additional Endpoints to Exclude Auth Checks (Leave empty for default)"
          description: "Additional endpoints to exclude auth checks. Multiple endpoints can be provided separated by a colon (\":\"). The endpoints should not start with a forward slash (\"/\")"
          schema:
            type: string
            default: ""
  - variable: endpoints
    group: "App Configuration"
    label: "Endpoints"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: WEBHOOK_URL
          label: "Webhook URL"
          description: "Used to manually provide the Webhook URL when running n8n behind a reverse proxy"
          schema:
            type: string
            default: ""
        - variable: N8N_PAYLOAD_SIZE_MAX
          label: "Max Payload Size (Leave empty for default)"
          description: "The maximum payload size in MB"
          schema:
            type: int
        - variable: N8N_METRICS
          label: "Enable Metrics endpoint"
          description: "Whether to enable the metrics endpoint"
          schema:
            type: boolean
            default: false
            show_subquestions_if:
            subquestions:
              - variable: N8N_METRICS_PREFIX
                label: "Metrics Prefix (Leave empty for default)"
                description: "Optional prefix to be used for metrics names"
                schema:
                  type: string
                  default: ""
        - variable: N8N_ENDPOINT_REST
          label: "Rest Endpoint Path (Leave empty for default)"
          description: "The path used for REST endpoint"
          schema:
            type: string
            default: ""
        - variable: N8N_ENDPOINT_WEBHOOK
          label: "Webhook Endpoint Path (Leave empty for default)"
          description: "The path used for webhook endpoint"
          schema:
            type: string
            default: ""
        - variable: N8N_ENDPOINT_WEBHOOK_TEST
          label: "Test-Webhook Endpoint Path (Leave empty for default)"
          description: "The path used for test-webhook endpoin"
          schema:
            type: string
            default: ""
        - variable: N8N_ENDPOINT_WEBHOOK_WAIT
          label: "Waiting-Webhook Endpoint Path (Leave empty for default)"
          description: "The path used for waiting-webhook endpoint"
          schema:
            type: string
            default: ""
        - variable: N8N_DISABLE_PRODUCTION_MAIN_PROCESS
          label: "Disable Production Webhooks"
          description: "Disable production webhooks from main process. This helps ensures no HTTP traffic load to main process when using webhook-specific processes"
          schema:
            type: boolean
            default: false
        - variable: N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN
          label: "Deregister External Webhooks"
          description: "Deregister webhooks on external services only when workflows are deactivated"
          schema:
            type: boolean
            default: false
  - variable: credentials
    group: "App Configuration"
    label: "Credentials"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: CREDENTIALS_OVERWRITE_DATA
          label: "Credentials Overwrites (Leave empty for default)"
          description: "Overwrites for credentials"
          schema:
            type: string
            default: ""
        - variable: CREDENTIALS_OVERWRITE_ENDPOINT
          label: "Credentials Overwrite Endpoint (Leave empty for default)"
          description: "The API endpoint to fetch credentials"
          schema:
            type: string
            default: ""
        - variable: CREDENTIALS_DEFAULT_NAME
          label: "Credentials Default Name (Leave empty for default)"
          description: "The default name for credentials"
          schema:
            type: string
            default: ""
  - variable: logs
    group: "App Configuration"
    label: "Logs"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: N8N_LOG_LEVEL
          label: "Log Level"
          description: "Log output level"
          schema:
            type: string
            default: ""
            enum:
              - value: ""
                description: "Default"
              - value: "info"
                description: "Info"
              - value: "warn"
                description: "Warn"
              - value: "error"
                description: "Error"
              - value: "verbose"
                description: "Verbose"
              - value: "debug"
                description: "Debug"
        - variable: N8N_LOG_OUTPUT
          label: "Log Output"
          description: "Where to output logs"
          schema:
            type: string
            default: ""
            enum:
              - value: ""
                description: "Default"
              - value: "console"
                description: "Console"
              - value: "file"
                description: "File"
              - value: "console,file"
                description: "Console and File"
        - variable: N8N_LOG_FILE_COUNT_MAX
          label: "Max Log File Count (Leave empty for default)"
          description: "Max number of log files to keep"
          schema:
            type: int
        - variable: N8N_LOG_FILE_SIZE_MAX
          label: "Max Log File Size (Leave empty for default)"
          description: "Max size of each log file in MB"
          schema:
            type: int
  - variable: externalhooks
    group: "App Configuration"
    label: "External Hooks"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: EXTERNAL_HOOK_FILES
          label: "External Hook Files (Leave empty for default)"
          description: "Files containing external hooks. Provide multiple files as a colon-separated list ':'."
          schema:
            type: string
            default: ""
  - variable: usermanagement
    group: "App Configuration"
    label: "User Management and SMTP"
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: N8N_USER_MANAGEMENT_DISABLED
          label: "Disable User Management"
          description: "Set to true to disable the user management feature. Note that n8n ignores this environment variable if you have already set up an owner account."
          schema:
            type: boolean
            default: false
        - variable: N8N_EMAIL_MODE
          label: "Email Mode"
          description: "Enable emails."
          schema:
            type: string
            default: "smtp"
        - variable: N8N_SMTP_HOST
          label: "SMTP Host"
          description: "Your SMTP server name"
          schema:
            type: string
            default: ""
        - variable: N8N_SMTP_PORT
          label: "SMTP Port"
          description: "Your SMTP server port"
          schema:
            type: int
        - variable: N8N_SMTP_USER
          label: "SMTP User"
          description: "Your SMTP username"
          schema:
            type: string
            default: ""
        - variable: N8N_SMTP_PASS
          label: "SMTP Pass"
          description: "Your SMTP password"
          schema:
            type: string
            private: true
            default: ""
        - variable: N8N_SMTP_SENDER
          label: "SMTP Sender"
          description: "You can select the sender name from the sender addresses."
          schema:
            type: string
            default: ""
        - variable: N8N_SMTP_SSL
          label: "SMTP SSL"
          description: "Whether to use SSL for SMTP."
          schema:
            type: boolean
            default: true
        - variable: N8N_UM_EMAIL_TEMPLATES_INVITE
          label: "Invite Email Templates (Leave empty for default)"
          description: "Full path to your HTML email template. This overrides the default template for invite emails."
          schema:
            type: string
            default: ""
        - variable: N8N_UM_EMAIL_TEMPLATES_PWRESET
          label: "Password Reset Email Templates (Leave empty for default)"
          description: "Full path to your HTML email template. This overrides the default template for password reset emails."
          schema:
            type: string
            default: ""

# Include{containerConfig}
# Include{podOptions}
# Include{serviceRoot}
# Include{serviceMain}
# 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: 5678
                              required: true
# Include{serviceExpertRoot}
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
        - 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}
# 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 this App of the user running the application"
                schema:
                  type: int
                  default: 568
# Include{securityContextContainer}
# Include{securityContextAdvanced}
# Include{securityContextPod}
              - variable: fsGroup
                label: "fsGroup"
                description: "The group that should own ALL storage."
                schema:
                  type: int
                  default: 1000

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