blob: 6167301fad67768f9d594005bd5d85f831218173 [file] [log] [blame]
gio16bb6382025-05-21 18:42:40 +04001# Longhorn Chart
2
3> **Important**: Please install the Longhorn chart in the `longhorn-system` namespace only.
4
5> **Warning**: Longhorn doesn't support downgrading from a higher version to a lower version.
6
7> **Note**: Use Helm 3 when installing and upgrading Longhorn. Helm 2 is [no longer supported](https://helm.sh/blog/helm-2-becomes-unsupported/).
8
9## Source Code
10
11Longhorn is 100% open source software. Project source code is spread across a number of repos:
12
131. Longhorn Engine -- Core controller/replica logic https://github.com/longhorn/longhorn-engine
142. Longhorn Instance Manager -- Controller/replica instance lifecycle management https://github.com/longhorn/longhorn-instance-manager
153. Longhorn Share Manager -- NFS provisioner that exposes Longhorn volumes as ReadWriteMany volumes. https://github.com/longhorn/longhorn-share-manager
164. Backing Image Manager -- Backing image file lifecycle management. https://github.com/longhorn/backing-image-manager
175. Longhorn Manager -- Longhorn orchestration, includes CSI driver for Kubernetes https://github.com/longhorn/longhorn-manager
186. Longhorn UI -- Dashboard https://github.com/longhorn/longhorn-ui
19
20## Prerequisites
21
221. A container runtime compatible with Kubernetes (Docker v1.13+, containerd v1.3.7+, etc.)
232. Kubernetes >= v1.21
243. Make sure `bash`, `curl`, `findmnt`, `grep`, `awk` and `blkid` has been installed in all nodes of the Kubernetes cluster.
254. Make sure `open-iscsi` has been installed, and the `iscsid` daemon is running on all nodes of the Kubernetes cluster. For GKE, recommended Ubuntu as guest OS image since it contains `open-iscsi` already.
26
27## Upgrading to Kubernetes v1.25+
28
29Starting in Kubernetes v1.25, [Pod Security Policies](https://kubernetes.io/docs/concepts/security/pod-security-policy/) have been removed from the Kubernetes API.
30
31As a result, **before upgrading to Kubernetes v1.25** (or on a fresh install in a Kubernetes v1.25+ cluster), users are expected to perform an in-place upgrade of this chart with `enablePSP` set to `false` if it has been previously set to `true`.
32
33> **Note:**
34> If you upgrade your cluster to Kubernetes v1.25+ before removing PSPs via a `helm upgrade` (even if you manually clean up resources), **it will leave the Helm release in a broken state within the cluster such that further Helm operations will not work (`helm uninstall`, `helm upgrade`, etc.).**
35>
36> If your charts get stuck in this state, you may have to clean up your Helm release secrets.
37Upon setting `enablePSP` to false, the chart will remove any PSP resources deployed on its behalf from the cluster. This is the default setting for this chart.
38
39As a replacement for PSPs, [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) should be used. Please consult the Longhorn docs for more details on how to configure your chart release namespaces to work with the new Pod Security Admission and apply Pod Security Standards.
40
41## Installation
42
431. Add Longhorn chart repository.
44```
45helm repo add longhorn https://charts.longhorn.io
46```
47
482. Update local Longhorn chart information from chart repository.
49```
50helm repo update
51```
52
533. Use the following commands to create the `longhorn-system` namespace first, then install the Longhorn chart.
54
55```
56kubectl create namespace longhorn-system
57helm install longhorn longhorn/longhorn --namespace longhorn-system
58```
59
60## Uninstallation
61
62```
63kubectl -n longhorn-system patch -p '{"value": "true"}' --type=merge lhs deleting-confirmation-flag
64helm uninstall longhorn -n longhorn-system
65kubectl delete namespace longhorn-system
66```
67
68## Values
69
70The `values.yaml` contains items used to tweak a deployment of this chart.
71
72### Cattle Settings
73
74| Key | Type | Default | Description |
75|-----|------|---------|-------------|
76{{- range .Values }}
77 {{- if hasPrefix "global" .Key }}
78| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
79 {{- end }}
80{{- end }}
81
82### Network Policies
83
84| Key | Type | Default | Description |
85|-----|------|---------|-------------|
86{{- range .Values }}
87 {{- if hasPrefix "networkPolicies" .Key }}
88| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
89 {{- end }}
90{{- end }}
91
92### Image Settings
93
94| Key | Type | Default | Description |
95|-----|------|---------|-------------|
96{{- range .Values }}
97 {{- if hasPrefix "image" .Key }}
98| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
99 {{- end }}
100{{- end }}
101
102### Service Settings
103
104| Key | Description |
105|-----|-------------|
106{{- range .Values }}
107 {{- if (and (hasPrefix "service" .Key) (not (contains "Account" .Key))) }}
108| {{ .Key }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
109 {{- end }}
110{{- end }}
111
112### StorageClass Settings
113
114| Key | Type | Default | Description |
115|-----|------|---------|-------------|
116{{- range .Values }}
117 {{- if hasPrefix "persistence" .Key }}
118| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
119 {{- end }}
120{{- end }}
121
122### CSI Settings
123
124| Key | Description |
125|-----|-------------|
126{{- range .Values }}
127 {{- if hasPrefix "csi" .Key }}
128| {{ .Key }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
129 {{- end }}
130{{- end }}
131
132### Longhorn Manager Settings
133
134Longhorn consists of user-deployed components (for example, Longhorn Manager, Longhorn Driver, and Longhorn UI) and system-managed components (for example, Instance Manager, Backing Image Manager, Share Manager, CSI Driver, and Engine Image). The following settings only apply to Longhorn Manager.
135
136| Key | Type | Default | Description |
137|-----|------|---------|-------------|
138{{- range .Values }}
139 {{- if hasPrefix "longhornManager" .Key }}
140| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
141 {{- end }}
142{{- end }}
143
144### Longhorn Driver Settings
145
146Longhorn consists of user-deployed components (for example, Longhorn Manager, Longhorn Driver, and Longhorn UI) and system-managed components (for example, Instance Manager, Backing Image Manager, Share Manager, CSI Driver, and Engine Image). The following settings only apply to Longhorn Driver.
147
148| Key | Type | Default | Description |
149|-----|------|---------|-------------|
150{{- range .Values }}
151 {{- if hasPrefix "longhornDriver" .Key }}
152| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
153 {{- end }}
154{{- end }}
155
156### Longhorn UI Settings
157
158Longhorn consists of user-deployed components (for example, Longhorn Manager, Longhorn Driver, and Longhorn UI) and system-managed components (for example, Instance Manager, Backing Image Manager, Share Manager, CSI Driver, and Engine Image). The following settings only apply to Longhorn UI.
159
160| Key | Type | Default | Description |
161|-----|------|---------|-------------|
162{{- range .Values }}
163 {{- if hasPrefix "longhornUI" .Key }}
164| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
165 {{- end }}
166{{- end }}
167
168### Ingress Settings
169
170| Key | Type | Default | Description |
171|-----|------|---------|-------------|
172{{- range .Values }}
173 {{- if hasPrefix "ingress" .Key }}
174| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
175 {{- end }}
176{{- end }}
177
178### Private Registry Settings
179
180You can install Longhorn in an air-gapped environment with a private registry. For more information, see the **Air Gap Installation** section of the [documentation](https://longhorn.io/docs).
181
182| Key | Description |
183|-----|-------------|
184{{- range .Values }}
185 {{- if hasPrefix "privateRegistry" .Key }}
186| {{ .Key }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
187 {{- end }}
188{{- end }}
189
190### Metrics Settings
191
192| Key | Type | Default | Description |
193|-----|------|---------|-------------|
194{{- range .Values }}
195 {{- if hasPrefix "metrics" .Key }}
196| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
197 {{- end }}
198{{- end }}
199
200### OS/Kubernetes Distro Settings
201
202#### OpenShift Settings
203
204For more details, see the [ocp-readme](https://github.com/longhorn/longhorn/blob/master/chart/ocp-readme.md).
205
206| Key | Type | Default | Description |
207|-----|------|---------|-------------|
208{{- range .Values }}
209 {{- if hasPrefix "openshift" .Key }}
210| {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
211 {{- end }}
212{{- end }}
213
214### Other Settings
215
216| Key | Default | Description |
217|-----|---------|-------------|
218{{- range .Values }}
219 {{- if not (or (hasPrefix "defaultSettings" .Key)
220 (hasPrefix "networkPolicies" .Key)
221 (hasPrefix "image" .Key)
222 (hasPrefix "service" .Key)
223 (hasPrefix "persistence" .Key)
224 (hasPrefix "csi" .Key)
225 (hasPrefix "longhornManager" .Key)
226 (hasPrefix "longhornDriver" .Key)
227 (hasPrefix "longhornUI" .Key)
228 (hasPrefix "privateRegistry" .Key)
229 (hasPrefix "ingress" .Key)
230 (hasPrefix "metrics" .Key)
231 (hasPrefix "openshift" .Key)
232 (hasPrefix "global" .Key)) }}
233| {{ .Key }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
234 {{- end }}
235{{- end }}
236
237### System Default Settings
238
239During installation, you can either allow Longhorn to use the default system settings or use specific flags to modify the default values. After installation, you can modify the settings using the Longhorn UI. For more information, see the **Settings Reference** section of the [documentation](https://longhorn.io/docs).
240
241| Key | Description |
242|-----|-------------|
243{{- range .Values }}
244 {{- if hasPrefix "defaultSettings" .Key }}
245| {{ .Key }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} |
246 {{- end }}
247{{- end }}
248
249---
250Please see [link](https://github.com/longhorn/longhorn) for more information.