Skip to content

Commit a8eeffc

Browse files
committed
Futher LH configuration
1 parent 5450d3c commit a8eeffc

File tree

2 files changed

+29
-24
lines changed

2 files changed

+29
-24
lines changed

charts/longhorn/README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
# Exaplaining misc. questions regarding Longhorn (LH)
1+
# Longhorn (LH) Knowledge Base
2+
3+
### Can LH be used for critical services (e.g. Database)
4+
5+
As of now we shall avoid using LH for critical services. Instead we should refer to a more reliable and easy-to-maintain solution (e.g. Application-Level replication [Postgres Operators], S3, ...)
6+
7+
LH is using networking for keeping replicas in sync and IO-heavy workloads may overload it easily leading to unpredictable consequances. Before we manage to extensively monitor LH and scale properly on demand, we shall not use it for critical services or IO-heave services
28

39
### How does LH decide which node's disk to use as storage
410

5-
There are 3 ways (could be combined together) https://longhorn.io/kb/tip-only-use-storage-on-a-set-of-nodes/
6-
* storag tag feature https://longhorn.io/docs/1.8.1/nodes-and-volumes/nodes/storage-tags/
7-
* node selectors that will restrict LH to certain nodes only (and disks on these nodes)
8-
* using https://longhorn.io/docs/archives/1.2.2/references/settings/#create-default-disk-on-labeled-nodes
11+
It depends on configuration. There are 3 possibilities:
12+
* https://longhorn.io/kb/tip-only-use-storage-on-a-set-of-nodes/#deploy-longhorn-components-only-on-a-specific-set-of-nodes
913

10-
### Will LH pick up disks from a newly-added node
14+
### Will LH pick up storage from a newly-added node
1115

12-
Use 2 articles below to get detailed information
13-
* https://longhorn.io/kb/tip-only-use-storage-on-a-set-of-nodes/
14-
* https://longhorn.io/docs/1.8.1/nodes-and-volumes/nodes/default-disk-and-node-config/
16+
By default LH will use storage on all (newly created as well) Nodes where it runs. If `createDefaultDiskLabeledNodes` is configured, then it depends on label of the node
1517

16-
### Running LH on subset of Nodes (via nodeSelectors) has a limitation
18+
https://longhorn.io/kb/tip-only-use-storage-on-a-set-of-nodes/#deploy-longhorn-components-only-on-a-specific-set-of-nodes
1719

18-
The workloads that use PV (from LH) can only run on the nodes where LH runs. Check the Result description in the article below:
19-
* https://longhorn.io/kb/tip-only-use-storage-on-a-set-of-nodes/#deploy-longhorn-components-only-on-a-specific-set-of-nodes
20+
### Can workloads be run on nodes where there is no LH
21+
22+
They can as long as LH is not bound to specific nodes via `nodeSelector` or `systemManagedComponentsNodeSelector` settings. If LH is configure to run on specific nodes, then workloads can only be run on these nodes only.
23+
24+
Source: https://longhorn.io/kb/tip-only-use-storage-on-a-set-of-nodes/#deploy-longhorn-components-only-on-a-specific-set-of-nodes

charts/longhorn/values.yaml.gotmpl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,31 @@
22
# https://github.com/longhorn/longhorn/tree/v1.8.1/chart#values
33

44
global:
5-
# Warning: updating (after installation) will cause downtime
5+
# Warning: updating node selectors (after installation) will cause downtime
6+
# https://longhorn.io/docs/archives/1.2.2/advanced-resources/deploy/node-selector/#setting-up-node-selector-after-longhorn-has-been-installed
7+
#
8+
# Warning: using node selectors will restrict our workloads to the same nodes
9+
# https://longhorn.io/kb/tip-only-use-storage-on-a-set-of-nodes/#deploy-longhorn-components-only-on-a-specific-set-of-nodes
610
nodeSelector: {}
711
systemManagedComponentsNodeSelector: {}
812

913
defaultSettings:
1014
replicaAutoBalance: best-effort
1115

12-
# use dedicated folder (disk)
16+
# control on which nodes LH will use disks
17+
# use `node.longhorn.io/create-default-disk` node label for control
18+
createDefaultDiskLabeledNodes: true
19+
# use dedicated folder (disk) for storage
1320
defaultDataPath: /longhorn
1421

1522
# https://longhorn.io/docs/1.8.1/best-practices/#minimal-available-storage-and-over-provisioning
1623
storageMinimalAvailablePercentage: 10
1724

18-
# Prevent LH deletion. For deletion refer to https://longhorn.io/docs/1.8.1/deploy/uninstall/#prerequisite
25+
# Prevent LH deletion. Set to true if you want to delete LH
1926
deletingConfirmationFlag: false
2027

21-
# we rely on pre-configure disk that uses defaultDataPath
22-
# and node selectors to decide on which node to run LH and its storage
23-
createDefaultDiskLabeledNodes: false
28+
# let replicas to be scheduled on the same node
29+
replicaSoftAntiAffinity: false
2430

2531
persistence:
2632
# use only for non-critical ops workloads
@@ -33,12 +39,6 @@ persistence:
3339
defaultClassReplicaCount: 2
3440
defaultFsType: xfs
3541

36-
# Configure which disks are candidates for replica placement (i.e. storage of data)
37-
diskSelector: {}
38-
39-
# Configure which nodes are candidates for replica placement (i.e. storage of data)
40-
defaultNodeSelector: {}
41-
4242
resources: # https://longhorn.io/docs/1.8.1/best-practices/#minimum-recommended-hardware
4343
requests:
4444
cpu: 0.5

0 commit comments

Comments
 (0)