longhorn: upgrade from 1.9.0 to 1.12.0 (with intermediate releases)
Change-Id: Ice8f4e8f7e073023ab274c83154d9368525f9231
diff --git a/charts/longhorn/templates/_helpers.tpl b/charts/longhorn/templates/_helpers.tpl
index 3fbc2ac..67afc97 100644
--- a/charts/longhorn/templates/_helpers.tpl
+++ b/charts/longhorn/templates/_helpers.tpl
@@ -40,15 +40,15 @@
{{- define "system_default_registry" -}}
{{- if .Values.global.cattle.systemDefaultRegistry -}}
-{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
+{{- .Values.global.cattle.systemDefaultRegistry -}}
{{- else -}}
-{{- "" -}}
+{{- "docker.io" -}}
{{- end -}}
{{- end -}}
{{- define "registry_url" -}}
{{- if .Values.privateRegistry.registryUrl -}}
-{{- printf "%s/" .Values.privateRegistry.registryUrl -}}
+{{- .Values.privateRegistry.registryUrl -}}
{{- else -}}
{{ include "system_default_registry" . }}
{{- end -}}
@@ -64,3 +64,28 @@
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}}
+
+{{- /*
+multiTypeSetting helper
+Input: any value (string, number, or map)
+Output: properly quoted YAML string
+*/ -}}
+{{- define "longhorn.multiTypeSetting" -}}
+ {{- $v := . -}}
+ {{- if kindIs "map" $v -}}
+ {{- $v | toJson | quote -}}
+ {{- else -}}
+ {{- $v | quote -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Optional timezone injection for all Longhorn workloads.
+When .Values.global.timezone is set, this snippet renders a TZ env var.
+*/}}
+{{- define "longhorn.timezoneEnv" -}}
+{{- if .Values.global.timezone }}
+- name: TZ
+ value: {{ .Values.global.timezone | quote }}
+{{- end }}
+{{- end -}}
diff --git a/charts/longhorn/templates/clusterrole.yaml b/charts/longhorn/templates/clusterrole.yaml
index 731e99d..8f57d2d 100644
--- a/charts/longhorn/templates/clusterrole.yaml
+++ b/charts/longhorn/templates/clusterrole.yaml
@@ -11,31 +11,37 @@
verbs:
- "*"
- apiGroups: [""]
- resources: ["pods", "events", "persistentvolumes", "persistentvolumeclaims", "persistentvolumeclaims/status", "nodes", "proxy/nodes", "pods/log", "secrets", "services", "endpoints", "configmaps", "serviceaccounts"]
+ resources: ["pods"]
+ verbs: ["get", "list", "watch", "delete", "deletecollection"]
+- apiGroups: [""]
+ resources: ["secrets", "services", "endpoints", "configmaps", "serviceaccounts", "pods/log"]
+ verbs: ["get", "list", "watch"]
+- apiGroups: [""]
+ resources: ["events", "persistentvolumes", "persistentvolumeclaims", "persistentvolumeclaims/status", "nodes"]
verbs: ["*"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list"]
- apiGroups: ["apps"]
- resources: ["daemonsets", "statefulsets", "deployments"]
- verbs: ["*"]
+ resources: ["daemonsets", "statefulsets", "deployments", "replicasets"]
+ verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["jobs", "cronjobs"]
- verbs: ["*"]
+ verbs: ["get", "list", "watch"]
- apiGroups: ["policy"]
- resources: ["poddisruptionbudgets", "podsecuritypolicies"]
- verbs: ["*"]
+ resources: ["poddisruptionbudgets"]
+ verbs: ["get", "list", "watch"]
- apiGroups: ["scheduling.k8s.io"]
resources: ["priorityclasses"]
verbs: ["watch", "list"]
- apiGroups: ["storage.k8s.io"]
- resources: ["storageclasses", "volumeattachments", "volumeattachments/status", "csinodes", "csidrivers"]
+ resources: ["storageclasses", "volumeattachments", "volumeattachments/status", "volumeattributesclasses", "csinodes", "csidrivers", "csistoragecapacities"]
verbs: ["*"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses", "volumesnapshots", "volumesnapshotcontents", "volumesnapshotcontents/status"]
verbs: ["*"]
- apiGroups: ["longhorn.io"]
- resources: ["volumes", "volumes/status", "engines", "engines/status", "replicas", "replicas/status", "settings", "settings/status",
+ resources: ["volumes", "volumes/status", "enginefrontends", "enginefrontends/status", "engines", "engines/status", "replicas", "replicas/status", "settings", "settings/status",
"engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status",
{{- if .Values.openshift.enabled }}
"engineimages/finalizers", "nodes/finalizers", "instancemanagers/finalizers",
@@ -49,7 +55,7 @@
verbs: ["*"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
- verbs: ["*"]
+ verbs: ["get", "list", "watch"]
- apiGroups: ["metrics.k8s.io"]
resources: ["pods", "nodes"]
verbs: ["get", "list"]
@@ -60,7 +66,13 @@
resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"]
verbs: ["get", "list", "create", "patch", "delete"]
- apiGroups: ["rbac.authorization.k8s.io"]
- resources: ["roles", "rolebindings", "clusterrolebindings", "clusterroles"]
+ resources: ["roles", "rolebindings"]
+ verbs: ["get", "list", "watch"]
+- apiGroups: ["discovery.k8s.io"]
+ resources: ["endpointslices"]
+ verbs: ["get", "list", "watch"]
+- apiGroups: ["rbac.authorization.k8s.io"]
+ resources: ["clusterrolebindings", "clusterroles"]
verbs: ["*"]
{{- if .Values.openshift.enabled }}
---
diff --git a/charts/longhorn/templates/crds.yaml b/charts/longhorn/templates/crds.yaml
index 73110b7..2ce4289 100644
--- a/charts/longhorn/templates/crds.yaml
+++ b/charts/longhorn/templates/crds.yaml
@@ -3,7 +3,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: backingimagedatasources.longhorn.io
@@ -19,62 +19,6 @@
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The current state of the pod used to provision the backing image
- file from source
- jsonPath: .status.currentState
- name: State
- type: string
- - description: The data source type
- jsonPath: .spec.sourceType
- name: SourceType
- type: string
- - description: The node the backing image file will be prepared on
- jsonPath: .spec.nodeID
- name: Node
- type: string
- - description: The disk the backing image file will be prepared on
- jsonPath: .spec.diskUUID
- name: DiskUUID
- type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 BackingImageDataSource is deprecated;
- use longhorn.io/v1beta2 BackingImageDataSource instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: BackingImageDataSource is where Longhorn stores backing image
- data source object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- description: The system generated UUID of the provisioned backing image file
jsonPath: .spec.uuid
name: UUID
@@ -192,7 +136,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: backingimagemanagers.longhorn.io
@@ -231,65 +175,6 @@
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 BackingImageManager is deprecated; use
- longhorn.io/v1beta2 BackingImageManager instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: BackingImageManager is where Longhorn stores backing image manager
- object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- - description: The current state of the manager
- jsonPath: .status.currentState
- name: State
- type: string
- - description: The image the manager pod will use
- jsonPath: .spec.image
- name: Image
- type: string
- - description: The node the manager is on
- jsonPath: .spec.nodeID
- name: Node
- type: string
- - description: The disk the manager is responsible for
- jsonPath: .spec.diskUUID
- name: DiskUUID
- type: string
- - description: The disk path the manager is using
- jsonPath: .spec.diskPath
- name: DiskPath
- type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
name: v1beta2
schema:
openAPIV3Schema:
@@ -388,23 +273,11 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: backingimages.longhorn.io
spec:
- conversion:
- strategy: Webhook
- webhook:
- clientConfig:
- service:
- name: longhorn-conversion-webhook
- namespace: {{ include "release_namespace" . }}
- path: /v1/webhook/conversion
- port: 9501
- conversionReviewVersions:
- - v1beta2
- - v1beta1
group: longhorn.io
names:
kind: BackingImage
@@ -416,48 +289,6 @@
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The backing image name
- jsonPath: .spec.image
- name: Image
- type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 BackingImage is deprecated; use longhorn.io/v1beta2
- BackingImage instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: BackingImage is where Longhorn stores backing image object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- description: The system generated UUID
jsonPath: .status.uuid
name: UUID
@@ -621,7 +452,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: backupbackingimages.longhorn.io
@@ -788,7 +619,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: backups.longhorn.io
@@ -816,61 +647,6 @@
jsonPath: .status.snapshotCreatedAt
name: SnapshotCreatedAt
type: string
- - description: The backup state
- jsonPath: .status.state
- name: State
- type: string
- - description: The backup last synced time
- jsonPath: .status.lastSyncedAt
- name: LastSyncedAt
- type: string
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 Backup is deprecated; use longhorn.io/v1beta2
- Backup instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: Backup is where Longhorn stores backup object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- - description: The snapshot name
- jsonPath: .status.snapshotName
- name: SnapshotName
- type: string
- - description: The snapshot size
- jsonPath: .status.size
- name: SnapshotSize
- type: string
- - description: The snapshot creation time
- jsonPath: .status.snapshotCreatedAt
- name: SnapshotCreatedAt
- type: string
- description: The backup target name
jsonPath: .status.backupTargetName
name: BackupTarget
@@ -908,6 +684,15 @@
spec:
description: BackupSpec defines the desired state of the Longhorn backup
properties:
+ backupBlockSize:
+ description: The backup block size. 0 means the legacy default size
+ 2MiB, and -1 indicate the block size is invalid.
+ enum:
+ - "-1"
+ - "2097152"
+ - "16777216"
+ format: int64
+ type: string
backupMode:
description: |-
The backup mode of this backup.
@@ -915,7 +700,6 @@
enum:
- full
- incremental
- - ""
type: string
labels:
additionalProperties:
@@ -1021,23 +805,11 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: backuptargets.longhorn.io
spec:
- conversion:
- strategy: Webhook
- webhook:
- clientConfig:
- service:
- name: longhorn-conversion-webhook
- namespace: {{ include "release_namespace" . }}
- path: /v1/webhook/conversion
- port: 9501
- conversionReviewVersions:
- - v1beta2
- - v1beta1
group: longhorn.io
names:
kind: BackupTarget
@@ -1069,61 +841,6 @@
jsonPath: .status.lastSyncedAt
name: LastSyncedAt
type: string
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 BackupTarget is deprecated; use longhorn.io/v1beta2
- BackupTarget instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: BackupTarget is where Longhorn stores backup target object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- - description: The backup target URL
- jsonPath: .spec.backupTargetURL
- name: URL
- type: string
- - description: The backup target credential secret
- jsonPath: .spec.credentialSecret
- name: Credential
- type: string
- - description: The backup target poll interval
- jsonPath: .spec.pollInterval
- name: LastBackupAt
- type: string
- - description: Indicate whether the backup target is available or not
- jsonPath: .status.available
- name: Available
- type: boolean
- - description: The backup target last synced time
- jsonPath: .status.lastSyncedAt
- name: LastSyncedAt
- type: string
name: v1beta2
schema:
openAPIV3Schema:
@@ -1225,7 +942,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: backupvolumes.longhorn.io
@@ -1241,57 +958,6 @@
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The backup volume creation time
- jsonPath: .status.createdAt
- name: CreatedAt
- type: string
- - description: The backup volume last backup name
- jsonPath: .status.lastBackupName
- name: LastBackupName
- type: string
- - description: The backup volume last backup time
- jsonPath: .status.lastBackupAt
- name: LastBackupAt
- type: string
- - description: The backup volume last synced time
- jsonPath: .status.lastSyncedAt
- name: LastSyncedAt
- type: string
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 BackupVolume is deprecated; use longhorn.io/v1beta2
- BackupVolume instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: BackupVolume is where Longhorn stores backup volume object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- description: The backup target name
jsonPath: .spec.backupTargetName
name: BackupTarget
@@ -1418,61 +1084,46 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
- name: engineimages.longhorn.io
+ name: enginefrontends.longhorn.io
spec:
- conversion:
- strategy: Webhook
- webhook:
- clientConfig:
- service:
- name: longhorn-conversion-webhook
- namespace: {{ include "release_namespace" . }}
- path: /v1/webhook/conversion
- port: 9501
- conversionReviewVersions:
- - v1beta2
- - v1beta1
group: longhorn.io
names:
- kind: EngineImage
- listKind: EngineImageList
- plural: engineimages
+ kind: EngineFrontend
+ listKind: EngineFrontendList
+ plural: enginefrontends
shortNames:
- - lhei
- singular: engineimage
- preserveUnknownFields: false
+ - lhef
+ singular: enginefrontend
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: State of the engine image
- jsonPath: .status.state
+ - description: The data engine of the engine frontend
+ jsonPath: .spec.dataEngine
+ name: Data Engine
+ type: string
+ - description: The current state of the engine frontend
+ jsonPath: .status.currentState
name: State
type: string
- - description: The Longhorn engine image
- jsonPath: .spec.image
- name: Image
+ - description: The node that the engine frontend is on
+ jsonPath: .spec.nodeID
+ name: Node
type: string
- - description: Number of resources using the engine image
- jsonPath: .status.refCount
- name: RefCount
- type: integer
- - description: The build date of the engine image
- jsonPath: .status.buildDate
- name: BuildDate
- type: date
+ - description: The instance manager of the engine frontend
+ jsonPath: .status.instanceManagerName
+ name: InstanceManager
+ type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 EngineImage is deprecated; use longhorn.io/v1beta2
- EngineImage instead
- name: v1beta1
+ name: v1beta2
schema:
openAPIV3Schema:
- description: EngineImage is where Longhorn stores engine image object.
+ description: EngineFrontend is where Longhorn stores engine frontend object
+ for v2 data engine initiator.
properties:
apiVersion:
description: |-
@@ -1492,14 +1143,200 @@
metadata:
type: object
spec:
- x-kubernetes-preserve-unknown-fields: true
+ description: EngineFrontendSpec defines the desired state of the Longhorn
+ engine frontend (v2 initiator)
+ properties:
+ active:
+ type: boolean
+ dataEngine:
+ enum:
+ - v1
+ - v2
+ type: string
+ desireState:
+ type: string
+ disableFrontend:
+ type: boolean
+ engineName:
+ description: EngineName is the name of the v2 engine target (required
+ for EngineFrontend instance creation)
+ type: string
+ frontend:
+ enum:
+ - blockdev
+ - iscsi
+ - nvmf
+ - ublk
+ - ""
+ type: string
+ image:
+ type: string
+ logRequested:
+ type: boolean
+ nodeID:
+ type: string
+ salvageRequested:
+ type: boolean
+ size:
+ description: |-
+ Size is the desired size of the frontend device in bytes, as requested
+ by the volume owner. The EngineFrontend controller drives the frontend
+ device toward this size independently of the engine's target size.
+ format: int64
+ type: string
+ targetIP:
+ description: TargetIP is the IP address of the v2 engine target
+ type: string
+ targetPort:
+ description: TargetPort is the port of the v2 engine target
+ type: integer
+ ublkNumberOfQueue:
+ description: ublkNumberOfQueue controls the number of queues for ublk
+ frontend.
+ type: integer
+ ublkQueueDepth:
+ description: ublkQueueDepth controls the depth of each queue for ublk
+ frontend.
+ type: integer
+ volumeName:
+ type: string
+ volumeSize:
+ format: int64
+ type: string
+ type: object
status:
- x-kubernetes-preserve-unknown-fields: true
+ description: EngineFrontendStatus defines the observed state of the Longhorn
+ engine frontend
+ properties:
+ activePath:
+ description: ActivePath is the currently active frontend path address.
+ type: string
+ conditions:
+ items:
+ properties:
+ lastProbeTime:
+ description: Last time we probed the condition.
+ type: string
+ lastTransitionTime:
+ description: Last time the condition transitioned from one status
+ to another.
+ type: string
+ message:
+ description: Human-readable message indicating details about
+ last transition.
+ type: string
+ reason:
+ description: Unique, one-word, CamelCase reason for the condition's
+ last transition.
+ type: string
+ status:
+ description: |-
+ Status is the status of the condition.
+ Can be True, False, Unknown.
+ type: string
+ type:
+ description: Type is the type of the condition.
+ type: string
+ type: object
+ nullable: true
+ type: array
+ currentImage:
+ type: string
+ currentSize:
+ description: |-
+ CurrentSize is the current size of the frontend device in bytes, as
+ observed from the data plane. It is 0 while the engine frontend is not
+ running.
+ format: int64
+ type: string
+ currentState:
+ type: string
+ endpoint:
+ description: Endpoint is the initiator endpoint (e.g., /dev/longhorn/vol-name)
+ type: string
+ instanceManagerName:
+ type: string
+ ip:
+ type: string
+ logFetched:
+ type: boolean
+ ownerID:
+ type: string
+ paths:
+ description: Paths describes the currently known frontend multipath
+ state.
+ items:
+ properties:
+ anaState:
+ type: string
+ engineName:
+ type: string
+ nguid:
+ type: string
+ nqn:
+ type: string
+ targetIP:
+ type: string
+ targetPort:
+ type: integer
+ type: object
+ type: array
+ port:
+ type: integer
+ preferredPath:
+ description: PreferredPath is the preferred frontend path address.
+ type: string
+ salvageExecuted:
+ type: boolean
+ started:
+ type: boolean
+ starting:
+ type: boolean
+ storageIP:
+ type: string
+ switchoverPhase:
+ description: SwitchoverPhase is the last completed switchover phase
+ reported by the data plane.
+ type: string
+ targetIP:
+ description: TargetIP is the currently connected IP address of the
+ v2 engine target
+ type: string
+ targetPort:
+ description: TargetPort is the currently connected port of the v2
+ engine target
+ type: integer
+ ublkID:
+ format: int32
+ type: integer
+ uuid:
+ type: string
+ type: object
type: object
- served: false
- storage: false
+ served: true
+ storage: true
subresources:
status: {}
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.19.0
+ labels: {{- include "longhorn.labels" . | nindent 4 }}
+ longhorn-manager: ""
+ name: engineimages.longhorn.io
+spec:
+ group: longhorn.io
+ names:
+ kind: EngineImage
+ listKind: EngineImageList
+ plural: engineimages
+ shortNames:
+ - lhei
+ singular: engineimage
+ scope: Namespaced
+ versions:
- additionalPrinterColumns:
- description: Compatibility of the engine image
jsonPath: .status.incompatible
@@ -1633,7 +1470,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: engines.longhorn.io
@@ -1646,64 +1483,9 @@
shortNames:
- lhe
singular: engine
- preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The current state of the engine
- jsonPath: .status.currentState
- name: State
- type: string
- - description: The node that the engine is on
- jsonPath: .spec.nodeID
- name: Node
- type: string
- - description: The instance manager of the engine
- jsonPath: .status.instanceManagerName
- name: InstanceManager
- type: string
- - description: The current image of the engine
- jsonPath: .status.currentImage
- name: Image
- type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 Engine is deprecated; use longhorn.io/v1beta2
- Engine instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: Engine is where Longhorn stores engine object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- description: The data engine of the engine
jsonPath: .spec.dataEngine
name: Data Engine
@@ -1779,6 +1561,14 @@
type: boolean
nodeID:
type: string
+ rebuildConcurrentSyncLimit:
+ description: |-
+ RebuildConcurrentSyncLimit controls the maximum number of file synchronization operations that can run
+ concurrently during a single replica rebuild.
+ It is determined by the global setting or the volume spec field with the same name.
+ maximum: 5
+ minimum: 0
+ type: integer
replicaAddressMap:
additionalProperties:
type: string
@@ -1796,6 +1586,14 @@
snapshotMaxSize:
format: int64
type: string
+ ublkNumberOfQueue:
+ description: ublkNumberOfQueue controls the number of queues for ublk
+ frontend.
+ type: integer
+ ublkQueueDepth:
+ description: ublkQueueDepth controls the depth of each queue for ublk
+ frontend.
+ type: integer
unmapMarkSnapChainRemovedEnabled:
type: boolean
upgradedReplicaAddressMap:
@@ -1922,13 +1720,29 @@
type: object
nullable: true
type: object
+ rebuildConcurrentSyncLimit:
+ description: |-
+ RebuildConcurrentSyncLimit controls the maximum number of file synchronization operations that can run
+ concurrently during a single replica rebuild.
+ It is determined by the global setting or the volume spec field with the same name.
+ minimum: 0
+ type: integer
rebuildStatus:
additionalProperties:
properties:
+ appliedRebuildingMBps:
+ format: int64
+ type: integer
error:
type: string
fromReplicaAddress:
+ description: Deprecated. We are now using FromReplicaAddressList
+ to list all source replicas.
type: string
+ fromReplicaAddressList:
+ items:
+ type: string
+ type: array
isRebuilding:
type: boolean
progress:
@@ -2012,6 +1826,8 @@
type: string
started:
type: boolean
+ starting:
+ type: boolean
storageIP:
type: string
ublkID:
@@ -2032,7 +1848,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: instancemanagers.longhorn.io
@@ -2045,60 +1861,9 @@
shortNames:
- lhim
singular: instancemanager
- preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The state of the instance manager
- jsonPath: .status.currentState
- name: State
- type: string
- - description: The type of the instance manager (engine or replica)
- jsonPath: .spec.type
- name: Type
- type: string
- - description: The node that the instance manager is running on
- jsonPath: .spec.nodeID
- name: Node
- type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 InstanceManager is deprecated; use longhorn.io/v1beta2
- InstanceManager instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: InstanceManager is where Longhorn stores instance manager object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- description: The data engine of the instance manager
jsonPath: .spec.dataEngine
name: Data Engine
@@ -2196,6 +1961,35 @@
type: object
nullable: true
type: object
+ conditions:
+ items:
+ properties:
+ lastProbeTime:
+ description: Last time we probed the condition.
+ type: string
+ lastTransitionTime:
+ description: Last time the condition transitioned from one status
+ to another.
+ type: string
+ message:
+ description: Human-readable message indicating details about
+ last transition.
+ type: string
+ reason:
+ description: Unique, one-word, CamelCase reason for the condition's
+ last transition.
+ type: string
+ status:
+ description: |-
+ Status is the status of the condition.
+ Can be True, False, Unknown.
+ type: string
+ type:
+ description: Type is the type of the condition.
+ type: string
+ type: object
+ nullable: true
+ type: array
currentState:
type: string
dataEngineStatus:
@@ -2204,8 +1998,92 @@
properties:
cpuMask:
type: string
+ interruptModeEnabled:
+ description: |-
+ InterruptModeEnabled indicates whether the V2 data engine is running in
+ interrupt mode (true) or polling mode (false). Set by Longhorn manager;
+ read-only to users.
+ enum:
+ - ""
+ - "true"
+ - "false"
+ type: string
type: object
type: object
+ instanceEngineFrontends:
+ additionalProperties:
+ properties:
+ spec:
+ properties:
+ dataEngine:
+ type: string
+ name:
+ type: string
+ type: object
+ status:
+ properties:
+ activePath:
+ type: string
+ conditions:
+ additionalProperties:
+ type: boolean
+ nullable: true
+ type: object
+ endpoint:
+ type: string
+ errorMsg:
+ type: string
+ frontend:
+ type: string
+ listen:
+ type: string
+ paths:
+ items:
+ properties:
+ anaState:
+ type: string
+ engineName:
+ type: string
+ nguid:
+ type: string
+ nqn:
+ type: string
+ targetIP:
+ type: string
+ targetPort:
+ type: integer
+ type: object
+ type: array
+ portEnd:
+ format: int32
+ type: integer
+ portStart:
+ format: int32
+ type: integer
+ preferredPath:
+ type: string
+ resourceVersion:
+ format: int64
+ type: integer
+ state:
+ type: string
+ targetPortEnd:
+ format: int32
+ type: integer
+ targetPortStart:
+ format: int32
+ type: integer
+ type:
+ type: string
+ ublkID:
+ format: int32
+ type: integer
+ uuid:
+ type: string
+ type: object
+ type: object
+ nullable: true
+ type: object
instanceEngines:
additionalProperties:
properties:
@@ -2218,6 +2096,8 @@
type: object
status:
properties:
+ activePath:
+ type: string
conditions:
additionalProperties:
type: boolean
@@ -2227,14 +2107,35 @@
type: string
errorMsg:
type: string
+ frontend:
+ type: string
listen:
type: string
+ paths:
+ items:
+ properties:
+ anaState:
+ type: string
+ engineName:
+ type: string
+ nguid:
+ type: string
+ nqn:
+ type: string
+ targetIP:
+ type: string
+ targetPort:
+ type: integer
+ type: object
+ type: array
portEnd:
format: int32
type: integer
portStart:
format: int32
type: integer
+ preferredPath:
+ type: string
resourceVersion:
format: int64
type: integer
@@ -2269,6 +2170,8 @@
type: object
status:
properties:
+ activePath:
+ type: string
conditions:
additionalProperties:
type: boolean
@@ -2278,14 +2181,35 @@
type: string
errorMsg:
type: string
+ frontend:
+ type: string
listen:
type: string
+ paths:
+ items:
+ properties:
+ anaState:
+ type: string
+ engineName:
+ type: string
+ nguid:
+ type: string
+ nqn:
+ type: string
+ targetIP:
+ type: string
+ targetPort:
+ type: integer
+ type: object
+ type: array
portEnd:
format: int32
type: integer
portStart:
format: int32
type: integer
+ preferredPath:
+ type: string
resourceVersion:
format: int64
type: integer
@@ -2308,58 +2232,6 @@
type: object
nullable: true
type: object
- instances:
- additionalProperties:
- properties:
- spec:
- properties:
- dataEngine:
- type: string
- name:
- type: string
- type: object
- status:
- properties:
- conditions:
- additionalProperties:
- type: boolean
- nullable: true
- type: object
- endpoint:
- type: string
- errorMsg:
- type: string
- listen:
- type: string
- portEnd:
- format: int32
- type: integer
- portStart:
- format: int32
- type: integer
- resourceVersion:
- format: int64
- type: integer
- state:
- type: string
- targetPortEnd:
- format: int32
- type: integer
- targetPortStart:
- format: int32
- type: integer
- type:
- type: string
- ublkID:
- format: int32
- type: integer
- uuid:
- type: string
- type: object
- type: object
- description: 'Deprecated: Replaced by InstanceEngines and InstanceReplicas'
- nullable: true
- type: object
ip:
type: string
ownerID:
@@ -2379,23 +2251,11 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: nodes.longhorn.io
spec:
- conversion:
- strategy: Webhook
- webhook:
- clientConfig:
- service:
- name: longhorn-conversion-webhook
- namespace: {{ include "release_namespace" . }}
- path: /v1/webhook/conversion
- port: 9501
- conversionReviewVersions:
- - v1beta2
- - v1beta1
group: longhorn.io
names:
kind: Node
@@ -2404,62 +2264,10 @@
shortNames:
- lhn
singular: node
- preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Indicate whether the node is ready
- jsonPath: .status.conditions['Ready']['status']
- name: Ready
- type: string
- - description: Indicate whether the user disabled/enabled replica scheduling for
- the node
- jsonPath: .spec.allowScheduling
- name: AllowScheduling
- type: boolean
- - description: Indicate whether Longhorn can schedule replicas on the node
- jsonPath: .status.conditions['Schedulable']['status']
- name: Schedulable
- type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 Node is deprecated; use longhorn.io/v1beta2
- Node instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: Node is where Longhorn stores Longhorn node object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- - description: Indicate whether the node is ready
jsonPath: .status.conditions[?(@.type=='Ready')].status
name: Ready
type: string
@@ -2512,6 +2320,7 @@
- ""
- auto
- aio
+ - nvme
type: string
diskType:
enum:
@@ -2620,6 +2429,63 @@
type: string
filesystemType:
type: string
+ healthData:
+ additionalProperties:
+ properties:
+ attributes:
+ items:
+ properties:
+ id:
+ type: integer
+ name:
+ type: string
+ rawString:
+ type: string
+ rawValue:
+ format: int64
+ type: integer
+ threshold:
+ type: integer
+ value:
+ type: integer
+ whenFailed:
+ type: string
+ worst:
+ type: integer
+ type: object
+ type: array
+ capacity:
+ format: int64
+ type: integer
+ diskName:
+ type: string
+ diskType:
+ type: string
+ firmwareVersion:
+ type: string
+ healthStatus:
+ enum:
+ - FAILED
+ - PASSED
+ - UNKNOWN
+ - WARNING
+ type: string
+ modelName:
+ type: string
+ serialNumber:
+ type: string
+ source:
+ enum:
+ - SMART
+ - SPDK
+ type: string
+ temperature:
+ type: integer
+ type: object
+ type: object
+ healthDataLastCollectedAt:
+ format: date-time
+ type: string
instanceManagerName:
type: string
scheduledBackingImage:
@@ -2667,7 +2533,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: orphans.longhorn.io
@@ -2786,7 +2652,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: recurringjobs.longhorn.io
@@ -2807,69 +2673,6 @@
jsonPath: .spec.groups
name: Groups
type: string
- - description: Should be one of "backup" or "snapshot"
- jsonPath: .spec.task
- name: Task
- type: string
- - description: The cron expression represents recurring job scheduling
- jsonPath: .spec.cron
- name: Cron
- type: string
- - description: The number of snapshots/backups to keep for the volume
- jsonPath: .spec.retain
- name: Retain
- type: integer
- - description: The concurrent job to run by each cron job
- jsonPath: .spec.concurrency
- name: Concurrency
- type: integer
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- - description: Specify the labels
- jsonPath: .spec.labels
- name: Labels
- type: string
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 RecurringJob is deprecated; use longhorn.io/v1beta2
- RecurringJob instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: RecurringJob is where Longhorn stores recurring job object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- - description: Sets groupings to the jobs. When set to "default" group will be
- added to the volume label when no other job label exist in volume
- jsonPath: .spec.groups
- name: Groups
- type: string
- description: Should be one of "snapshot", "snapshot-force-create", "snapshot-cleanup",
"snapshot-delete", "backup", "backup-force-create", "filesystem-trim" or "system-backup"
jsonPath: .spec.task
@@ -2986,7 +2789,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: replicas.longhorn.io
@@ -2999,68 +2802,9 @@
shortNames:
- lhr
singular: replica
- preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The current state of the replica
- jsonPath: .status.currentState
- name: State
- type: string
- - description: The node that the replica is on
- jsonPath: .spec.nodeID
- name: Node
- type: string
- - description: The disk that the replica is on
- jsonPath: .spec.diskID
- name: Disk
- type: string
- - description: The instance manager of the replica
- jsonPath: .status.instanceManagerName
- name: InstanceManager
- type: string
- - description: The current image of the replica
- jsonPath: .status.currentImage
- name: Image
- type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 Replica is deprecated; use longhorn.io/v1beta2
- Replica instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: Replica is where Longhorn stores replica object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- description: The data engine of the replica
jsonPath: .spec.dataEngine
name: Data Engine
@@ -3238,9 +2982,6 @@
type: string
currentState:
type: string
- evictionRequested:
- description: 'Deprecated: Replaced by field `spec.evictionRequested`.'
- type: boolean
instanceManagerName:
type: string
ip:
@@ -3255,6 +2996,8 @@
type: boolean
started:
type: boolean
+ starting:
+ type: boolean
storageIP:
type: string
ublkID:
@@ -3273,7 +3016,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: settings.longhorn.io
@@ -3286,7 +3029,6 @@
shortNames:
- lhs
singular: setting
- preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
@@ -3294,48 +3036,6 @@
jsonPath: .value
name: Value
type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 Setting is deprecated; use longhorn.io/v1beta2
- Setting instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: Setting is where Longhorn stores setting object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- value:
- type: string
- required:
- - value
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- - description: The value of the setting
- jsonPath: .value
- name: Value
- type: string
- description: The setting is applied
jsonPath: .status.applied
name: Applied
@@ -3375,7 +3075,10 @@
- applied
type: object
value:
- description: The value of the setting.
+ description: |-
+ The value of the setting.
+ - It can be a non-JSON formatted string that is applied to all the applicable data engines listed in the setting definition.
+ - It can be a JSON formatted string that contains values for applicable data engines listed in the setting definition's Default.
type: string
required:
- value
@@ -3389,7 +3092,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: sharemanagers.longhorn.io
@@ -3413,51 +3116,9 @@
jsonPath: .status.ownerID
name: Node
type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 ShareManager is deprecated; use longhorn.io/v1beta2
- ShareManager instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: ShareManager is where Longhorn stores share manager object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- - description: The state of the share manager
- jsonPath: .status.state
- name: State
- type: string
- - description: The node that the share manager is owned by
- jsonPath: .status.ownerID
- name: Node
+ - description: The current image of the share manager
+ jsonPath: .status.currentImage
+ name: Image
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
@@ -3497,6 +3158,9 @@
description: ShareManagerStatus defines the observed state of the Longhorn
share manager
properties:
+ currentImage:
+ description: The image currently used by the share manager pod
+ type: string
endpoint:
description: NFS endpoint that can access the mounted filesystem of
the volume
@@ -3519,7 +3183,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: snapshots.longhorn.io
@@ -3607,6 +3271,11 @@
properties:
checksum:
type: string
+ checksumCalculatedAt:
+ description: |-
+ ChecksumCalculatedAt is the RFC3339 timestamp indicating when the checksum
+ for this snapshot was last calculated or updated.
+ type: string
children:
additionalProperties:
type: boolean
@@ -3629,6 +3298,8 @@
type: string
readyToUse:
type: boolean
+ requestedTime:
+ type: string
restoreSize:
format: int64
type: integer
@@ -3648,7 +3319,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: supportbundles.longhorn.io
@@ -3779,7 +3450,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: systembackups.longhorn.io
@@ -3916,7 +3587,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: systemrestores.longhorn.io
@@ -4025,7 +3696,7 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: volumeattachments.longhorn.io
@@ -4169,23 +3840,11 @@
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.17.1
+ controller-gen.kubebuilder.io/version: v0.19.0
labels: {{- include "longhorn.labels" . | nindent 4 }}
longhorn-manager: ""
name: volumes.longhorn.io
spec:
- conversion:
- strategy: Webhook
- webhook:
- clientConfig:
- service:
- name: longhorn-conversion-webhook
- namespace: {{ include "release_namespace" . }}
- path: /v1/webhook/conversion
- port: 9501
- conversionReviewVersions:
- - v1beta2
- - v1beta1
group: longhorn.io
names:
kind: Volume
@@ -4194,68 +3853,9 @@
shortNames:
- lhv
singular: volume
- preserveUnknownFields: false
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The state of the volume
- jsonPath: .status.state
- name: State
- type: string
- - description: The robustness of the volume
- jsonPath: .status.robustness
- name: Robustness
- type: string
- - description: The scheduled condition of the volume
- jsonPath: .status.conditions['scheduled']['status']
- name: Scheduled
- type: string
- - description: The size of the volume
- jsonPath: .spec.size
- name: Size
- type: string
- - description: The node that the volume is currently attaching to
- jsonPath: .status.currentNodeID
- name: Node
- type: string
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: longhorn.io/v1beta1 Volume is deprecated; use longhorn.io/v1beta2
- Volume instead
- name: v1beta1
- schema:
- openAPIV3Schema:
- description: Volume is where Longhorn stores volume object.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- x-kubernetes-preserve-unknown-fields: true
- status:
- x-kubernetes-preserve-unknown-fields: true
- type: object
- served: false
- storage: false
- subresources:
- status: {}
- - additionalPrinterColumns:
- description: The data engine of the volume
jsonPath: .spec.dataEngine
name: Data Engine
@@ -4280,6 +3880,11 @@
jsonPath: .status.currentNodeID
name: Node
type: string
+ - description: The engine switchover state
+ jsonPath: .status.switchoverState
+ name: Switchover
+ priority: 1
+ type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
@@ -4313,10 +3918,22 @@
accessMode:
enum:
- rwo
+ - rwop
- rwx
type: string
backingImage:
type: string
+ x-kubernetes-validations:
+ - message: BackingImage is immutable
+ rule: self == oldSelf
+ backupBlockSize:
+ description: BackupBlockSize indicate the block size to create backups.
+ The block size is immutable.
+ enum:
+ - "2097152"
+ - "16777216"
+ format: int64
+ type: string
backupCompressionMethod:
enum:
- none
@@ -4327,6 +3944,12 @@
description: The backup target name that the volume will be backed
up to or is synced.
type: string
+ cloneMode:
+ enum:
+ - ""
+ - full-copy
+ - linked-clone
+ type: string
dataEngine:
enum:
- v1
@@ -4348,6 +3971,14 @@
type: array
encrypted:
type: boolean
+ x-kubernetes-validations:
+ - message: Encrypted is immutable
+ rule: self == oldSelf
+ engineNodeID:
+ description: |-
+ engineNodeID defines the node where the backend engine (target) runs.
+ If empty, falls back to NodeID.
+ type: string
freezeFilesystemForSnapshot:
description: Setting that freezes the filesystem on the root partition
before a snapshot is created.
@@ -4375,6 +4006,8 @@
migrationNodeID:
type: string
nodeID:
+ description: nodeID defines the node where the volume is attached
+ (where the frontend initiator runs).
type: string
nodeSelector:
items:
@@ -4393,6 +4026,14 @@
- disabled
- enabled
type: string
+ rebuildConcurrentSyncLimit:
+ description: |-
+ RebuildConcurrentSyncLimit controls the maximum number of file synchronization operations that can run
+ concurrently during a single replica rebuild.
+ When set to 0, it means following the global setting.
+ maximum: 5
+ minimum: 0
+ type: integer
replicaAutoBalance:
enum:
- ignored
@@ -4408,6 +4049,14 @@
- enabled
- disabled
type: string
+ replicaRebuildingBandwidthLimit:
+ description: ReplicaRebuildingBandwidthLimit controls the maximum
+ write bandwidth (in megabytes per second) allowed on the destination
+ replica during the rebuilding process. Set this value to 0 to disable
+ bandwidth limiting.
+ format: int64
+ minimum: 0
+ type: integer
replicaSoftAntiAffinity:
description: Replica soft anti affinity of the volume. Set enabled
to allow replicas to be scheduled on the same node.
@@ -4442,6 +4091,15 @@
- enabled
- fast-check
type: string
+ snapshotHashingRequestedAt:
+ description: |-
+ SnapshotHashingRequestedAt is the RFC3339 timestamp (e.g., "2026-03-16T10:30:00Z") when an on-demand snapshot checksum calculation is requested.
+ When this value is set and is later than LastOnDemandSnapshotHashingCompleteAt, the system will calculate checksums
+ for all user snapshots.
+
+ If SnapshotHashingRequestedAt differs from LastOnDemandSnapshotHashingCompleteAt, it indicates that a hashing request
+ is still in progress, and a new request will be rejected.
+ type: string
snapshotMaxCount:
type: integer
snapshotMaxSize:
@@ -4449,6 +4107,14 @@
type: string
staleReplicaTimeout:
type: integer
+ ublkNumberOfQueue:
+ description: ublkNumberOfQueue controls the number of queues for ublk
+ frontend.
+ type: integer
+ ublkQueueDepth:
+ description: ublkQueueDepth controls the depth of each queue for ublk
+ frontend.
+ type: integer
unmapMarkSnapChainRemoved:
enum:
- ignored
@@ -4504,6 +4170,10 @@
type: object
nullable: true
type: array
+ currentEngineNodeID:
+ description: the node that the engine (target) is currently running
+ on.
+ type: string
currentImage:
type: string
currentMigrationNodeID:
@@ -4548,12 +4218,20 @@
nullable: true
type: array
type: object
+ lastAutoSalvagedAt:
+ type: string
lastBackup:
type: string
lastBackupAt:
type: string
lastDegradedAt:
type: string
+ lastOnDemandSnapshotHashingCompleteAt:
+ description: |-
+ LastOnDemandSnapshotHashingCompleteAt is the RFC3339 timestamp (e.g., "2026-03-16T10:30:00Z") when the
+ most recent on-demand snapshot checksum calculation completed.
+ When this value matches SnapshotHashingRequestedAt, the requested on-demand checksum calculation is considered complete.
+ type: string
ownerID:
type: string
remountRequestedAt:
@@ -4570,6 +4248,11 @@
type: string
state:
type: string
+ switchoverState:
+ description: |-
+ SwitchoverState describes the current progress of a v2 engine live switchover.
+ Empty when no switchover is in progress.
+ type: string
type: object
type: object
served: true
diff --git a/charts/longhorn/templates/daemonset-sa.yaml b/charts/longhorn/templates/daemonset-sa.yaml
index 0bba120..c1c0ae9 100644
--- a/charts/longhorn/templates/daemonset-sa.yaml
+++ b/charts/longhorn/templates/daemonset-sa.yaml
@@ -20,7 +20,7 @@
spec:
containers:
- name: longhorn-manager
- image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
+ image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
privileged: true
@@ -32,17 +32,17 @@
{{- end }}
- daemon
- --engine-image
- - "{{ template "registry_url" . }}{{ .Values.image.longhorn.engine.repository }}:{{ .Values.image.longhorn.engine.tag }}"
+ - "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.engine.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.engine.repository }}:{{ .Values.image.longhorn.engine.tag }}"
- --instance-manager-image
- - "{{ template "registry_url" . }}{{ .Values.image.longhorn.instanceManager.repository }}:{{ .Values.image.longhorn.instanceManager.tag }}"
+ - "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.instanceManager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.instanceManager.repository }}:{{ .Values.image.longhorn.instanceManager.tag }}"
- --share-manager-image
- - "{{ template "registry_url" . }}{{ .Values.image.longhorn.shareManager.repository }}:{{ .Values.image.longhorn.shareManager.tag }}"
+ - "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.shareManager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.shareManager.repository }}:{{ .Values.image.longhorn.shareManager.tag }}"
- --backing-image-manager-image
- - "{{ template "registry_url" . }}{{ .Values.image.longhorn.backingImageManager.repository }}:{{ .Values.image.longhorn.backingImageManager.tag }}"
+ - "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.backingImageManager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.backingImageManager.repository }}:{{ .Values.image.longhorn.backingImageManager.tag }}"
- --support-bundle-manager-image
- - "{{ template "registry_url" . }}{{ .Values.image.longhorn.supportBundleKit.repository }}:{{ .Values.image.longhorn.supportBundleKit.tag }}"
+ - "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.supportBundleKit.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.supportBundleKit.repository }}:{{ .Values.image.longhorn.supportBundleKit.tag }}"
- --manager-image
- - "{{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}"
+ - "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}"
- --service-account
- longhorn-service-account
{{- if .Values.preUpgradeChecker.upgradeVersionCheck}}
@@ -51,8 +51,6 @@
ports:
- containerPort: 9500
name: manager
- - containerPort: 9501
- name: conversion-wh
- containerPort: 9502
name: admission-wh
- containerPort: 9503
@@ -60,7 +58,7 @@
readinessProbe:
httpGet:
path: /v1/healthz
- port: 9501
+ port: 9502
scheme: HTTPS
volumeMounts:
- name: boot
@@ -100,13 +98,22 @@
valueFrom:
fieldRef:
fieldPath: spec.nodeName
+ {{- if .Values.longhornManager.distro }}
+ - name: LONGHORN_DISTRO
+ value: {{ .Values.longhornManager.distro | quote }}
+ {{- end }}
{{- if .Values.enableGoCoverDir }}
- name: GOCOVERDIR
value: /go-cover-dir/
{{- end }}
+ {{- include "longhorn.timezoneEnv" . | nindent 8 }}
+ {{- with .Values.longhornManager.resources }}
+ resources:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
- name: pre-pull-share-manager-image
imagePullPolicy: {{ .Values.image.pullPolicy }}
- image: {{ template "registry_url" . }}{{ .Values.image.longhorn.shareManager.repository }}:{{ .Values.image.longhorn.shareManager.tag }}
+ image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.shareManager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.shareManager.repository }}:{{ .Values.image.longhorn.shareManager.tag }}
command: ["sh", "-c", "echo share-manager image pulled && sleep infinity"]
volumes:
- name: boot
@@ -134,9 +141,21 @@
secret:
secretName: longhorn-grpc-tls
optional: true
- {{- if .Values.privateRegistry.registrySecret }}
+ {{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
imagePullSecrets:
- - name: {{ .Values.privateRegistry.registrySecret }}
+ {{- $imagePullSecrets := list }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- range . }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- $imagePullSecrets = append $imagePullSecrets . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- toYaml $imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.longhornManager.priorityClass }}
priorityClassName: {{ .Values.longhornManager.priorityClass | quote }}
@@ -161,14 +180,16 @@
{{- end }}
serviceAccountName: longhorn-service-account
updateStrategy:
- rollingUpdate:
- maxUnavailable: "100%"
+{{ toYaml .Values.longhornManager.updateStrategy | indent 4 }}
---
apiVersion: v1
kind: Service
metadata:
labels: {{- include "longhorn.labels" . | nindent 4 }}
app: longhorn-manager
+ {{- with .Values.longhornManager.serviceLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
name: longhorn-backend
namespace: {{ include "release_namespace" . }}
{{- if .Values.longhornManager.serviceAnnotations }}
diff --git a/charts/longhorn/templates/default-setting.yaml b/charts/longhorn/templates/default-setting.yaml
index cfe8eb8..11dcf1f 100644
--- a/charts/longhorn/templates/default-setting.yaml
+++ b/charts/longhorn/templates/default-setting.yaml
@@ -13,58 +13,61 @@
create-default-disk-labeled-nodes: {{ .Values.defaultSettings.createDefaultDiskLabeledNodes }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.defaultDataPath) }}
- default-data-path: {{ .Values.defaultSettings.defaultDataPath }}
+ default-data-path: {{ .Values.defaultSettings.defaultDataPath | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaSoftAntiAffinity) }}
replica-soft-anti-affinity: {{ .Values.defaultSettings.replicaSoftAntiAffinity }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaAutoBalance) }}
- replica-auto-balance: {{ .Values.defaultSettings.replicaAutoBalance }}
+ replica-auto-balance: {{ .Values.defaultSettings.replicaAutoBalance | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.storageOverProvisioningPercentage) }}
- storage-over-provisioning-percentage: {{ .Values.defaultSettings.storageOverProvisioningPercentage }}
+ storage-over-provisioning-percentage: {{ .Values.defaultSettings.storageOverProvisioningPercentage | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.storageMinimalAvailablePercentage) }}
- storage-minimal-available-percentage: {{ .Values.defaultSettings.storageMinimalAvailablePercentage }}
+ storage-minimal-available-percentage: {{ .Values.defaultSettings.storageMinimalAvailablePercentage | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.storageReservedPercentageForDefaultDisk) }}
- storage-reserved-percentage-for-default-disk: {{ .Values.defaultSettings.storageReservedPercentageForDefaultDisk }}
+ storage-reserved-percentage-for-default-disk: {{ .Values.defaultSettings.storageReservedPercentageForDefaultDisk | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.upgradeChecker) }}
upgrade-checker: {{ .Values.defaultSettings.upgradeChecker }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.upgradeResponderURL) }}
- upgrade-responder-url: {{ .Values.defaultSettings.upgradeResponderURL }}
+ upgrade-responder-url: {{ .Values.defaultSettings.upgradeResponderURL | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.managerUrl) }}
+ manager-url: {{ .Values.defaultSettings.managerUrl | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.defaultReplicaCount) }}
- default-replica-count: {{ .Values.defaultSettings.defaultReplicaCount }}
+ default-replica-count: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.defaultReplicaCount }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.defaultDataLocality) }}
- default-data-locality: {{ .Values.defaultSettings.defaultDataLocality }}
+ default-data-locality: {{ .Values.defaultSettings.defaultDataLocality | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.defaultLonghornStaticStorageClass) }}
- default-longhorn-static-storage-class: {{ .Values.defaultSettings.defaultLonghornStaticStorageClass }}
+ default-longhorn-static-storage-class: {{ .Values.defaultSettings.defaultLonghornStaticStorageClass | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.failedBackupTTL) }}
- failed-backup-ttl: {{ .Values.defaultSettings.failedBackupTTL }}
+ failed-backup-ttl: {{ .Values.defaultSettings.failedBackupTTL | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.backupExecutionTimeout) }}
- backup-execution-timeout: {{ .Values.defaultSettings.backupExecutionTimeout }}
+ backup-execution-timeout: {{ .Values.defaultSettings.backupExecutionTimeout | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.restoreVolumeRecurringJobs) }}
restore-volume-recurring-jobs: {{ .Values.defaultSettings.restoreVolumeRecurringJobs }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.recurringSuccessfulJobsHistoryLimit) }}
- recurring-successful-jobs-history-limit: {{ .Values.defaultSettings.recurringSuccessfulJobsHistoryLimit }}
+ recurring-successful-jobs-history-limit: {{ .Values.defaultSettings.recurringSuccessfulJobsHistoryLimit | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.recurringJobMaxRetention) }}
- recurring-job-max-retention: {{ .Values.defaultSettings.recurringJobMaxRetention }}
+ recurring-job-max-retention: {{ .Values.defaultSettings.recurringJobMaxRetention | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.recurringFailedJobsHistoryLimit) }}
- recurring-failed-jobs-history-limit: {{ .Values.defaultSettings.recurringFailedJobsHistoryLimit }}
+ recurring-failed-jobs-history-limit: {{ .Values.defaultSettings.recurringFailedJobsHistoryLimit | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.supportBundleFailedHistoryLimit) }}
- support-bundle-failed-history-limit: {{ .Values.defaultSettings.supportBundleFailedHistoryLimit }}
+ support-bundle-failed-history-limit: {{ .Values.defaultSettings.supportBundleFailedHistoryLimit | quote }}
{{- end }}
{{- if or (not (kindIs "invalid" .Values.defaultSettings.taintToleration)) (.Values.global.cattle.windowsCluster.enabled) }}
taint-toleration: {{ $windowsDefaultSettingTaintToleration := list }}{{ $defaultSettingTaintToleration := list -}}
@@ -74,7 +77,7 @@
{{- if not (kindIs "invalid" .Values.defaultSettings.taintToleration) -}}
{{- $defaultSettingTaintToleration = .Values.defaultSettings.taintToleration -}}
{{- end -}}
- {{- $taintToleration := list $windowsDefaultSettingTaintToleration $defaultSettingTaintToleration }}{{ join ";" (compact $taintToleration) -}}
+ {{- $taintToleration := list $windowsDefaultSettingTaintToleration $defaultSettingTaintToleration }}{{ join ";" (compact $taintToleration) | quote -}}
{{- end }}
{{- if or (not (kindIs "invalid" .Values.defaultSettings.systemManagedComponentsNodeSelector)) (.Values.global.cattle.windowsCluster.enabled) }}
system-managed-components-node-selector: {{ $windowsDefaultSettingNodeSelector := list }}{{ $defaultSettingNodeSelector := list -}}
@@ -84,10 +87,13 @@
{{- if not (kindIs "invalid" .Values.defaultSettings.systemManagedComponentsNodeSelector) -}}
{{- $defaultSettingNodeSelector = .Values.defaultSettings.systemManagedComponentsNodeSelector -}}
{{- end -}}
- {{- $nodeSelector := list $windowsDefaultSettingNodeSelector $defaultSettingNodeSelector }}{{ join ";" (compact $nodeSelector) -}}
+ {{- $nodeSelector := list $windowsDefaultSettingNodeSelector $defaultSettingNodeSelector }}{{ join ";" (compact $nodeSelector) | quote -}}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.systemManagedCSIComponentsResourceLimits) }}
+ system-managed-csi-components-resource-limits: {{ .Values.defaultSettings.systemManagedCSIComponentsResourceLimits | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.priorityClass) }}
- priority-class: {{ .Values.defaultSettings.priorityClass }}
+ priority-class: {{ .Values.defaultSettings.priorityClass | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.autoSalvage) }}
auto-salvage: {{ .Values.defaultSettings.autoSalvage }}
@@ -95,6 +101,9 @@
{{- if not (kindIs "invalid" .Values.defaultSettings.autoDeletePodWhenVolumeDetachedUnexpectedly) }}
auto-delete-pod-when-volume-detached-unexpectedly: {{ .Values.defaultSettings.autoDeletePodWhenVolumeDetachedUnexpectedly }}
{{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.blacklistForAutoDeletePodWhenVolumeDetachedUnexpectedly) }}
+ blacklist-for-auto-delete-pod-when-volume-detached-unexpectedly: {{ .Values.defaultSettings.blacklistForAutoDeletePodWhenVolumeDetachedUnexpectedly }}
+ {{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.disableSchedulingOnCordonedNode) }}
disable-scheduling-on-cordoned-node: {{ .Values.defaultSettings.disableSchedulingOnCordonedNode }}
{{- end }}
@@ -105,28 +114,31 @@
replica-disk-soft-anti-affinity: {{ .Values.defaultSettings.replicaDiskSoftAntiAffinity }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.nodeDownPodDeletionPolicy) }}
- node-down-pod-deletion-policy: {{ .Values.defaultSettings.nodeDownPodDeletionPolicy }}
+ node-down-pod-deletion-policy: {{ .Values.defaultSettings.nodeDownPodDeletionPolicy | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.nodeDrainPolicy) }}
- node-drain-policy: {{ .Values.defaultSettings.nodeDrainPolicy }}
+ node-drain-policy: {{ .Values.defaultSettings.nodeDrainPolicy | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.detachManuallyAttachedVolumesWhenCordoned) }}
detach-manually-attached-volumes-when-cordoned: {{ .Values.defaultSettings.detachManuallyAttachedVolumesWhenCordoned }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaReplenishmentWaitInterval) }}
- replica-replenishment-wait-interval: {{ .Values.defaultSettings.replicaReplenishmentWaitInterval }}
+ replica-replenishment-wait-interval: {{ .Values.defaultSettings.replicaReplenishmentWaitInterval | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.concurrentReplicaRebuildPerNodeLimit) }}
- concurrent-replica-rebuild-per-node-limit: {{ .Values.defaultSettings.concurrentReplicaRebuildPerNodeLimit }}
+ concurrent-replica-rebuild-per-node-limit: {{ .Values.defaultSettings.concurrentReplicaRebuildPerNodeLimit | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.rebuildConcurrentSyncLimit) }}
+ rebuild-concurrent-sync-limit: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.rebuildConcurrentSyncLimit }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.concurrentVolumeBackupRestorePerNodeLimit) }}
- concurrent-volume-backup-restore-per-node-limit: {{ .Values.defaultSettings.concurrentVolumeBackupRestorePerNodeLimit }}
+ concurrent-volume-backup-restore-per-node-limit: {{ .Values.defaultSettings.concurrentVolumeBackupRestorePerNodeLimit | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.disableRevisionCounter) }}
- disable-revision-counter: {{ .Values.defaultSettings.disableRevisionCounter }}
+ disable-revision-counter: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.disableRevisionCounter }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.systemManagedPodsImagePullPolicy) }}
- system-managed-pods-image-pull-policy: {{ .Values.defaultSettings.systemManagedPodsImagePullPolicy }}
+ system-managed-pods-image-pull-policy: {{ .Values.defaultSettings.systemManagedPodsImagePullPolicy | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.allowVolumeCreationWithDegradedAvailability) }}
allow-volume-creation-with-degraded-availability: {{ .Values.defaultSettings.allowVolumeCreationWithDegradedAvailability }}
@@ -138,67 +150,76 @@
auto-cleanup-recurring-job-backup-snapshot: {{ .Values.defaultSettings.autoCleanupRecurringJobBackupSnapshot }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.concurrentAutomaticEngineUpgradePerNodeLimit) }}
- concurrent-automatic-engine-upgrade-per-node-limit: {{ .Values.defaultSettings.concurrentAutomaticEngineUpgradePerNodeLimit }}
+ concurrent-automatic-engine-upgrade-per-node-limit: {{ .Values.defaultSettings.concurrentAutomaticEngineUpgradePerNodeLimit | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.backingImageCleanupWaitInterval) }}
- backing-image-cleanup-wait-interval: {{ .Values.defaultSettings.backingImageCleanupWaitInterval }}
+ backing-image-cleanup-wait-interval: {{ .Values.defaultSettings.backingImageCleanupWaitInterval | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.backingImageRecoveryWaitInterval) }}
- backing-image-recovery-wait-interval: {{ .Values.defaultSettings.backingImageRecoveryWaitInterval }}
+ backing-image-recovery-wait-interval: {{ .Values.defaultSettings.backingImageRecoveryWaitInterval | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.guaranteedInstanceManagerCPU) }}
- guaranteed-instance-manager-cpu: {{ .Values.defaultSettings.guaranteedInstanceManagerCPU }}
+ guaranteed-instance-manager-cpu: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.guaranteedInstanceManagerCPU }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.kubernetesClusterAutoscalerEnabled) }}
kubernetes-cluster-autoscaler-enabled: {{ .Values.defaultSettings.kubernetesClusterAutoscalerEnabled }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.orphanResourceAutoDeletion) }}
- orphan-resource-auto-deletion: {{ .Values.defaultSettings.orphanResourceAutoDeletion }}
+ orphan-resource-auto-deletion: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.orphanResourceAutoDeletion }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.orphanResourceAutoDeletionGracePeriod) }}
- orphan-resource-auto-deletion-grace-period: {{ .Values.defaultSettings.orphanResourceAutoDeletionGracePeriod }}
+ orphan-resource-auto-deletion-grace-period: {{ .Values.defaultSettings.orphanResourceAutoDeletionGracePeriod | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.storageNetwork) }}
- storage-network: {{ .Values.defaultSettings.storageNetwork }}
+ storage-network: {{ .Values.defaultSettings.storageNetwork | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.endpointNetworkForRWXVolume) }}
+ endpoint-network-for-rwx-volume: {{ .Values.defaultSettings.endpointNetworkForRWXVolume | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.deletingConfirmationFlag) }}
deleting-confirmation-flag: {{ .Values.defaultSettings.deletingConfirmationFlag }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.engineReplicaTimeout) }}
- engine-replica-timeout: {{ .Values.defaultSettings.engineReplicaTimeout }}
+ engine-replica-timeout: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.engineReplicaTimeout }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.snapshotDataIntegrity) }}
- snapshot-data-integrity: {{ .Values.defaultSettings.snapshotDataIntegrity }}
+ snapshot-data-integrity: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.snapshotDataIntegrity }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.snapshotDataIntegrityImmediateCheckAfterSnapshotCreation) }}
- snapshot-data-integrity-immediate-check-after-snapshot-creation: {{ .Values.defaultSettings.snapshotDataIntegrityImmediateCheckAfterSnapshotCreation }}
+ snapshot-data-integrity-immediate-check-after-snapshot-creation: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.snapshotDataIntegrityImmediateCheckAfterSnapshotCreation }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.snapshotDataIntegrityCronjob) }}
- snapshot-data-integrity-cronjob: {{ .Values.defaultSettings.snapshotDataIntegrityCronjob }}
+ snapshot-data-integrity-cronjob: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.snapshotDataIntegrityCronjob }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.removeSnapshotsDuringFilesystemTrim) }}
remove-snapshots-during-filesystem-trim: {{ .Values.defaultSettings.removeSnapshotsDuringFilesystemTrim }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.fastReplicaRebuildEnabled) }}
- fast-replica-rebuild-enabled: {{ .Values.defaultSettings.fastReplicaRebuildEnabled }}
+ fast-replica-rebuild-enabled: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.fastReplicaRebuildEnabled }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.replicaFileSyncHttpClientTimeout) }}
- replica-file-sync-http-client-timeout: {{ .Values.defaultSettings.replicaFileSyncHttpClientTimeout }}
+ replica-file-sync-http-client-timeout: {{ .Values.defaultSettings.replicaFileSyncHttpClientTimeout | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.longGRPCTimeOut) }}
- long-grpc-timeout: {{ .Values.defaultSettings.longGRPCTimeOut }}
+ long-grpc-timeout: {{ .Values.defaultSettings.longGRPCTimeOut | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.logLevel) }}
- log-level: {{ .Values.defaultSettings.logLevel }}
+ log-level: {{ .Values.defaultSettings.logLevel | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.logPath) }}
+ log-path: {{ .Values.defaultSettings.logPath | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.backupCompressionMethod) }}
- backup-compression-method: {{ .Values.defaultSettings.backupCompressionMethod }}
+ backup-compression-method: {{ .Values.defaultSettings.backupCompressionMethod | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.backupConcurrentLimit) }}
- backup-concurrent-limit: {{ .Values.defaultSettings.backupConcurrentLimit }}
+ backup-concurrent-limit: {{ .Values.defaultSettings.backupConcurrentLimit | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.restoreConcurrentLimit) }}
- restore-concurrent-limit: {{ .Values.defaultSettings.restoreConcurrentLimit }}
+ restore-concurrent-limit: {{ .Values.defaultSettings.restoreConcurrentLimit | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.defaultBackupBlockSize) }}
+ default-backup-block-size: {{ .Values.defaultSettings.defaultBackupBlockSize | quote }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.v1DataEngine) }}
v1-data-engine: {{ .Values.defaultSettings.v1DataEngine }}
@@ -206,8 +227,11 @@
{{- if not (kindIs "invalid" .Values.defaultSettings.v2DataEngine) }}
v2-data-engine: {{ .Values.defaultSettings.v2DataEngine }}
{{- end }}
- {{- if not (kindIs "invalid" .Values.defaultSettings.v2DataEngineHugepageLimit) }}
- v2-data-engine-hugepage-limit: {{ .Values.defaultSettings.v2DataEngineHugepageLimit }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineHugepageEnabled) }}
+ data-engine-hugepage-enabled: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineHugepageEnabled }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineMemorySize) }}
+ data-engine-memory-size: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineMemorySize }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.allowEmptyNodeSelectorVolume) }}
allow-empty-node-selector-volume: {{ .Values.defaultSettings.allowEmptyNodeSelectorVolume }}
@@ -221,23 +245,20 @@
{{- if not (kindIs "invalid" .Values.defaultSettings.disableSnapshotPurge) }}
disable-snapshot-purge: {{ .Values.defaultSettings.disableSnapshotPurge }}
{{- end }}
- {{- if not (kindIs "invalid" .Values.defaultSettings.v2DataEngineGuaranteedInstanceManagerCPU) }}
- v2-data-engine-guaranteed-instance-manager-cpu: {{ .Values.defaultSettings.v2DataEngineGuaranteedInstanceManagerCPU }}
- {{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.snapshotMaxCount) }}
- snapshot-max-count: {{ .Values.defaultSettings.snapshotMaxCount }}
+ snapshot-max-count: {{ .Values.defaultSettings.snapshotMaxCount | quote }}
{{- end }}
- {{- if not (kindIs "invalid" .Values.defaultSettings.v2DataEngineLogLevel) }}
- v2-data-engine-log-level: {{ .Values.defaultSettings.v2DataEngineLogLevel }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.snapshotCountWarningThreshold) }}
+ snapshot-count-warning-threshold: {{ .Values.defaultSettings.snapshotCountWarningThreshold | quote }}
{{- end }}
- {{- if not (kindIs "invalid" .Values.defaultSettings.v2DataEngineLogFlags) }}
- v2-data-engine-log-flags: {{ .Values.defaultSettings.v2DataEngineLogFlags }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineLogLevel) }}
+ data-engine-log-level: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineLogLevel }}
{{- end }}
- {{- if not (kindIs "invalid" .Values.defaultSettings.v2DataEngineSnapshotDataIntegrity) }}
- v2-data-engine-snapshot-data-integrity: {{ .Values.defaultSettings.v2DataEngineSnapshotDataIntegrity }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineLogFlags) }}
+ data-engine-log-flags: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineLogFlags }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.freezeFilesystemForSnapshot) }}
- freeze-filesystem-for-snapshot: {{ .Values.defaultSettings.freezeFilesystemForSnapshot }}
+ freeze-filesystem-for-snapshot: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.freezeFilesystemForSnapshot }}
{{- end }}
{{- if not (kindIs "invalid" .Values.defaultSettings.autoCleanupSnapshotWhenDeleteBackup) }}
auto-cleanup-when-delete-backup: {{ .Values.defaultSettings.autoCleanupSnapshotWhenDeleteBackup }}
@@ -248,9 +269,45 @@
{{- if not (kindIs "invalid" .Values.defaultSettings.rwxVolumeFastFailover) }}
rwx-volume-fast-failover: {{ .Values.defaultSettings.rwxVolumeFastFailover}}
{{- end }}
- {{- if not (kindIs "invalid" .Values.defaultSettings.offlineRelicaRebuilding) }}
- offline-replica-rebuilding: {{ .Values.defaultSettings.offlineRelicaRebuilding}}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.offlineReplicaRebuilding) }}
+ offline-replica-rebuilding: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.offlineReplicaRebuilding }}
{{- end }}
- {{- if not (kindIs "invalid" .Values.defaultSettings.v2DataEngineCPUMask) }}
- v2-data-engine-cpu-mask: {{ .Values.defaultSettings.v2DataEngineCPUMask }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.dataEngineCPUMask) }}
+ data-engine-cpu-mask: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.dataEngineCPUMask }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.replicaRebuildingBandwidthLimit) }}
+ replica-rebuilding-bandwidth-limit: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.replicaRebuildingBandwidthLimit }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.defaultUblkQueueDepth) }}
+ default-ublk-queue-depth: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.defaultUblkQueueDepth }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.defaultUblkNumberOfQueue) }}
+ default-ublk-number-of-queue: {{ include "longhorn.multiTypeSetting" .Values.defaultSettings.defaultUblkNumberOfQueue }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.engineImagePodLivenessProbePeriod) }}
+ engine-image-pod-liveness-probe-period: {{ .Values.defaultSettings.engineImagePodLivenessProbePeriod | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.engineImagePodLivenessProbeTimeout) }}
+ engine-image-pod-liveness-probe-timeout: {{ .Values.defaultSettings.engineImagePodLivenessProbeTimeout | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.engineImagePodLivenessProbeFailureThreshold) }}
+ engine-image-pod-liveness-probe-failure-threshold: {{ .Values.defaultSettings.engineImagePodLivenessProbeFailureThreshold | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.instanceManagerPodLivenessProbeTimeout) }}
+ instance-manager-pod-liveness-probe-timeout: {{ .Values.defaultSettings.instanceManagerPodLivenessProbeTimeout | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.snapshotHeavyTaskConcurrentLimit) }}
+ snapshot-heavy-task-concurrent-limit: {{ .Values.defaultSettings.snapshotHeavyTaskConcurrentLimit | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.nodeDiskHealthMonitoring) }}
+ node-disk-health-monitoring: {{ .Values.defaultSettings.nodeDiskHealthMonitoring }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.csiAllowedTopologyKeys) }}
+ csi-allowed-topology-keys: {{ .Values.defaultSettings.csiAllowedTopologyKeys | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.csiStorageCapacityTracking) }}
+ csi-storage-capacity-tracking: {{ .Values.defaultSettings.csiStorageCapacityTracking | quote }}
+ {{- end }}
+ {{- if not (kindIs "invalid" .Values.defaultSettings.kubernetesMetricsServerMetricsEnabled) }}
+ kubernetes-metrics-server-metrics-enabled: {{ .Values.defaultSettings.kubernetesMetricsServerMetricsEnabled }}
{{- end }}
diff --git a/charts/longhorn/templates/deployment-driver.yaml b/charts/longhorn/templates/deployment-driver.yaml
index 5683c75..d9beeaa 100644
--- a/charts/longhorn/templates/deployment-driver.yaml
+++ b/charts/longhorn/templates/deployment-driver.yaml
@@ -16,11 +16,11 @@
spec:
initContainers:
- name: wait-longhorn-manager
- image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
+ image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
command: ['sh', '-c', 'while [ $(curl -m 1 -s -o /dev/null -w "%{http_code}" http://longhorn-backend:9500/v1) != "200" ]; do echo waiting; sleep 2; done']
containers:
- name: longhorn-driver-deployer
- image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
+ image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- longhorn-manager
@@ -30,7 +30,7 @@
{{- end }}
- deploy-driver
- --manager-image
- - "{{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}"
+ - "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}"
- --manager-url
- http://longhorn-backend:9500/v1
env:
@@ -50,29 +50,33 @@
- name: KUBELET_ROOT_DIR
value: {{ .Values.csi.kubeletRootDir }}
{{- end }}
+ {{- if .Values.csi.podAntiAffinityPreset }}
+ - name: CSI_POD_ANTI_AFFINITY_PRESET
+ value: {{ .Values.csi.podAntiAffinityPreset }}
+ {{- end }}
{{- if and .Values.image.csi.attacher.repository .Values.image.csi.attacher.tag }}
- name: CSI_ATTACHER_IMAGE
- value: "{{ template "registry_url" . }}{{ .Values.image.csi.attacher.repository }}:{{ .Values.image.csi.attacher.tag }}"
+ value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.attacher.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.attacher.repository }}:{{ .Values.image.csi.attacher.tag }}"
{{- end }}
{{- if and .Values.image.csi.provisioner.repository .Values.image.csi.provisioner.tag }}
- name: CSI_PROVISIONER_IMAGE
- value: "{{ template "registry_url" . }}{{ .Values.image.csi.provisioner.repository }}:{{ .Values.image.csi.provisioner.tag }}"
+ value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.provisioner.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.provisioner.repository }}:{{ .Values.image.csi.provisioner.tag }}"
{{- end }}
{{- if and .Values.image.csi.nodeDriverRegistrar.repository .Values.image.csi.nodeDriverRegistrar.tag }}
- name: CSI_NODE_DRIVER_REGISTRAR_IMAGE
- value: "{{ template "registry_url" . }}{{ .Values.image.csi.nodeDriverRegistrar.repository }}:{{ .Values.image.csi.nodeDriverRegistrar.tag }}"
+ value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.nodeDriverRegistrar.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.nodeDriverRegistrar.repository }}:{{ .Values.image.csi.nodeDriverRegistrar.tag }}"
{{- end }}
{{- if and .Values.image.csi.resizer.repository .Values.image.csi.resizer.tag }}
- name: CSI_RESIZER_IMAGE
- value: "{{ template "registry_url" . }}{{ .Values.image.csi.resizer.repository }}:{{ .Values.image.csi.resizer.tag }}"
+ value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.resizer.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.resizer.repository }}:{{ .Values.image.csi.resizer.tag }}"
{{- end }}
{{- if and .Values.image.csi.snapshotter.repository .Values.image.csi.snapshotter.tag }}
- name: CSI_SNAPSHOTTER_IMAGE
- value: "{{ template "registry_url" . }}{{ .Values.image.csi.snapshotter.repository }}:{{ .Values.image.csi.snapshotter.tag }}"
+ value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.snapshotter.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.snapshotter.repository }}:{{ .Values.image.csi.snapshotter.tag }}"
{{- end }}
{{- if and .Values.image.csi.livenessProbe.repository .Values.image.csi.livenessProbe.tag }}
- name: CSI_LIVENESS_PROBE_IMAGE
- value: "{{ template "registry_url" . }}{{ .Values.image.csi.livenessProbe.repository }}:{{ .Values.image.csi.livenessProbe.tag }}"
+ value: "{{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.csi.livenessProbe.registry) }}{{ . }}/{{ end }}{{ .Values.image.csi.livenessProbe.repository }}:{{ .Values.image.csi.livenessProbe.tag }}"
{{- end }}
{{- if .Values.csi.attacherReplicaCount }}
- name: CSI_ATTACHER_REPLICA_COUNT
@@ -97,10 +101,23 @@
- name: go-cover-dir
mountPath: /go-cover-dir/
{{- end }}
+ {{- include "longhorn.timezoneEnv" . | nindent 10 }}
- {{- if .Values.privateRegistry.registrySecret }}
+ {{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
imagePullSecrets:
- - name: {{ .Values.privateRegistry.registrySecret }}
+ {{- $imagePullSecrets := list }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- range . }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- $imagePullSecrets = append $imagePullSecrets . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- toYaml $imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.longhornDriver.priorityClass }}
priorityClassName: {{ .Values.longhornDriver.priorityClass | quote }}
diff --git a/charts/longhorn/templates/deployment-ui.yaml b/charts/longhorn/templates/deployment-ui.yaml
index 76b80f2..a0c2c47 100644
--- a/charts/longhorn/templates/deployment-ui.yaml
+++ b/charts/longhorn/templates/deployment-ui.yaml
@@ -61,7 +61,7 @@
{{- if .Values.openshift.ui.route }}
- name: oauth-proxy
{{- if .Values.image.openshift.oauthProxy.repository }}
- image: {{ template "registry_url" . }}{{ .Values.image.openshift.oauthProxy.repository }}:{{ .Values.image.openshift.oauthProxy.tag }}
+ image: {{ with (coalesce .Values.image.openshift.oauthProxy.registry .Values.global.imageRegistry (include "registry_url" .)) }}{{ . }}/{{ end }}{{ .Values.image.openshift.oauthProxy.repository }}:{{ .Values.image.openshift.oauthProxy.tag }}
{{- else }}
image: ""
{{- end }}
@@ -84,7 +84,7 @@
{{- end }}
{{- end }}
- name: longhorn-ui
- image: {{ template "registry_url" . }}{{ .Values.image.longhorn.ui.repository }}:{{ .Values.image.longhorn.ui.tag }}
+ image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.ui.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.ui.repository }}:{{ .Values.image.longhorn.ui.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: nginx-cache
@@ -101,6 +101,7 @@
value: "http://longhorn-backend:9500"
- name: LONGHORN_UI_PORT
value: "8000"
+ {{- include "longhorn.timezoneEnv" . | nindent 10 }}
volumes:
{{- if .Values.openshift.enabled }}
{{- if .Values.openshift.ui.route }}
@@ -115,9 +116,21 @@
name: nginx-config
- emptyDir: {}
name: var-run
- {{- if .Values.privateRegistry.registrySecret }}
+ {{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
imagePullSecrets:
- - name: {{ .Values.privateRegistry.registrySecret }}
+ {{- $imagePullSecrets := list }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- range . }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- $imagePullSecrets = append $imagePullSecrets . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- toYaml $imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.longhornUI.priorityClass }}
priorityClassName: {{ .Values.longhornUI.priorityClass | quote }}
@@ -149,8 +162,15 @@
{{- if eq .Values.service.ui.type "Rancher-Proxy" }}
kubernetes.io/cluster-service: "true"
{{- end }}
+ {{- with .Values.service.ui.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
name: longhorn-frontend
namespace: {{ include "release_namespace" . }}
+ {{- with .Values.service.ui.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
{{- if eq .Values.service.ui.type "Rancher-Proxy" }}
type: ClusterIP
@@ -163,6 +183,9 @@
{{- if and (eq .Values.service.ui.type "LoadBalancer") .Values.service.ui.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{- toYaml .Values.service.ui.loadBalancerSourceRanges | nindent 4 }}
{{- end }}
+ {{- if and (eq .Values.service.ui.type "LoadBalancer") .Values.service.ui.loadBalancerClass }}
+ loadBalancerClass: {{ .Values.service.ui.loadBalancerClass }}
+ {{- end }}
selector:
app: longhorn-ui
ports:
diff --git a/charts/longhorn/templates/httproute.yaml b/charts/longhorn/templates/httproute.yaml
new file mode 100644
index 0000000..c80c469
--- /dev/null
+++ b/charts/longhorn/templates/httproute.yaml
@@ -0,0 +1,42 @@
+{{- if .Values.httproute.enabled -}}
+apiVersion: gateway.networking.k8s.io/v1
+kind: HTTPRoute
+metadata:
+ name: longhorn-httproute
+ namespace: {{ include "release_namespace" . }}
+ labels: {{- include "longhorn.labels" . | nindent 4 }}
+ app: longhorn-httproute
+ {{- with .Values.httproute.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- with .Values.httproute.parentRefs }}
+ parentRefs:
+ {{- range . }}
+ - group: {{ .group | default "gateway.networking.k8s.io" }}
+ kind: {{ .kind | default "Gateway" }}
+ name: {{ .name }}
+ {{- with .namespace }}
+ namespace: {{ . }}
+ {{- end }}
+ {{- with .sectionName }}
+ sectionName: {{ . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.httproute.hostnames }}
+ hostnames:
+ {{- range . }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ rules:
+ - matches:
+ - path:
+ type: {{ .Values.httproute.pathType | default "PathPrefix" }}
+ value: {{ .Values.httproute.path | default "/" }}
+ backendRefs:
+ - name: longhorn-frontend
+ port: 80
+{{- end }}
diff --git a/charts/longhorn/templates/ingress.yaml b/charts/longhorn/templates/ingress.yaml
index 61175e8..a8a2702 100644
--- a/charts/longhorn/templates/ingress.yaml
+++ b/charts/longhorn/templates/ingress.yaml
@@ -28,10 +28,25 @@
name: longhorn-frontend
port:
number: 80
+{{- range .Values.ingress.extraHosts }}
+ - host: {{ . }}
+ http:
+ paths:
+ - path: {{ default "" $.Values.ingress.path }}
+ pathType: {{ default "ImplementationSpecific" $.Values.ingress.pathType }}
+ backend:
+ service:
+ name: longhorn-frontend
+ port:
+ number: 80
+{{- end }}
{{- if .Values.ingress.tls }}
tls:
- hosts:
- {{ .Values.ingress.host }}
+ {{- range .Values.ingress.extraHosts }}
+ - {{ . }}
+ {{- end }}
secretName: {{ .Values.ingress.tlsSecret }}
{{- end }}
{{- end }}
diff --git a/charts/longhorn/templates/network-policies/webhook-network-policy.yaml b/charts/longhorn/templates/network-policies/webhook-network-policy.yaml
index 3812e0f..39d4ec2 100644
--- a/charts/longhorn/templates/network-policies/webhook-network-policy.yaml
+++ b/charts/longhorn/templates/network-policies/webhook-network-policy.yaml
@@ -2,22 +2,6 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
- name: longhorn-conversion-webhook
- namespace: {{ include "release_namespace" . }}
-spec:
- podSelector:
- matchLabels:
- longhorn.io/conversion-webhook: longhorn-conversion-webhook
- policyTypes:
- - Ingress
- ingress:
- - ports:
- - protocol: TCP
- port: 9501
----
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
name: longhorn-admission-webhook
namespace: {{ include "release_namespace" . }}
spec:
diff --git a/charts/longhorn/templates/postupgrade-job.yaml b/charts/longhorn/templates/postupgrade-job.yaml
index 56efd38..d504dbd 100644
--- a/charts/longhorn/templates/postupgrade-job.yaml
+++ b/charts/longhorn/templates/postupgrade-job.yaml
@@ -17,7 +17,7 @@
spec:
containers:
- name: longhorn-post-upgrade
- image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
+ image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- longhorn-manager
@@ -27,10 +27,23 @@
valueFrom:
fieldRef:
fieldPath: metadata.namespace
+ {{- include "longhorn.timezoneEnv" . | nindent 8 }}
restartPolicy: OnFailure
- {{- if .Values.privateRegistry.registrySecret }}
+ {{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
imagePullSecrets:
- - name: {{ .Values.privateRegistry.registrySecret }}
+ {{- $imagePullSecrets := list }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- range . }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- $imagePullSecrets = append $imagePullSecrets . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- toYaml $imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.longhornManager.priorityClass }}
priorityClassName: {{ .Values.longhornManager.priorityClass | quote }}
diff --git a/charts/longhorn/templates/preupgrade-job.yaml b/charts/longhorn/templates/preupgrade-job.yaml
index 9f7a8a6..4e4e77f 100644
--- a/charts/longhorn/templates/preupgrade-job.yaml
+++ b/charts/longhorn/templates/preupgrade-job.yaml
@@ -18,7 +18,7 @@
spec:
containers:
- name: longhorn-pre-upgrade
- image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
+ image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
privileged: true
@@ -29,18 +29,35 @@
- name: proc
mountPath: /host/proc/
env:
+ {{- if .Values.longhornManager.distro }}
+ - name: LONGHORN_DISTRO
+ value: {{ .Values.longhornManager.distro | quote }}
+ {{- end }}
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
+ {{- include "longhorn.timezoneEnv" . | nindent 8 }}
volumes:
- name: proc
hostPath:
path: /proc/
restartPolicy: OnFailure
- {{- if .Values.privateRegistry.registrySecret }}
+ {{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
imagePullSecrets:
- - name: {{ .Values.privateRegistry.registrySecret }}
+ {{- $imagePullSecrets := list }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- range . }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- $imagePullSecrets = append $imagePullSecrets . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- toYaml $imagePullSecrets | nindent 8 }}
{{- end }}
serviceAccountName: longhorn-service-account
{{- if or .Values.global.tolerations .Values.longhornManager.tolerations .Values.global.cattle.windowsCluster.enabled }}
diff --git a/charts/longhorn/templates/registry-secret.yaml b/charts/longhorn/templates/registry-secret.yaml
index 3c6b1dc..1eaaac4 100644
--- a/charts/longhorn/templates/registry-secret.yaml
+++ b/charts/longhorn/templates/registry-secret.yaml
@@ -1,5 +1,8 @@
{{- if .Values.privateRegistry.createSecret }}
{{- if .Values.privateRegistry.registrySecret }}
+{{- if not (kindIs "string" .Values.privateRegistry.registrySecret) }}
+{{- fail "The privateRegistry.registrySecret value must be a string" }}
+{{- end }}
apiVersion: v1
kind: Secret
metadata:
@@ -10,4 +13,4 @@
data:
.dockerconfigjson: {{ template "secret" . }}
{{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/charts/longhorn/templates/role.yaml b/charts/longhorn/templates/role.yaml
new file mode 100644
index 0000000..3e377b8
--- /dev/null
+++ b/charts/longhorn/templates/role.yaml
@@ -0,0 +1,29 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+ name: {{ include "longhorn.name" . }}
+ namespace: {{ include "release_namespace" . }}
+ labels:
+ {{- include "longhorn.labels" . | nindent 4 }}
+rules:
+- apiGroups: [""]
+ resources: ["pods", "pods/log", "events", "secrets", "services", "endpoints", "configmaps", "serviceaccounts", "persistentvolumeclaims", "persistentvolumeclaims/status"]
+ verbs: ["*"]
+- apiGroups: ["apps"]
+ resources: ["daemonsets", "deployments", "statefulsets", "replicasets"]
+ verbs: ["*"]
+- apiGroups: ["batch"]
+ resources: ["jobs", "cronjobs"]
+ verbs: ["*"]
+- apiGroups: ["policy"]
+ resources: ["poddisruptionbudgets"]
+ verbs: ["*"]
+- apiGroups: ["coordination.k8s.io"]
+ resources: ["leases"]
+ verbs: ["*"]
+- apiGroups: ["rbac.authorization.k8s.io"]
+ resources: ["roles", "rolebindings"]
+ verbs: ["*"]
+- apiGroups: ["discovery.k8s.io"]
+ resources: ["endpointslices"]
+ verbs: ["*"]
diff --git a/charts/longhorn/templates/rolebinding.yaml b/charts/longhorn/templates/rolebinding.yaml
new file mode 100644
index 0000000..40c6cbc
--- /dev/null
+++ b/charts/longhorn/templates/rolebinding.yaml
@@ -0,0 +1,13 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+ name: {{ include "longhorn.name" . }}
+ namespace: {{ include "release_namespace" . }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: {{ include "longhorn.name" . }}
+subjects:
+- kind: ServiceAccount
+ name: longhorn-service-account
+ namespace: {{ include "release_namespace" . }}
diff --git a/charts/longhorn/templates/servicemonitor.yaml b/charts/longhorn/templates/servicemonitor.yaml
index 3f32961..df98bd6 100644
--- a/charts/longhorn/templates/servicemonitor.yaml
+++ b/charts/longhorn/templates/servicemonitor.yaml
@@ -15,6 +15,9 @@
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
+ {{- with .Values.metrics.serviceMonitor.sampleLimit }}
+ sampleLimit: {{ . }}
+ {{- end }}
selector:
matchLabels:
app: longhorn-manager
diff --git a/charts/longhorn/templates/services.yaml b/charts/longhorn/templates/services.yaml
index 4c8c6bc..efe0123 100644
--- a/charts/longhorn/templates/services.yaml
+++ b/charts/longhorn/templates/services.yaml
@@ -2,22 +2,6 @@
kind: Service
metadata:
labels: {{- include "longhorn.labels" . | nindent 4 }}
- app: longhorn-conversion-webhook
- name: longhorn-conversion-webhook
- namespace: {{ include "release_namespace" . }}
-spec:
- type: ClusterIP
- selector:
- longhorn.io/conversion-webhook: longhorn-conversion-webhook
- ports:
- - name: conversion-webhook
- port: 9501
- targetPort: conversion-wh
----
-apiVersion: v1
-kind: Service
-metadata:
- labels: {{- include "longhorn.labels" . | nindent 4 }}
app: longhorn-admission-webhook
name: longhorn-admission-webhook
namespace: {{ include "release_namespace" . }}
diff --git a/charts/longhorn/templates/storageclass.yaml b/charts/longhorn/templates/storageclass.yaml
index 34723a4..c901003 100644
--- a/charts/longhorn/templates/storageclass.yaml
+++ b/charts/longhorn/templates/storageclass.yaml
@@ -1,3 +1,4 @@
+{{- if .Values.persistence.createStorageClass }}
apiVersion: v1
kind: ConfigMap
metadata:
@@ -12,6 +13,9 @@
name: longhorn
annotations:
storageclass.kubernetes.io/is-default-class: {{ .Values.persistence.defaultClass | quote }}
+ {{- range $key, $value := .Values.persistence.annotations }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
provisioner: driver.longhorn.io
allowVolumeExpansion: true
reclaimPolicy: "{{ .Values.persistence.reclaimPolicy }}"
@@ -48,8 +52,14 @@
{{- if .Values.persistence.defaultNodeSelector.enable }}
nodeSelector: "{{ .Values.persistence.defaultNodeSelector.selector }}"
{{- end }}
- {{- if .Values.persistence.removeSnapshotsDuringFilesystemTrim }}
- unmapMarkSnapChainRemoved: "{{ .Values.persistence.removeSnapshotsDuringFilesystemTrim }}"
+ {{- if .Values.persistence.shareManagerNodeSelector.enable }}
+ shareManagerNodeSelector: "{{ .Values.persistence.shareManagerNodeSelector.selector }}"
+ {{- end }}
+ {{- if .Values.persistence.shareManagerTolerations.enable }}
+ shareManagerTolerations: "{{ .Values.persistence.shareManagerTolerations.tolerations }}"
+ {{- end }}
+ {{- if .Values.persistence.unmapMarkSnapChainRemoved }}
+ unmapMarkSnapChainRemoved: "{{ .Values.persistence.unmapMarkSnapChainRemoved }}"
{{- end }}
{{- if .Values.persistence.disableRevisionCounter }}
disableRevisionCounter: "{{ .Values.persistence.disableRevisionCounter }}"
@@ -58,3 +68,4 @@
{{- if .Values.persistence.backupTargetName }}
backupTargetName: "{{ .Values.persistence.backupTargetName }}"
{{- end }}
+{{- end }}
diff --git a/charts/longhorn/templates/uninstall-job.yaml b/charts/longhorn/templates/uninstall-job.yaml
index 1ab4620..de660e1 100644
--- a/charts/longhorn/templates/uninstall-job.yaml
+++ b/charts/longhorn/templates/uninstall-job.yaml
@@ -17,7 +17,7 @@
spec:
containers:
- name: longhorn-uninstall
- image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
+ image: {{ with (coalesce .Values.global.imageRegistry (include "registry_url" .) .Values.image.longhorn.manager.registry) }}{{ . }}/{{ end }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- longhorn-manager
@@ -28,10 +28,23 @@
valueFrom:
fieldRef:
fieldPath: metadata.namespace
+ {{- include "longhorn.timezoneEnv" . | nindent 8 }}
restartPolicy: Never
- {{- if .Values.privateRegistry.registrySecret }}
+ {{- with (coalesce .Values.global.imagePullSecrets .Values.privateRegistry.registrySecret) }}
imagePullSecrets:
- - name: {{ .Values.privateRegistry.registrySecret }}
+ {{- $imagePullSecrets := list }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- range . }}
+ {{- if kindIs "string" . }}
+ {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }}
+ {{- else }}
+ {{- $imagePullSecrets = append $imagePullSecrets . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- toYaml $imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.longhornManager.priorityClass }}
priorityClassName: {{ .Values.longhornManager.priorityClass | quote }}