作者: 为少 2021-08-28 05:04:19
存储
存储软件
云原生
分布式 您可以在部署 Longhorn 时自定义它的默认设置。例如,您可以在启动 Longhorn 之前指定 Create Default Disk With Node Labeled(创建带有节点标签的默认磁盘) 和 Default Data Path(默认数据路径)。
您可以在部署 Longhorn 时自定义它的默认设置。例如,您可以在启动 Longhorn 之前指定 Create Default Disk With Node Labeled(创建带有节点标签的默认磁盘) 和 Default Data Path(默认数据路径)。
此默认设置仅适用于尚未部署的 Longhorn 系统。它对现有的 Longhorn 系统没有影响。任何现有 Longhorn 系统的设置都应使用 Longhorn UI 进行修改。
可以通过以下方式自定义默认设置:
在 Rancher 的项目视图中,转到 Apps > Launch > Longhorn 并在启动应用程序之前编辑设置。
1.下载 longhorn repo:
- git clone https://github.com/longhorn/longhorn.git
修改 yaml 文件 longhorn/deploy/longhorn.yaml 中名为 longhorn-default-setting 的 config map。例如:
- ---
- apiVersion: v1
- kind: ConfigMap
- metadata:
- name: longhorn-default-setting
- namespace: longhorn-system
- data:
- default-setting.yaml: |-
- backup-target:
- backup-target-credential-secret:
- allow-recurring-job-while-volume-detached:
- create-default-disk-labeled-nodes:
- default-data-path:
- replica-soft-anti-affinity:
- storage-over-provisioning-percentage:
- storage-minimal-available-percentage:
- upgrade-checker:
- default-replica-count:
- default-data-locality:
- guaranteed-engine-cpu:
- default-longhorn-static-storage-class:
- backupstore-poll-interval:
- taint-toleration:
- system-managed-components-node-selector:
- priority-class:
- auto-salvage:
- auto-delete-pod-when-volume-detached-unexpectedly:
- disable-scheduling-on-cordoned-node:
- replica-zone-soft-anti-affinity:
- volume-attachment-recovery-policy:
- node-down-pod-deletion-policy:
- allow-node-drain-with-last-healthy-replica:
- mkfs-ext4-parameters:
- disable-replica-rebuild:
- replica-replenishment-wait-interval:
- disable-revision-counter:
- system-managed-pods-image-pull-policy:
- allow-volume-creation-with-degraded-availability:
- auto-cleanup-system-generated-snapshot:
- concurrent-automatic-engine-upgrade-per-node-limit:
- backing-image-cleanup-wait-interval:
- guaranteed-engine-manager-cpu:
- guaranteed-replica-manager-cpu:
- ---
使用带有 --set 标志的 Helm 命令来修改默认设置。例如:
- helm install longhorn/longhorn \
- --name longhorn \
- --namespace longhorn-system \
- --set defaultSettings.taintToleration="key1=value1:NoSchedule; key2:NoExecute"
您还可以提供一份 values.yaml 文件的副本,其中在运行 Helm 命令时将默认设置修改为 --values 标志:
1.从 GitHub 获取 values.yaml 文件的副本:
- curl -Lo values.yaml https://raw.githubusercontent.com/longhorn/charts/master/charts/longhorn/values.yaml
2.修改 YAML 文件中的默认设置。以下是 values.yaml 的示例片段:
- defaultSettings:
- backupTarget: s3://backupbucket@us-east-1/backupstore
- backupTargetCredentialSecret: minio-secret
- createDefaultDiskLabeledNodes: true
- defaultDataPath: /var/lib/longhorn-example/
- replicaSoftAntiAffinity: false
- storageOverProvisioningPercentage: 600
- storageMinimalAvailablePercentage: 15
- upgradeChecker: false
- defaultReplicaCount: 2
- defaultDataLocality: disabled
- guaranteedEngineCPU:
- defaultLonghornStaticStorageClass: longhorn-static-example
- backupstorePollInterval: 500
- taintToleration: key1=value1:NoSchedule; key2:NoExecute
- systemManagedComponentsNodeSelector: "label-key1:label-value1"
- priority-class: high-priority
- autoSalvage: false
- disableSchedulingOnCordonedNode: false
- replicaZoneSoftAntiAffinity: false
- volumeAttachmentRecoveryPolicy: never
- nodeDownPodDeletionPolicy: do-nothing
- mkfsExt4Parameters: -O ^64bit,^metadata_csum
- guaranteed-engine-manager-cpu: 15
- guaranteed-replica-manager-cpu: 15
3.使用 values.yaml 运行 Helm:
- helm install longhorn/longhorn --name longhorn --namespace longhorn-system --values values.yaml
网站题目:Longhorn,企业级云原生容器分布式存储 - 定制部署默认设置
文章地址:http://www.shufengxianlan.com/qtweb/news37/476237.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联