categories:
- storage
labels:
  io.rancher.certified: experimental
namespace: longhorn-system
questions:
- variable: csi.attacherImage
  default:
  description: "Specify CSI attacher image. Leave blank to autodetect."
  type: string
  label: Longhorn CSI Attacher Image
  group: "Longhorn CSI Driver Settings"
- variable: csi.provisionerImage
  default:
  description: "Specify CSI provisioner image. Leave blank to autodetect."
  type: string
  label: Longhorn CSI Provisioner Image
  group: "Longhorn CSI Driver Settings"
- variable: csi.driverRegistrarImage
  default:
  description: "Specify CSI Driver Registrar image. Leave blank to autodetect."
  type: string
  label: Longhorn CSI Driver Registrar Image
  group: "Longhorn CSI Driver Settings"
- variable: csi.kubeletRootDir
  default:
  description: "Specify kubelet root-dir. Leave blank to autodetect."
  type: string
  label: Kubelet Root Directory
  group: "Longhorn CSI Driver Settings"
- variable: csi.attacherReplicaCount
  type: int
  default:
  min: 1
  max: 10
  description: "Specify replica count of CSI Attacher. By default 3."
  label: Longhorn CSI Attacher replica count
  group: "Longhorn CSI Driver Settings"
- variable: csi.provisionerReplicaCount
  type: int
  default:
  min: 1
  max: 10
  description: "Specify replica count of CSI Provisioner. By default 3."
  label: Longhorn CSI Provisioner replica count
  group: "Longhorn CSI Driver Settings"
- variable: persistence.defaultClass
  default: "true"
  description: "Set as default StorageClass"
  group: "Longhorn CSI Driver Settings"
  type: boolean
  required: true
  label: Default Storage Class
- variable: persistence.defaultClassReplicaCount
  description: "Set replica count for default StorageClass"
  group: "Longhorn CSI Driver Settings"
  type: int
  default: 3
  min: 1
  max: 10
  label: Default Storage Class Replica Count

- variable: defaultSettings.backupTarget
  label: Backup Target
  description: "The target used for backup. Support NFS or S3."
  group: "Longhorn Default Settings"
  type: string
  default:
- variable: defaultSettings.backupTargetCredentialSecret
  label: Backup Target Credential Secret
  description: "The Kubernetes secret associated with the backup target."
  group: "Longhorn Default Settings"
  type: string
  default:
- variable: defaultSettings.createDefaultDiskLabeledNodes
  label: Create Default Disk on Labeled Nodes
  description: 'Create default Disk automatically only on Nodes with the label "node.longhorn.io/create-default-disk=true" if no other Disks exist. If disabled, default Disk will be created on all new Nodes (only on first add). By default false.'
  group: "Longhorn Default Settings"
  type: boolean
  default: "false"
- variable: defaultSettings.defaultDataPath
  label: Default Data Path
  description: 'Default path to use for storing data on a host. By default "/var/lib/rancher/longhorn/"'
  group: "Longhorn Default Settings"
  type: string
  default: "/var/lib/rancher/longhorn/"
- variable: defaultSettings.replicaSoftAntiAffinity
  label: Replica Soft Anti-Affinity
  description: 'Allow scheduling on nodes with existing healthy replicas of the same volume. By default true.'
  group: "Longhorn Default Settings"
  type: boolean
  default: "true"
- variable: defaultSettings.storageOverProvisioningPercentage
  label: Storage Over Provisioning Percentage
  description: "The over-provisioning percentage defines how much storage can be allocated relative to the hard drive's capacity. By default 500."
  group: "Longhorn Default Settings"
  type: int
  min: 0
  default: 500
- variable: defaultSettings.storageMinimalAvailablePercentage
  label: Storage Minimal Available Percentage
  description: "If one disk's available capacity to it's maximum capacity in % is less than the minimal available percentage, the disk would become unschedulable until more space freed up. By default 10."
  group: "Longhorn Default Settings"
  type: int
  min: 0
  max: 100
  default: 10
