Skip to content

Commit

Permalink
Support replica auto-balance in chart
Browse files Browse the repository at this point in the history
longhorn#587

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang authored and innobead committed Jun 17, 2021
1 parent 5c3776b commit abe193a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions chart/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,26 @@ The available modes are:
group: "Longhorn Default Settings"
type: boolean
default: "false"
- variable: defaultSettings.replicaAutoBalance
label: Replica Auto Balance
description: 'Enable this setting automatically rebalances replicas when discovered an available node.
The available global options are:
- **disabled**. This is the default option. No replica auto-balance will be done.
- **least-effort**. This option instructs Longhorn to balance replicas for minimal redundancy.
- **best-effort**. This option instructs Longhorn to balance replicas for even redundancy.
Longhorn also support individual volume setting. The setting can be specified in volume.spec.replicaAutoBalance, this overrules the global setting.
The available volume spec options are:
- **ignored**. This is the default option that instructs Longhorn to inherit from the global setting.
- **disabled**. This option instructs Longhorn no replica auto-balance should be done.
- **least-effort**. This option instructs Longhorn to balance replicas for minimal redundancy.
- **best-effort**. This option instructs Longhorn to balance replicas for even redundancy.'
group: "Longhorn Default Settings"
type: enum
options:
- "disabled"
- "least-effort"
- "best-effort"
default: "disabled"
- 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 200."
Expand Down
1 change: 1 addition & 0 deletions chart/templates/default-setting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ data:
create-default-disk-labeled-nodes: {{ .Values.defaultSettings.createDefaultDiskLabeledNodes }}
default-data-path: {{ .Values.defaultSettings.defaultDataPath }}
replica-soft-anti-affinity: {{ .Values.defaultSettings.replicaSoftAntiAffinity }}
replica-auto-balance: {{ .Values.defaultSettings.replicaAutoBalance }}
storage-over-provisioning-percentage: {{ .Values.defaultSettings.storageOverProvisioningPercentage }}
storage-minimal-available-percentage: {{ .Values.defaultSettings.storageMinimalAvailablePercentage }}
upgrade-checker: {{ .Values.defaultSettings.upgradeChecker }}
Expand Down
1 change: 1 addition & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ defaultSettings:
defaultDataPath: ~
defaultDataLocality: ~
replicaSoftAntiAffinity: ~
replicaAutoBalance: ~
storageOverProvisioningPercentage: ~
storageMinimalAvailablePercentage: ~
upgradeChecker: ~
Expand Down

0 comments on commit abe193a

Please sign in to comment.