mirror of
https://github.com/truenas/charts.git
synced 2026-05-16 14:12:59 +08:00
NAS-123856 / 24.04 / take size into account when creating a unique name (#1500)
This commit is contained in:
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
name: common
|
||||
description: A library chart for iX Official Catalog
|
||||
type: library
|
||||
version: 1.1.0
|
||||
version: 1.1.1
|
||||
appVersion: v1
|
||||
annotations:
|
||||
title: Common Library Chart
|
||||
|
||||
@@ -14,7 +14,8 @@ objectData: The object data to be used to render the volume.
|
||||
{{- end -}}
|
||||
|
||||
{{- if mustHas $objectData.type (list "nfs-pv-pvc" "smb-pv-pvc") -}}
|
||||
{{- $hashValues := (printf "%s-%s" $objectData.server $objectData.share) -}}
|
||||
{{- $size := $objectData.size | default $rootCtx.Values.fallbackDefaults.pvcSize -}}
|
||||
{{- $hashValues := (printf "%s-%s-%s" $size $objectData.server $objectData.share) -}}
|
||||
{{- if $objectData.domain -}}
|
||||
{{- $hashValues = (printf "%s-%s" $hashValues $objectData.domain) -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
{{/* Validate SMB CSI */}}
|
||||
{{- include "ix.v1.common.lib.storage.smbCSI.validation" (dict "rootCtx" $ "objectData" $objectData) -}}
|
||||
|
||||
{{- $hashValues := (printf "%s-%s" $objectData.server $objectData.share) -}}
|
||||
{{- $size := $objectData.size | default $.Values.fallbackDefaults.pvcSize -}}
|
||||
{{- $hashValues := (printf "%s-%s-%s" $size $objectData.server $objectData.share) -}}
|
||||
{{- if $objectData.domain -}}
|
||||
{{- $hashValues = (printf "%s-%s" $hashValues $objectData.domain) -}}
|
||||
{{- end -}}
|
||||
@@ -71,7 +72,8 @@
|
||||
{{/* Validate NFS CSI */}}
|
||||
{{- include "ix.v1.common.lib.storage.nfsCSI.validation" (dict "rootCtx" $ "objectData" $objectData) -}}
|
||||
|
||||
{{- $hashValues := (printf "%s-%s" $objectData.server $objectData.share) -}}
|
||||
{{- $size := $objectData.size | default $.Values.fallbackDefaults.pvcSize -}}
|
||||
{{- $hashValues := (printf "%s-%s-%s" $size $objectData.server $objectData.share) -}}
|
||||
{{/* Create a unique name taking into account server and share,
|
||||
without this, changing one of those values is not possible */}}
|
||||
{{- $hash := adler32sum $hashValues -}}
|
||||
|
||||
Reference in New Issue
Block a user