- variable: defaultSettings.upgradeChecker
  label: Enable Upgrade Checker
  description: 'Upgrade Checker will check for new Longhorn version periodically. When there is a new version available, it will notify the user using UI. By default true.'
  group: "Longhorn Default Settings"
  type: boolean
  default: "true"
- variable: defaultSettings.defaultReplicaCount
  label: Default Replica Count
  description: "The default number of replicas when creating the volume from Longhorn UI. For Kubernetes, update the `numberOfReplicas` in the StorageClass. By default 3."
  group: "Longhorn Default Settings"
  type: int
  min: 1
  max: 20
  default: 3
- variable: defaultSettings.guaranteedEngineCPU
  label: Guaranteed Engine CPU
  description: '(EXPERIMENTAL FEATURE) Allow Longhorn Engine to have guaranteed CPU allocation. The value is how many CPUs should be reserved for each Engine/Replica Manager Pod created by Longhorn. For example, 0.1 means one-tenth of a CPU. This will help maintain engine stability during high node workload. It only applies to the Engine/Replica Manager Pods created after the setting took effect. WARNING: Attaching of the volume may fail or stuck while using this feature due to the resource constraint. Disabled ("0") by default.'
  group: "Longhorn Default Settings"
  type: float
  default: 0
- variable: defaultSettings.defaultLonghornStaticStorageClass
  label: Default Longhorn Static StorageClass Name
  description: "The 'storageClassName' is for PV/PVC when creating PV/PVC for an existing Longhorn volume. Notice that it's unnecessary for users create the related StorageClass object in Kubernetes since the StorageClass would only be used as matching labels for PVC bounding purpose. By default 'longhorn-static'."
  group: "Longhorn Default Settings"
  type: string
  default: "longhorn-static"
- variable: defaultSettings.backupstorePollInterval
  label: Backupstore Poll Interval
  description: "In seconds. The interval to poll the backup store for updating volumes' Last Backup field. By default 300."
  group: "Longhorn Default Settings"
  type: int
  min: 0
  default: 300
- variable: defaultSettings.taintToleration
  label: Kubernetes Taint Toleration
  description: "By setting tolerations for Longhorn then adding taints for the nodes, the nodes with large storage can be dedicated to Longhorn only (to store replica data) and reject other general workloads. Multiple tolerations can be set here, and these tolerations are separated by semicolon. For example, \"key1=value1:NoSchedule; key2:NoExecute\". Notice that \"kubernetes.io\" is used as the key of all Kubernetes default tolerations, please do not contain this substring in your toleration setting."
  group: "Longhorn Default Settings"
  type: string
  default: ""
- variable: ingress.enabled
  default: "false"
  description: "Expose app using Layer 7 Load Balancer - ingress"
  type: boolean
  group: "Services and Load Balancing"
  label: Expose app using Layer 7 Load Balancer
  show_subquestion_if: true
  subquestions:
  - variable: ingress.host
    default: "xip.io"
    description: "layer 7 Load Balancer hostname"
    type: hostname
    required: true
    label: Layer 7 Load Balancer Hostname
- variable: service.ui.type
  default: "Rancher-Proxy"
  description: "Define Longhorn UI service type"
  type: enum
  options:
    - "ClusterIP"
    - "NodePort"
    - "LoadBalancer"
    - "Rancher-Proxy"
  label: Longhorn UI Service
  show_if: "ingress.enabled=false"
  group: "Services and Load Balancing"
  show_subquestion_if: "NodePort"
  subquestions: 
  - variable: service.ui.nodePort
    default: ""
    description: "NodePort port number(to set explicitly, choose port between 30000-32767)"
    type: int
    min: 30000
    max: 32767
    show_if: "service.ui.type=NodePort||service.ui.type=LoadBalancer"
    label: UI Service NodePort number
