Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added defaultDiskSelector to default storage class #162

Open
wants to merge 5 commits into
base: v1.6.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions charts/longhorn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ The `values.yaml` contains items used to tweak a deployment of this chart.
| persistence.defaultDataLocality | string | `"disabled"` | Data locality of the default Longhorn StorageClass. (Options: "disabled", "best-effort") |
| persistence.defaultFsType | string | `"ext4"` | Filesystem type of the default Longhorn StorageClass. |
| persistence.defaultMkfsParams | string | `""` | mkfs parameters of the default Longhorn StorageClass. |
| persistence.defaultDiskSelector.enable | bool | `false` | Setting that allows you to enable the disk selector for the default Longhorn StorageClass. |
| persistence.defaultDiskSelector.selector | string | `""` | Disk selector for the default Longhorn StorageClass. Longhorn uses only disks with the specified tags for storing volume data. (Examples: "nvme,sata") |
| persistence.defaultNodeSelector.enable | bool | `false` | Setting that allows you to enable the node selector for the default Longhorn StorageClass. |
| persistence.defaultNodeSelector.selector | string | `""` | Node selector for the default Longhorn StorageClass. Longhorn uses only nodes with the specified tags for storing volume data. (Examples: "storage,fast") |
| persistence.migratable | bool | `false` | Setting that allows you to enable live migration of a Longhorn volume from one node to another. |
Expand Down
16 changes: 15 additions & 1 deletion charts/longhorn/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,20 @@ questions:
group: "Longhorn Storage Class Settings"
type: string
default:
- variable: persistence.defaultDiskSelector.enable
description: "Setting that allows you to enable the disk selector for the default Longhorn StorageClass."
group: "Longhorn Storage Class Settings"
label: Enable Storage Class Disk Selector
type: boolean
default: false
show_subquestion_if: true
subquestions:
- variable: persistence.defaultDiskSelector.selector
label: Storage Class Disk Selector
description: 'Disk selector for the default Longhorn StorageClass. Longhorn uses only disks with the specified tags for storing volume data. (Examples: "nvme,sata")'
group: "Longhorn Storage Class Settings"
type: string
default:
- variable: persistence.defaultNodeSelector.enable
description: "Setting that allows you to enable the node selector for the default Longhorn StorageClass."
group: "Longhorn Storage Class Settings"
Expand Down Expand Up @@ -917,4 +931,4 @@ questions:
type: int
min: 1000
max: 8000
default: 1250
default: 1250
3 changes: 3 additions & 0 deletions charts/longhorn/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ data:
recurringJobSelector: '{{ .Values.persistence.recurringJobSelector.jobList }}'
{{- end }}
dataLocality: {{ .Values.persistence.defaultDataLocality | quote }}
{{- if .Values.persistence.defaultDiskSelector.enable }}
diskSelector: "{{ .Values.persistence.defaultDiskSelector.selector }}"
{{- end }}
{{- if .Values.persistence.defaultNodeSelector.enable }}
nodeSelector: "{{ .Values.persistence.defaultNodeSelector.selector }}"
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/longhorn/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ persistence:
dataSourceParameters: ~
# -- Expected SHA-512 checksum of a backing image used in a Longhorn StorageClass.
expectedChecksum: ~
defaultDiskSelector:
# -- Setting that allows you to enable the disk selector for the default Longhorn StorageClass.
enable: false
# -- Disk selector for the default Longhorn StorageClass. Longhorn uses only disks with the specified tags for storing volume data. (Examples: "nvme,sata")
selector: ""
defaultNodeSelector:
# -- Setting that allows you to enable the node selector for the default Longhorn StorageClass.
enable: false
Expand Down