소스 검색

HPCC-26105 Switch storage planes from using labels: to category:

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 4 년 전
부모
커밋
e43457efce
42개의 변경된 파일240개의 추가작업 그리고 240개의 파일을 삭제
  1. 2 2
      dali/base/dafdesc.cpp
  2. 1 1
      dali/base/dautils.cpp
  3. 1 1
      esp/services/ws_fs/ws_fsService.cpp
  4. 3 3
      esp/smc/SMCLib/TpContainer.cpp
  5. 3 4
      helm/examples/azure/hpcc-azurefile/values.schema.json
  6. 5 5
      helm/examples/azure/hpcc-azurefile/values.yaml
  7. 5 10
      helm/examples/azure/values-auto-azurefile.yaml
  8. 5 10
      helm/examples/azure/values-retained-azurefile.yaml
  9. 3 4
      helm/examples/efs/hpcc-efs/values.schema.json
  10. 5 5
      helm/examples/efs/hpcc-efs/values.yaml
  11. 5 10
      helm/examples/efs/values-auto-efs.yaml
  12. 5 10
      helm/examples/efs/values-retained-efs.yaml
  13. 3 4
      helm/examples/filestore/hpcc-filestore/values.schema.json
  14. 4 4
      helm/examples/filestore/hpcc-filestore/values.yaml
  15. 4 9
      helm/examples/filestore/values-filestore.yaml
  16. 3 4
      helm/examples/local/hpcc-localfile/values.schema.json
  17. 5 5
      helm/examples/local/hpcc-localfile/values.yaml
  18. 5 10
      helm/examples/local/values-localfile.yaml
  19. 3 4
      helm/examples/nfs/hpcc-nfs/values.schema.json
  20. 5 5
      helm/examples/nfs/hpcc-nfs/values.yaml
  21. 4 8
      helm/examples/nfs/values-nfs.yaml
  22. 8 2
      helm/hpcc/docs/changes.md
  23. 32 59
      helm/hpcc/templates/_helpers.tpl
  24. 1 1
      helm/hpcc/templates/dali.yaml
  25. 1 1
      helm/hpcc/templates/dfuserver.yaml
  26. 2 2
      helm/hpcc/templates/esp.yaml
  27. 1 1
      helm/hpcc/templates/storage.yaml
  28. 7 14
      helm/hpcc/values.schema.json
  29. 5 5
      helm/hpcc/values.yaml
  30. 1 1
      helm/storage.rst
  31. 2 2
      plugins/fileservices/fileservices.cpp
  32. 8 2
      testing/helm/errtests/baremetalerr.yaml
  33. 5 5
      testing/helm/errtests/dupmount.yaml
  34. 5 5
      testing/helm/errtests/dupplane.yaml
  35. 21 0
      testing/helm/errtests/nocategory.yaml
  36. 2 0
      testing/helm/errtests/noplanes.yaml
  37. 22 0
      testing/helm/errtests/unknowncategory.yaml
  38. 7 7
      testing/helm/tests/baremetal.yaml
  39. 10 4
      testing/helm/tests/baremetal2.yaml
  40. 9 1
      testing/helm/tests/complex.yaml
  41. 6 5
      testing/helm/tests/implicitplanes.yaml
  42. 6 5
      testing/helm/tests/implicitplanes2.yaml

+ 2 - 2
dali/base/dafdesc.cpp

@@ -3245,8 +3245,8 @@ void GroupInformation::createStoragePlane(IPropertyTree * storage, unsigned copy
     else
         plane->setProp("@prefix", queryBaseDirectory(groupType, copy));
 
-    const char * label = (dropZoneIndex != 0) ? "lz" : "data";
-    addPTreeItem(plane, "labels", label);
+    const char * category = (dropZoneIndex != 0) ? "lz" : "data";
+    plane->setProp("@category", category);
 
     //MORE: If container is identical to this except for the name we could generate an information tag @alias
 }

+ 1 - 1
dali/base/dautils.cpp

@@ -48,7 +48,7 @@
 #define MIN_REDIRECTION_LOAD_INTERVAL 1000
 
 
-constexpr const char * lz_plane_path = "storage/planes[labels='lz']";
+constexpr const char * lz_plane_path = "storage/planes[@category='lz']";
 
 IPropertyTreeIterator * getDropZonePlanesIterator(const char * name)
 {

+ 1 - 1
esp/services/ws_fs/ws_fsService.cpp

@@ -3488,7 +3488,7 @@ bool CFileSprayEx::onGetSprayTargets(IEspContext &context, IEspGetSprayTargetsRe
         context.ensureFeatureAccess(FILE_SPRAY_URL, SecAccess_Read, ECLWATCH_FILE_SPRAY_ACCESS_DENIED, "Permission denied.");
 #ifdef _CONTAINERIZED
         IArrayOf<IEspGroupNode> sprayTargets;
-        Owned<IPropertyTreeIterator> dataPlanes = getGlobalConfigSP()->getElements("storage/planes[labels='data']");
+        Owned<IPropertyTreeIterator> dataPlanes = getGlobalConfigSP()->getElements("storage/planes[@category='data']");
         ForEach(*dataPlanes)
         {
             IPropertyTree & plane = dataPlanes->query();

+ 3 - 3
esp/smc/SMCLib/TpContainer.cpp

@@ -204,7 +204,7 @@ void CTpWrapper::getGroupList(double espVersion, const char* kindReq, IArrayOf<I
 {
     try
     {
-        Owned<IPropertyTreeIterator> dataPlanes = getGlobalConfigSP()->getElements("storage/planes[labels='data']");
+        Owned<IPropertyTreeIterator> dataPlanes = getGlobalConfigSP()->getElements("storage/planes[@category='data']");
         ForEach(*dataPlanes)
         {
             IPropertyTree & plane = dataPlanes->query();
@@ -746,7 +746,7 @@ static void refreshValidTargets()
 static void refreshValidDataPlaneNames()
 {
     validDataPlaneNames.clear();
-    Owned<IPropertyTreeIterator> dataPlanes = getGlobalConfigSP()->getElements("storage/planes[labels='data']");
+    Owned<IPropertyTreeIterator> dataPlanes = getGlobalConfigSP()->getElements("storage/planes[@category='data']");
     ForEach(*dataPlanes)
         validDataPlaneNames.insert(dataPlanes->query().queryProp("@name"));
 }
@@ -806,7 +806,7 @@ StringBuffer & getRoxieDefaultPlane(StringBuffer & plane, const char * roxieName
         return plane;
 
     //Find the first data plane - better if it was retrieved from roxie config
-    Owned<IPropertyTreeIterator> dataPlanes = getGlobalConfigSP()->getElements("storage/planes[labels='data']");
+    Owned<IPropertyTreeIterator> dataPlanes = getGlobalConfigSP()->getElements("storage/planes[@category='data']");
     if (!dataPlanes->first())
         throwUnexpectedX("No default data plane defined");
     return plane.append(dataPlanes->query().queryProp("@name"));

+ 3 - 4
helm/examples/azure/hpcc-azurefile/values.schema.json

@@ -55,10 +55,9 @@
         "sku": {
           "type": "string"
         },
-        "labels": {
-          "description": "a list of labels associated with this plane, e.g. lz, data",
-          "type": "array",
-          "items": { "type": "string" }
+        "category": {
+          "description": "the category this plane is usd for, e.g. lz, data",
+          "type": "string"
         }
       },
       "required": [ "name", "subPath", "size" ],

+ 5 - 5
helm/examples/azure/hpcc-azurefile/values.yaml

@@ -6,29 +6,29 @@ planes:
 - name: dali
   subPath: dalistorage
   size: 1Gi
-  labels: [ "dali" ]
+  category: dali
   #sku: "Standard_LRS"
 - name: dll
   subPath: queries # cannot currently be changed
   size: 1Gi
-  labels: [ "dll" ]
+  category: dll
   rwmany: true
   #sku: "Standard_LRS"
 - name: sasha
   subPath: sasha
   size: 1Gi
   rwmany: true
-  labels: [ "sasha" ]
+  category: sasha
   #sku: "Standard_LRS"
 - name: data
   subPath: hpcc-data # cannot currently be changed
   size: 3Gi
-  labels: [ "data" ] # NB: all "data" planes will be auto mounted by engine components and others that require access to data
+  category: data # NB: all "data" planes will be auto mounted by engine components and others that require access to data
   rwmany: true
   #sku: "Standard_LRS"
 - name: mydropzone
   subPath: dropzone
   size: 1Gi
   rwmany: true
-  labels: [ "lz" ]
+  category: lz
   #sku: "Standard_LRS"

+ 5 - 10
helm/examples/azure/values-auto-azurefile.yaml

@@ -8,36 +8,31 @@ storage:
     storageSize: 1Gi
     storageClass: "azurefile"
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels:
-    - dali
+    category: dali
 
   - name: dll
     prefix: "/var/lib/HPCCSystems/queries"
     storageSize: 1Gi
     storageClass: "azurefile"
-    labels:
-    - dll
+    category: dll
 
   - name: sasha
     storageSize: 1Gi
     storageClass: "azurefile"
     prefix: "/var/lib/HPCCSystems/sashastorage"
-    labels:
-    - sasha
+    category: sasha
 
   - name: data
     storageSize: 1Gi
     storageClass: "azurefile"
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels:
-    - data # NB: if not set, this would be the default
+    category: data
 
   - name: mydropzone
     storageSize: 1Gi
     storageClass: "azurefile"
     prefix: "/var/lib/HPCCSystems/dropzone"
-    labels:
-    - lz
+    category: lz
 
   daliStorage:
     plane: dali

+ 5 - 10
helm/examples/azure/values-retained-azurefile.yaml

@@ -15,32 +15,27 @@ storage:
   - name: dali
     pvc: dali-azstorage-hpcc-azurefile-pvc
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels:
-    - dali
+    category: dali
 
   - name: dll
     pvc: dll-azstorage-hpcc-azurefile-pvc
     prefix: "/var/lib/HPCCSystems/queries"
-    labels:
-    - dll
+    category: dll
 
   - name: sasha
     pvc: sasha-azstorage-hpcc-azurefile-pvc
     prefix: "/var/lib/HPCCSystems/sasha"
-    labels:
-    - sasha
+    category: sasha
 
   - name: data
     pvc: data-azstorage-hpcc-azurefile-pvc
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels:
-    - data # NB: if not set, this would be the default
+    category: data
 
   - name: mydropzone
     pvc: mydropzone-azstorage-hpcc-azurefile-pvc
     prefix: "/var/lib/HPCCSystems/dropzone"
-    labels:
-    - lz
+    category: lz
 
 
   daliStorage:

+ 3 - 4
helm/examples/efs/hpcc-efs/values.schema.json

@@ -55,10 +55,9 @@
         "sku": {
           "type": "string"
         },
-        "labels": {
-          "description": "a list of labels associated with this plane, e.g. lz, data",
-          "type": "array",
-          "items": { "type": "string" }
+        "category": {
+          "description": "the category this plane is usd for, e.g. lz, data",
+          "type": "string"
         }
       },
       "required": [ "name", "subPath", "size" ],

+ 5 - 5
helm/examples/efs/hpcc-efs/values.yaml

@@ -6,24 +6,24 @@ planes:
 - name: dali
   subPath: dalistorage
   size: 1Gi
-  labels: [ "dali" ]
+  category: dali
 - name: dll
   subPath: queries # cannot currently be changed
   size: 1Gi
-  labels: [ "dll" ]
+  category: dll
   rwmany: true
 - name: sasha
   subPath: sasha
   size: 1Gi
   rwmany: true
-  labels: [ "sasha" ]
+  category: sasha
 - name: data
   subPath: hpcc-data
   size: 3Gi
-  labels: [ "data" ] # NB: all "data" planes will be auto mounted by engine components and others that require access to data
+  category: data # NB: all "data" planes will be auto mounted by engine components and others that require access to data
   rwmany: true
 - name: mydropzone
   subPath: dropzone
   size: 1Gi
   rwmany: true
-  labels: [ "lz" ]
+  category: lz

+ 5 - 10
helm/examples/efs/values-auto-efs.yaml

@@ -8,36 +8,31 @@ storage:
     storageSize: 1Gi
     storageClass: "aws-efs"
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels:
-    - dali
+    category: dali
 
   - name: dll
     prefix: "/var/lib/HPCCSystems/queries"
     storageSize: 1Gi
     storageClass: "aws-efs"
-    labels:
-    - dll
+    category: dll
 
   - name: sasha
     storageSize: 1Gi
     storageClass: "aws-efs"
     prefix: "/var/lib/HPCCSystems/sashastorage"
-    labels:
-    - sasha
+    category: sasha
 
   - name: data
     storageSize: 1Gi
     storageClass: "aws-efs"
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels:
-    - data # NB: if not set, this would be the default
+    category: data
 
   - name: mydropzone
     storageSize: 1Gi
     storageClass: "aws-efs"
     prefix: "/var/lib/HPCCSystems/dropzone"
-    labels:
-    - lz
+    category: lz
 
   daliStorage:
     plane: dali

+ 5 - 10
helm/examples/efs/values-retained-efs.yaml

@@ -10,32 +10,27 @@ storage:
   - name: dali
     pvc: dali-awsstorage-hpcc-efs-pvc
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels:
-    - dali
+    category: dali
 
   - name: dll
     pvc: dll-awsstorage-hpcc-efs-pvc
     prefix: "/var/lib/HPCCSystems/queries"
-    labels:
-    - dll
+    category: dll
 
   - name: sasha
     pvc: sasha-awsstorage-hpcc-efs-pvc
     prefix: "/var/lib/HPCCSystems/sasha"
-    labels:
-    - sasha
+    category: sasha
 
   - name: data
     pvc: data-awsstorage-hpcc-efs-pvc
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels:
-    - data # NB: if not set, this would be the default
+    category: data
 
   - name: mydropzone
     pvc: mydropzone-awsstorage-hpcc-efs-pvc
     prefix: "/var/lib/HPCCSystems/dropzone"
-    labels:
-    - lz
+    category: lz
 
 
   dllStorage:

+ 3 - 4
helm/examples/filestore/hpcc-filestore/values.schema.json

@@ -63,10 +63,9 @@
           "description": "Does the pvc require rw many access (data/dll currently)",
           "type": "boolean"
         },
-        "labels": {
-          "description": "a list of labels associated with this plane, e.g. lz, data",
-          "type": "array",
-          "items": { "type": "string" }
+        "category": {
+          "description": "the category this plane is usd for, e.g. lz, data",
+          "type": "string"
         }
       },
       "required": [ "name", "subPath", "size" ],

+ 4 - 4
helm/examples/filestore/hpcc-filestore/values.yaml

@@ -13,19 +13,19 @@ planes:
 - name: dali
   subPath: dalistorage
   size: 1Gi
-  labels: [ "dali" ]
+  category: dali
 - name: dll
   subPath: queries # cannot currently be changed
   size: 1Gi
-  labels: [ "dll" ]
+  category: dll
   rwmany: true
 - name: sasha
   subPath: sasha
   size: 1Gi
   rwmany: true
-  labels: [ "sasha" ]
+  category: sasha
 - name: data
   subPath: hpcc-data
   size: 3Gi
-  labels: [ "data" ] # NB: all "data" planes will be auto mounted by engine components and others that require access to data
+  category: data # NB: all "data" planes will be auto mounted by engine components and others that require access to data
   rwmany: true

+ 4 - 9
helm/examples/filestore/values-filestore.yaml

@@ -10,27 +10,22 @@ storage:
   - name: dali
     pvc: dali-gcpstorage-hpcc-filestore-pvc
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels:
-    - dali
+    category: dali
 
   - name: dll
     pvc: dll-gcpstorage-hpcc-filestore-pvc
     prefix: "/var/lib/HPCCSystems/queries"
-    labels:
-    - dll
+    category: dll
 
   - name: sasha
     pvc: sasha-gcpstorage-hpcc-filestore-pvc
     prefix: "/var/lib/HPCCSystems/sasha"
-    labels:
-    - sasha
+    category: sasha
 
   - name: data
     pvc: data-gcpstorage-hpcc-filestore-pvc
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels:
-    - data # NB: if not set, this would be the default
-
+    category: data # NB: if not set, this would be the default
 
 
   dllStorage:

+ 3 - 4
helm/examples/local/hpcc-localfile/values.schema.json

@@ -52,10 +52,9 @@
           "description": "Does the pvc require rw many access (data/dll currently)",
           "type": "boolean"
         },
-        "labels": {
-          "description": "a list of labels associated with this plane, e.g. lz, data",
-          "type": "array",
-          "items": { "type": "string" }
+        "category": {
+          "description": "the category this plane is usd for, e.g. lz, data",
+          "type": "string"
         }
       },
       "required": [ "name", "subPath", "size" ],

+ 5 - 5
helm/examples/local/hpcc-localfile/values.yaml

@@ -10,25 +10,25 @@ planes:
 - name: dali
   subPath: dalistorage
   size: 1Gi
-  labels: [ "dali" ]
+  category: dali
 - name: dll
   subPath: queries # cannot currently be changed
   size: 1Gi
-  labels: [ "dll" ]
+  category: dll
   rwmany: true
 - name: sasha
   subPath: sasha
   size: 1Gi
   rwmany: true
-  labels: [ "sasha" ]
+  category: sasha
 - name: data
   subPath: hpcc-data # cannot currently be changed
   size: 3Gi
-  labels: [ "data" ] # NB: all "data" planes will be auto mounted by engine components and others that require access to data
+  category: data # NB: all "data" planes will be auto mounted by engine components and others that require access to data
   rwmany: true
 - name: mydropzone
   subPath: dropzone
   size: 1Gi
   rwmany: true
-  labels: [ "lz" ]
+  category: lz
 

+ 5 - 10
helm/examples/local/values-localfile.yaml

@@ -15,32 +15,27 @@ storage:
   - name: dali
     pvc: dali-hpcc-localfile-pvc
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels:
-    - dali
+    category: dali
 
   - name: dll
     pvc: dll-hpcc-localfile-pvc
     prefix: "/var/lib/HPCCSystems/queries"
-    labels:
-    - dll
+    category: dll
 
   - name: sasha
     pvc: sasha-hpcc-localfile-pvc
     prefix: "/var/lib/HPCCSystems/sasha"
-    labels:
-    - sasha
+    category: sasha
 
   - name: data
     pvc: data-hpcc-localfile-pvc
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels:
-    - data # NB: if not set, this would be the default
+    category: data
 
   - name: mydropzone
     pvc: mydropzone-hpcc-localfile-pvc
     prefix: "/var/lib/HPCCSystems/dropzone"
-    labels:
-    - lz
+    category: lz
 
 
   daliStorage:

+ 3 - 4
helm/examples/nfs/hpcc-nfs/values.schema.json

@@ -67,10 +67,9 @@
           "description": "Does the pvc require rw many access (data/dll currently)",
           "type": "boolean"
         },
-        "labels": {
-          "description": "a list of labels associated with this plane, e.g. lz, data",
-          "type": "array",
-          "items": { "type": "string" }
+        "category": {
+          "description": "the category this plane is usd for, e.g. lz, data",
+          "type": "string"
         }
       },
       "required": [ "name", "size" ],

+ 5 - 5
helm/examples/nfs/hpcc-nfs/values.yaml

@@ -14,24 +14,24 @@ planes:
 - name: dali
   subPath: dalistorage
   size: 1Gi
-  labels: [ "dali" ]
+  category: dali
 - name: dll
   subPath: queries # cannot currently be changed
   size: 1Gi
-  labels: [ "dll" ]
+  category: dll
   rwmany: true
 - name: sasha
   subPath: sasha
   size: 1Gi
   rwmany: true
-  labels: [ "sasha" ]
+  category: sasha
 - name: data
   subPath: hpcc-data
   size: 3Gi
-  labels: [ "data" ] # NB: all "data" planes will be auto mounted by engine components and others that require access to data
+  category: data # NB: all "data" planes will be auto mounted by engine components and others that require access to data
   rwmany: true
 - name: mydropzone
   subPath: dropzone
   size: 1Gi
   rwmany: true
-  labels: [ "lz" ]
+  category: lz

+ 4 - 8
helm/examples/nfs/values-nfs.yaml

@@ -10,26 +10,22 @@ storage:
   - name: dali
     pvc: dali-nfsstorage-hpcc-nfs-pvc
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels:
-    - dali
+    category: dali
 
   - name: dll
     pvc: dll-nfsstorage-hpcc-nfs-pvc
     prefix: "/var/lib/HPCCSystems/queries"
-    labels:
-    - dll
+    category: dll
 
   - name: sasha
     pvc: sasha-nfsstorage-hpcc-nfs-pvc
     prefix: "/var/lib/HPCCSystems/sasha"
-    labels:
-    - sasha
+    category: sasha
 
   - name: data
     pvc: data-nfsstorage-hpcc-nfs-pvc
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels:
-    - data # NB: if not set, this would be the default
+    category: data
 
 
   dllStorage:

+ 8 - 2
helm/hpcc/docs/changes.md

@@ -132,6 +132,12 @@ define a storage plane.  That implicit plane could be based on a pre-existing pe
 existingClaim) or ephemeral storage (by setting storageClass and storageSize).  In version 8.2. these sections can
 only refer to a plane defined in the plane list.
 
+Another change is that previously a storage plane had a labels: attribute to indicate what kind of data was stored on
+the plane.  It was a list, and if blank defaulted to \[ data \].  This has now become a single valued "category" attribute.
+In the unlikely event of wanting to have multiple categories stored on the same mounted drive, it is possible to define
+a plane with a duplicate prefix and storage definition with a different category.  Planes also support the subPath
+attribute to allow a subdirectory to be used within a mount point.
+
 For instance if you have the following definition in 8.0.x:
 
 ```code
@@ -147,7 +153,7 @@ storage:
   - name: dali
     pvc: my-pvc
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels: [ "dali" ]
+    category: dali
 
   daliStorage:
      name: dali
@@ -170,7 +176,7 @@ storage:
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels: [ "dali" ]
+    category: dali
 
   daliStorage:
      name: dali

+ 32 - 59
helm/hpcc/templates/_helpers.tpl

@@ -68,16 +68,15 @@ Translate a port list to a comma-separated list
  {{- end -}}
 {{- end -}}
 
-{{- define "hpcc.getFirstPlaneForLabel" -}}
+{{- define "hpcc.getFirstPlaneForCategory" -}}
 {{- $root := .root -}}
-{{- $label := .label -}}
+{{- $category := .category -}}
 {{- $storage := ($root.Values.storage | default dict) -}}
 {{- $planes := ($storage.planes | default list) -}}
 {{- $firstPlane := dict -}}
 {{- range $plane := $planes -}}
 {{- if not $firstPlane.plane -}}
-{{- $labels := $plane.labels | default (list "data") -}}
-{{- if (has $label $labels) -}}
+{{- if (eq $category $plane.category) -}}
 {{- $_ := set $firstPlane "plane" $plane.name -}}
 {{- end -}}
 {{- end -}}
@@ -87,8 +86,8 @@ Translate a port list to a comma-separated list
 {{- end -}}
 {{- end -}}
 
-{{- define "hpcc.hasPlaneForLabel" -}}
-{{- if (include "hpcc.getFirstPlaneForLabel" .) -}}
+{{- define "hpcc.hasPlaneForCategory" -}}
+{{- if (include "hpcc.getFirstPlaneForCategory" .) -}}
 true
 {{- end -}}
 {{- end -}}
@@ -99,7 +98,7 @@ Get default data plane
 {{- define "hpcc.getDefaultDataPlane" -}}
 {{- $storage := ($.Values.storage | default dict) -}}
 {{- $dataStorage := ($storage.dataStorage | default dict) -}}
-{{- $firstPlane := (include "hpcc.getFirstPlaneForLabel" (dict "root" $ "label" "data")) -}}
+{{- $firstPlane := (include "hpcc.getFirstPlaneForCategory" (dict "root" $ "category" "data")) -}}
 {{- $dataStorage.plane | default $firstPlane | default "hpcc-data-plane" -}}
 {{- end -}}
 
@@ -109,7 +108,7 @@ Get default dll plane
 {{- define "hpcc.getDefaultDllPlane" -}}
 {{- $storage := ($.Values.storage | default dict) -}}
 {{- $dllStorage := ($storage.dllStorage | default dict) -}}
-{{- $firstPlane := (include "hpcc.getFirstPlaneForLabel" (dict "root" $ "label" "dll")) -}}
+{{- $firstPlane := (include "hpcc.getFirstPlaneForCategory" (dict "root" $ "category" "dll")) -}}
 {{- $dllStorage.plane | default $firstPlane | default "hpcc-dll-plane" -}}
 {{- end -}}
 
@@ -145,12 +144,8 @@ storage:
   planes:
 {{- /*Generate entries for each data plane (removing the pvc).  Exclude the planes used for dlls and dali.*/ -}}
 {{- range $plane := $planes -}}
- {{- if or (not $plane.labels) (or (has "data" $plane.labels) (has "lz" $plane.labels)) }}
+ {{- if or (eq "data" $plane.category) (eq "lz" $plane.category) }}
   - name: {{ $plane.name | quote }}
-  {{- if not $plane.labels }}
-    labels:
-    - data
-  {{- end -}}
   {{- $planeYaml := omit $plane "name" "pvc" "storageClass" "storageSize" "subPath" -}}
   {{- if $plane.subPath -}}
    {{- $_ := set $planeYaml "prefix" (printf "%s/%s" $planeYaml.prefix $plane.subPath) -}}
@@ -160,15 +155,14 @@ storage:
 {{- end }}
 {{- /* Add implicit planes if data or spill storage plane not specified*/ -}}
 {{- if not $dataStorage.plane }}
-{{- if not (include "hpcc.hasPlaneForLabel" (dict "root" $ "label" "data")) }}
+{{- if not (include "hpcc.hasPlaneForCategory" (dict "root" $ "category" "data")) }}
   - name: hpcc-data-plane
-    labels:
-    - data
+    category: data
     prefix: {{ .Values.global.defaultDataPath | default "/var/lib/HPCCSystems/hpcc-data" | quote }}
 {{- end }}
 {{- end }}
 {{- if not $spillStorage.plane }}
-{{- if not (include "hpcc.hasPlaneForLabel" (dict "root" $ "label" "spill")) }}
+{{- if not (include "hpcc.hasPlaneForCategory" (dict "root" $ "category" "spill")) }}
   - name: hpcc-spill-plane
     prefix: {{ .Values.global.defaultSpillPath | default "/var/lib/HPCCSystems/hpcc-spill" | quote }}
 {{- end }}
@@ -241,26 +235,8 @@ Add ConfigMap volume for a component
 {{- end -}}
 
 {{/*
-Returns a non empty string if any labels in the list includeLabels is in the plane.labels
-Note: the list includeLabels may contain an empty string (""), which matches planes that do not have a label
-Pass in plane and includeLabels
-Return: If there is any matching labels, there will be a non-empty string returned.  If there is no matching labels,
-        an empty string will be returned.
-*/}}
-{{- define "hpcc.doesStorageLabelsMatch" -}}
-{{- $plane := .plane -}}
-  {{- range $label := .includeLabels -}}
-    {{- if and (eq $label "data") (not $plane.labels) -}}
-      {{- print "T" -}}
-    {{- else if has $label $plane.labels -}}
-      {{- print "T" -}}
-    {{- end -}}
-  {{- end -}}
-{{- end -}}
-
-{{/*
 Add volume mounts
-Pass in root and includeLabels (optional)
+Pass in root and includeCategories (optional)
 Note: if there are multiple planes (other than dll, dali and spill planes), they should be all called with a single call
 to addVolumeMounts so that if a plane can be used for multiple purposes then duplicate volume mounts are not created.
 */}}
@@ -268,14 +244,13 @@ to addVolumeMounts so that if a plane can be used for multiple purposes then dup
 {{- /*Create local variables which always exist to avoid having to check if intermediate key values exist*/ -}}
 {{- $storage := (.root.Values.storage | default dict) -}}
 {{- $planes := ($storage.planes | default list) -}}
-{{- $includeLabels := .includeLabels | default list -}}
+{{- $includeCategories := .includeCategories | default list -}}
 {{- $previousMounts := dict -}}
 {{- range $plane := $planes -}}
  {{- if or ($plane.pvc) (hasKey $plane "storageClass") -}}
   {{- if not (hasKey $previousMounts $plane.prefix) -}}
    {{- $mountpath := $plane.prefix -}}
-   {{- $matchedLabels := include "hpcc.doesStorageLabelsMatch" (dict "plane" $plane "includeLabels" $includeLabels) }}
-   {{- if ne $matchedLabels "" }}
+   {{- if has $plane.category $includeCategories }}
     {{- $num := int ( $plane.numDevices | default 1 ) -}}
     {{- if le $num 1 }}
 - name: {{ lower $plane.name }}-pv
@@ -297,8 +272,8 @@ Note: Some services used addVolumeMounts to add data planes and other types of p
 to be located here rather than in addDataVolumeMount.
 */ -}}
 {{- $dataStorage := ($storage.dataStorage | default dict) -}}
-{{- if and (has "data" $includeLabels) (not $dataStorage.plane) }}
-{{- if (not (include "hpcc.hasPlaneForLabel" (dict "root" .root "label" "data"))) }}
+{{- if and (has "data" $includeCategories) (not $dataStorage.plane) }}
+{{- if (not (include "hpcc.hasPlaneForCategory" (dict "root" .root "category" "data"))) }}
 - name: datastorage
   mountPath: "/var/lib/HPCCSystems/hpcc-data"
 {{- end }}
@@ -310,12 +285,12 @@ Add data volume mount
 Pass in root
 */}}
 {{- define "hpcc.addDataVolumeMount" -}}
-{{- include "hpcc.addVolumeMounts" (dict "root" .root "includeLabels" (list "data" "lz")) -}}
+{{- include "hpcc.addVolumeMounts" (dict "root" .root "includeCategories" (list "data" "lz")) -}}
 {{- end -}}
 
 {{/*
 Add volumes
-Pass in root, includeLabels (optional) and includeNames (optional)
+Pass in root, includeCategories (optional) and includeNames (optional)
 The plane will generate a volume if it matches either an includeLabel or an includeName
 */}}
 {{- define "hpcc.addVolumes" -}}
@@ -323,15 +298,14 @@ The plane will generate a volume if it matches either an includeLabel or an incl
 {{- $storage := (.root.Values.storage | default dict) -}}
 {{- $dataStorage := ($storage.dataStorage | default dict) -}}
 {{- $planes := ($storage.planes | default list) -}}
-{{- $includeLabels := .includeLabels | default list -}}
+{{- $includeCategories := .includeCategories | default list -}}
 {{- $includeNames := .includeNames | default list -}}
 {{- $previousMounts := dict -}}
 {{- range $plane := $planes -}}
  {{- if or ($plane.pvc) (hasKey $plane "storageClass") -}}
   {{- if not (hasKey $previousMounts $plane.prefix) -}}
    {{- $mountpath := $plane.prefix -}}
-   {{- $matchedLabels := include "hpcc.doesStorageLabelsMatch" (dict "plane" $plane "includeLabels" $includeLabels) -}}
-   {{- if or ($matchedLabels) (has $plane.name $includeNames) }}
+   {{- if or (has $plane.category $includeCategories) (has $plane.name $includeNames) }}
     {{- $pvc := hasKey $plane "pvc" | ternary $plane.pvc (printf "%s-%s-pvc" (include "hpcc.fullname" $) $plane.name) -}}
     {{- $num := int ( $plane.numDevices | default 1 ) -}}
     {{- if le $num 1 }}
@@ -357,7 +331,7 @@ Add data volume
 Pass in dict with root
 */}}
 {{- define "hpcc.addDataVolume" -}}
-{{- include "hpcc.addVolumes" (dict "root" .root "includeLabels" (list "data" "" "lz") ) -}}
+{{- include "hpcc.addVolumes" (dict "root" .root "includeCategories" (list "data" "lz") ) -}}
 {{- end -}}
 
 {{/*
@@ -397,7 +371,7 @@ Add dll volume mount - if default plane is used, or the dll storage plane specif
 Pass in dict with root
 */}}
 {{- define "hpcc.addDllVolumeMount" -}}
-{{- include "hpcc.addVolumeMounts" (dict "root" .root "includeLabels" (list "dll")) -}}
+{{- include "hpcc.addVolumeMounts" (dict "root" .root "includeCategories" (list "dll")) -}}
 {{- end -}}
 
 {{/*
@@ -405,7 +379,7 @@ Add dali volume mount - if default plane is used, or the dali storage plane spec
 Pass in dict with root
 */}}
 {{- define "hpcc.addDaliVolumeMount" -}}
-{{- include "hpcc.addVolumeMounts" (dict "root" .root "includeLabels" (list "dali")) -}}
+{{- include "hpcc.addVolumeMounts" (dict "root" .root "includeCategories" (list "dali")) -}}
 {{- end -}}
 
 {{/*
@@ -413,7 +387,7 @@ Add dll volume - if default plane is used, or the dll storage plane specifies a
 Pass in dict with root
 */}}
 {{- define "hpcc.addDllVolume" -}}
-{{- include "hpcc.addVolumes" (dict "root" .root "includeLabels" (list "dll") ) }}
+{{- include "hpcc.addVolumes" (dict "root" .root "includeCategories" (list "dll") ) }}
 {{- end -}}
 
 {{/*
@@ -421,7 +395,7 @@ Add dali volume - if default plane is used, or the dali storage plane specifies
 Pass in dict with root
 */}}
 {{- define "hpcc.addDaliVolume" -}}
-{{- include "hpcc.addVolumes" (dict "root" .root "includeLabels" (list "dali") ) }}
+{{- include "hpcc.addVolumes" (dict "root" .root "includeCategories" (list "dali") ) }}
 {{- end -}}
 
 {{/*
@@ -606,13 +580,12 @@ A kludge to ensure mounted storage (e.g. for nfs, minikube or docker for desktop
 {{- define "hpcc.changePlaneMountPerms" -}}
 {{- $storage := (.root.Values.storage | default dict) -}}
 {{- $planes := ($storage.planes | default list) -}}
-{{- $includeLabels := .includeLabels | default list -}}
+{{- $includeCategories := .includeCategories | default list -}}
 {{- $includeNames := .includeNames | default list -}}
 {{- range $plane := $planes -}}
  {{- if and ($plane.forcePermissions) (or ($plane.pvc) (hasKey $plane "storageClass")) -}}
   {{- $mountpath := $plane.prefix -}}
-  {{- $matchedLabels := include "hpcc.doesStorageLabelsMatch" (dict "plane" $plane "includeLabels" $includeLabels) }}
-  {{- if or ($matchedLabels) (has $plane.name $includeNames) }}
+  {{- if or (has $plane.category $includeCategories) (has $plane.name $includeNames) }}
 {{- $volumeName := (printf "%s-pv" $plane.name) -}}
 {{ include "hpcc.changeMountPerms" (dict "root" .root "volumeName" $volumeName "volumePath" $plane.prefix) }}
 {{- end }}
@@ -670,7 +643,7 @@ Add wait-and-run shared inter container volume
 Check dll mount point, using hpcc.changeMountPerms
 */}}
 {{- define "hpcc.checkDllMount" -}}
-{{ include "hpcc.changePlaneMountPerms" (dict "root" .root "includeLabels" (list "dll")) }}
+{{ include "hpcc.changePlaneMountPerms" (dict "root" .root "includeCategories" (list "dll")) }}
 {{- end }}
 
 {{/*
@@ -678,14 +651,14 @@ Check datastorage mount point, using hpcc.changeMountPerms
 Pass in a dictionary with root
 */}}
 {{- define "hpcc.checkDataMount" -}}
-{{ include "hpcc.changePlaneMountPerms" (dict "root" .root "includeLabels" (list "" "data" "lz")) }}
+{{ include "hpcc.changePlaneMountPerms" (dict "root" .root "includeCategories" (list "data" "lz")) }}
 {{- end }}
 
 {{/*
 Check dalistorage mount point, using hpcc.changeMountPerms
 */}}
 {{- define "hpcc.checkDaliMount" -}}
-{{ include "hpcc.changePlaneMountPerms" (dict "root" .root "includeLabels" (list "dali")) }}
+{{ include "hpcc.changePlaneMountPerms" (dict "root" .root "includeCategories" (list "dali")) }}
 {{- end }}
 
 
@@ -1076,8 +1049,8 @@ spec:
 {{- end -}}
 
 {{/*
-A template to generate PVCs for each storage plane that has storageSize defined and has the appropriate label
-Pass in dict with root, label.  optional name to restrict it to a single name.
+A template to generate PVCs for each storage plane that has storageSize defined and has the appropriate category
+Pass in dict with root, category.  optional name to restrict it to a single name.
 */}}
 {{- define "hpcc.addPVCsFromPlanes" }}
 {{- $storage := (.Values.storage | default dict) }}

+ 1 - 1
helm/hpcc/templates/dali.yaml

@@ -66,7 +66,7 @@ spec:
       {{- end }}
       {{- end }}
       initContainers: 
-        {{- include "hpcc.changePlaneMountPerms" (dict "root" $ "includeLabels" (list "dali") "includeNames" (uniq $sashaPlanes)) | indent 8 }}
+        {{- include "hpcc.changePlaneMountPerms" (dict "root" $ "includeCategories" (list "dali") "includeNames" (uniq $sashaPlanes)) | indent 8 }}
       containers:
       - name: {{ $dali.name | quote }}
         workingDir: /var/lib/HPCCSystems

+ 1 - 1
helm/hpcc/templates/dfuserver.yaml

@@ -39,7 +39,7 @@ data:
 {{- if not .disabled -}}
 {{- $env := concat ($.Values.global.env | default list) (.env | default list) -}}
 {{- $secretsCategories := list "system" "storage" -}}
-{{- $commonCtx := dict "root" $ "me" . "secretsCategories" $secretsCategories "includeLabels" (list "lz" "data") "env" $env }}
+{{- $commonCtx := dict "root" $ "me" . "secretsCategories" $secretsCategories "includeCategories" (list "lz" "data") "env" $env }}
 {{- $configSHA := include "hpcc.getConfigSHA" ($commonCtx | merge (dict "configMapHelper" "hpcc.dfuServerConfigMap" "component" "dfuserver" "excludeKeys" "global")) -}}
 apiVersion: apps/v1
 kind: Deployment

+ 2 - 2
helm/hpcc/templates/esp.yaml

@@ -72,8 +72,8 @@ data:
 {{- $env := concat ($.Values.global.env | default list) (.env | default list) -}}
 {{- $application := .application | default "eclwatch" -}}
 {{- $secretsCategories := ternary (list "storage" "esp" "codeSign" "codeVerify")  (list "storage" "esp") (eq $application "eclwatch") -}}
-{{- $includeStorageLabels := ternary (list "lz" "data" "") (list "data" "") (eq $application "eclwatch") -}}
-{{- $commonCtx := dict "root" $ "me" . "secretsCategories" $secretsCategories  "includeLabels" $includeStorageLabels "env" $env -}}
+{{- $includeStorageCategories := ternary (list "lz" "data") (list "data") (eq $application "eclwatch") -}}
+{{- $commonCtx := dict "root" $ "me" . "secretsCategories" $secretsCategories  "includeCategories" $includeStorageCategories "env" $env -}}
 {{- $configSHA := include "hpcc.getConfigSHA" ($commonCtx | merge (dict "configMapHelper" "hpcc.espConfigMap" "component" "esp" "excludeKeys" "global,esp.queues")) }}
 
 apiVersion: apps/v1

+ 1 - 1
helm/hpcc/templates/storage.yaml

@@ -34,7 +34,7 @@
   {{- required (printf "Storage plane '%s' is defined more than once" $plane.name) nil -}}
  {{- end -}}
  {{- $_ := set $previousPlanes $plane.name true -}}
- {{- $rawPlane := omit $plane "name" "labels" -}}
+ {{- $rawPlane := omit $plane "name" "category" "subPath" -}}
  {{- if hasKey $previousMounts $plane.prefix -}}
   {{- /* Should this restrict if has a pvc or a storage class? */ -}}
   {{- if not (deepEqual (get $previousMounts $plane.prefix) $rawPlane) -}}

+ 7 - 14
helm/hpcc/values.schema.json

@@ -391,15 +391,8 @@
     },
     "storagePlanes": {
       "description": "storage plane definitions",
-      "oneOf": [
-        {
-          "type": "array",
-          "items": { "$ref": "#/definitions/storagePlane" }
-        },
-        {
-          "type": "null"
-        }
-      ]
+      "type": "array",
+      "items": { "$ref": "#/definitions/storagePlane" }
     },
     "storagePlane": {
       "description": "information about an individual storage plane",
@@ -447,10 +440,10 @@
           "type": "array",
           "items": { "type": "string" }
         },
-        "labels": {
-          "description": "a list of labels associated with this plane, e.g. lz, data, dali, sasha, dlls, spill. NB: if blank/unset, treated as if 'data'",
-          "type": "array",
-          "items": { "type": "string" }
+        "category": {
+          "description": "the category this plane is usd for, e.g. lz, data",
+          "type": "string",
+          "enum": ["data", "lz", "dali", "sasha", "dll", "spill" ]
         },
         "umask" : {
           "description": "file creation mask (used by despray)",
@@ -484,7 +477,7 @@
         }
 
       },
-      "required": [ "name", "prefix" ],
+      "required": [ "name", "prefix", "category" ],
       "additionalProperties": false
     },
     "resources": {

+ 5 - 5
helm/hpcc/values.yaml

@@ -140,27 +140,27 @@ storage:
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels: [ "dali" ]
+    category: dali
   - name: sasha
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/sashastorage"
-    labels: [ "sasha" ]
+    category: sasha
   - name: dll
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/queries"
-    labels: [ "dll" ]
+    category: dll
   - name: data
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels: [ "data" ]
+    category: data
   - name: mydropzone
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/dropzone"
-    labels: [ "lz" ]
+    category: lz
 
   dllStorage:
     plane: dll

+ 1 - 1
helm/storage.rst

@@ -48,7 +48,7 @@ planes:
 
   numDevices: The number of logical storage devices.  An advanced option.  This allows data to be striped over multiple storage locations.  If it is set, then it assumes pvc defines a set of pvcs: ``pvc-1`` .. ``pvc-<n>``, which are mounted at locations ``prefix/d1`` .. ``prefix/d<n>``.  (Not yet implemented and likely to change!)
 
-  labels:  A list of uses which the plane is used for.  On a simple system it may make sense to place dali, dlls and sasha all on the same volume.
+  category:  The category of data which is stored on the plane - one of (data, lz, dali, sasha, dll, spill).  On a simple system it may make sense to place dali, dlls and sasha all on the same volume - in which case multiple planes can be defined with exactly the same definition, but different categories (and subPaths).
 
 
 The planes are used by refering to them in the plane tag in the appropriate storage section.  E.g. ``--set storage.daliStorage.plane=dali-plane``.

+ 2 - 2
plugins/fileservices/fileservices.cpp

@@ -3011,7 +3011,7 @@ FILESERVICES_API char * FILESERVICES_CALL fsGetEspURL(const char *username, cons
 FILESERVICES_API char * FILESERVICES_CALL fsGetDefaultDropZone()
 {
     StringBuffer dropZonePath;
-    Owned<IPropertyTreeIterator> dropZones = getGlobalConfigSP()->getElements("storage/planes[labels='lz']");
+    Owned<IPropertyTreeIterator> dropZones = getGlobalConfigSP()->getElements("storage/planes[@category='lz']");
     if (dropZones->first())
         dropZones->query().getProp("@prefix", dropZonePath);        // Why the directory? seems a very stange choice
     return strdup(dropZonePath.str());
@@ -3020,7 +3020,7 @@ FILESERVICES_API char * FILESERVICES_CALL fsGetDefaultDropZone()
 FILESERVICES_API void FILESERVICES_CALL fsGetDropZones(ICodeContext *ctx, size32_t & __lenResult, void * & __result)
 {
     MemoryBuffer mb;
-    Owned<IPropertyTreeIterator> dropZones = getGlobalConfigSP()->getElements("storage/planes[labels='lz']");
+    Owned<IPropertyTreeIterator> dropZones = getGlobalConfigSP()->getElements("storage/planes[@category='lz']");
     ForEach(*dropZones)
     {
         const char * directory = dropZones->query().queryProp("@prefix");

+ 8 - 2
testing/helm/errtests/baremetalerr.yaml

@@ -21,22 +21,28 @@ storage:
   - name: demoOne
     prefix: /home/gavin/temp
     hostGroup: demoOne
+    category: data
   - name: myDropZone
     prefix: /home/gavin/temp
     hosts: [ '192.168.86.202']
-    labels: ['lz']
+    category: 'lz'
   - name: demoTwo
     prefix: /home/gavin/temp/demoTwo
     hostGroup: demoTwo
+    category: data
   - name: demoTwoReplica
     prefix: /home/gavin/temp/demoTwo
     hostGroup: demoThree
+    category: data
   - name: demoTwoA
     prefix: /home/gavin/temp/demoTwoA
     hostGroup: demoTwoA
+    category: data
   - name: demoTwoB
     prefix: /home/gavin/temp/demoTwoB
     hostGroup: demoTwoB
+    category: data
   - name: myInlinePlane
     prefix: /home/gavin/temp
-    hostGroup: [ 'here', 'there', 'everywhere']     # error - list is not allowed here, use hosts
+    hostGroup: [ 'here', 'there', 'everywhere']     # error - list is not allowed here, use hosts
+    category: data

+ 5 - 5
testing/helm/errtests/dupmount.yaml

@@ -4,24 +4,24 @@ storage:
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels: [ "dali" ]
+    category: dali
   - name: sasha
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/sashastorage"
-    labels: [ "sasha" ]
+    category: sasha
   - name: dll
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/queries"
-    labels: [ "dll" ]
+    category: dll
   - name: data
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels: [ "data" ]
+    category: data
   - name: mydropzone
     storageClass: ""
     storageSize: 3Gi
     prefix: "/var/lib/HPCCSystems/queries"
-    labels: [ "lz" ]
+    category: lz

+ 5 - 5
testing/helm/errtests/dupplane.yaml

@@ -4,24 +4,24 @@ storage:
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/dalistorage"
-    labels: [ "dali" ]
+    category: dali
   - name: sasha
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/sashastorage"
-    labels: [ "sasha" ]
+    category: sasha
   - name: dll
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/queries"
-    labels: [ "dll" ]
+    category: dll
   - name: data
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/hpcc-data"
-    labels: [ "data" ]
+    category: data
   - name: data
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/dropzone"
-    labels: [ "lz" ]
+    category: lz

+ 21 - 0
testing/helm/errtests/nocategory.yaml

@@ -0,0 +1,21 @@
+storage:
+  planes:
+  - name: sasha
+    storageClass: ""
+    storageSize: 1Gi
+    prefix: "/var/lib/HPCCSystems/sashastorage"
+  - name: dll
+    storageClass: ""
+    storageSize: 1Gi
+    prefix: "/var/lib/HPCCSystems/queries"
+    category: "dll"
+  - name: data
+    storageClass: ""
+    storageSize: 1Gi
+    prefix: "/var/lib/HPCCSystems/hpcc-data"
+    category: "data"
+  - name: mydropzone
+    storageClass: ""
+    storageSize: 3Gi
+    prefix: "/var/lib/HPCCSystems/queries"
+    category: "lz"

+ 2 - 0
testing/helm/errtests/noplanes.yaml

@@ -0,0 +1,2 @@
+storage:
+  planes: null

+ 22 - 0
testing/helm/errtests/unknowncategory.yaml

@@ -0,0 +1,22 @@
+storage:
+  planes:
+  - name: sasha
+    storageClass: ""
+    storageSize: 1Gi
+    prefix: "/var/lib/HPCCSystems/sashastorage"
+    category: unknown
+  - name: dll
+    storageClass: ""
+    storageSize: 1Gi
+    prefix: "/var/lib/HPCCSystems/queries"
+    category: dll
+  - name: data
+    storageClass: ""
+    storageSize: 1Gi
+    prefix: "/var/lib/HPCCSystems/hpcc-data"
+    category: data
+  - name: mydropzone
+    storageClass: ""
+    storageSize: 3Gi
+    prefix: "/var/lib/HPCCSystems/queries"
+    category: lz

+ 7 - 7
testing/helm/tests/baremetal.yaml

@@ -21,40 +21,40 @@ storage:
   planes:
   #Bare metal system with attached storage
   - name: thor400
-    labels: [ data ]
+    category: data
     prefix: /var/lib/hpccsystems/hpcc-data       # only used if the local host matches the host for the device
     hostGroup: thor400
     replication: [ attachedThor400MirrorPlane ]
     #numDevices: count(hosts)
   - name: thor400mirror
-    labels: [ data ]
+    category: data
     prefix: /var/lib/hpccsystems/hpcc-mirror       # only used if the local host matches the host for the device
     hostGroup: thor400mirror
     #Does any other information about the replication policy need to be included?  I don't think it does....
 
   - name: thor100_4
-    labels: [ data ]
+    category: data
     prefix: /var/lib/hpccsystems/hpcc-data       # only used if the local host matches the host for the device
     hostGroup: thor100_4
     replication: [ azureBlobPlane ]
 
   - name: azureBlobPlane
-    labels: [ data ]
+    category: data
     prefix: azure://ghallidaystorage      # Not sure if this should be different from the mount.
     secret: azure-ghallidaystorage
 
   - name: dali
-    labels: [ dali ]
+    category: dali
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/dalistorage"
   - name: dll
-    labels: [ dll ]
+    category: dll
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/queries"
   - name: sasha
-    labels: [ sasha ]
+    category: sasha
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/sashastorage"

+ 10 - 4
testing/helm/tests/baremetal2.yaml

@@ -19,40 +19,46 @@ storage:
 
   planes:
   - name: demoOne
+    category: data
     prefix: /home/gavin/temp
     hostGroup: demoOne
   - name: myDropZone
     prefix: /home/gavin/temp
     hosts: [ '192.168.86.202']
-    labels: ['lz']
+    category: 'lz'
   - name: demoTwo
     prefix: /home/gavin/temp/demoTwo
     hostGroup: demoTwo
+    category: data
   - name: demoTwoReplica
     prefix: /home/gavin/temp/demoTwo
     hostGroup: demoThree
+    category: data
   - name: demoTwoA
     prefix: /home/gavin/temp/demoTwoA
     hostGroup: demoTwoA
+    category: data
   - name: demoTwoB
     prefix: /home/gavin/temp/demoTwoB
     hostGroup: demoTwoB
+    category: data
   - name: myInlinePlane
     prefix: /home/gavin/temp
     hosts: [ 'here', 'there', 'everywhere']
+    category: data
 
   - name: dali
-    labels: [ dali ]
+    category: dali
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/dalistorage"
   - name: dll
-    labels: [ dll ]
+    category: dll
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/queries"
   - name: sasha
-    labels: [ sasha ]
+    category: sasha
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/sashastorage"

+ 9 - 1
testing/helm/tests/complex.yaml

@@ -5,22 +5,27 @@ storage:
   - name: azureBlobPlane
     prefix: azure://ghallidaystorage      # Not sure if this should be different from the mount.
     secret: azure-ghallidaystorage
+    category: data
 
   #Store data on aws s3 buckets
   - name: s3BucketPlane
     prefix: s3://...
+    category: data
 
   #Single node with data mounted, and mirror mounted at a different locations (could be a different disk)
   - name: localDataPlane
     prefix: /var/lib/hpccsystems/hpcc-data
     replication: [ localMirrorPlane, localMirror2Plane ]
     pvc: local-data-pvc
+    category: data
   - name: localMirrorPlane
     prefix: /var/lib/hpccsystems/hpcc-mirror
     pvc: local-mirror-pvc
+    category: data
   - name: localMirror2Plane
     prefix: /var/lib/hpccsystems/hpcc-mirror2
     pvc: local-mirror2-pvc
+    category: data
 
   #Multiple nodes, data on a local mounts (all nodes mount the same logical file system).
   #Essentially identical to localDataPlane above
@@ -28,9 +33,11 @@ storage:
     prefix: /var/lib/hpccsystems/hpcc-data
     replication: [ nasMirrorPlane ]
     pvc: nas-data-pvc
+    category: data
   - name: nasMirrorPlane
     prefix: /var/lib/hpccsystems/hpcc-mirror
     pvc: nas-mirror-pvc
+    category: data
 
   #Multiple nodes, data on multiple local mounts (all nodes mount the same logical file system).
   #Allows an array of NFS servers to be used to store the data.  Would also potentially work for
@@ -41,9 +48,10 @@ storage:
     pvc: nas-array-data-pvc
     numDevices: 100
     includeDeviceInPath: true
+    category: data
 
   - name: sasha
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/sashastorage"
-    labels: [ sasha ]
+    category: sasha

+ 6 - 5
testing/helm/tests/implicitplanes.yaml

@@ -4,34 +4,35 @@ storage:
     prefix: "/var/lib/HPCCSystems/hpcc-data"
     storageSize: 1Gi
     storageClass: ""
+    category: data
   - name: my-dll-plane
     prefix: "/var/lib/HPCCSystems/queries"
     storageSize: 3Gi
     storageClass: ""
     forcePermissions: true
-    labels: [ dll ]
+    category: dll
   - name: my-sasha-plane
     prefix: "/var/lib/HPCCSystems/sasha"
     storageSize: 3Gi
     storageClass: ""
     forcePermissions: true
-    labels: [ unknown ]
+    category: sasha
   - name: my-dali-plane
     prefix: "/var/lib/HPCCSystems/dalistorage"
     storageSize: 1Gi
     storageClass: ""
-    labels: [ dali ]
+    category: dali
   - name: landingzone
     prefix: "/var/lib/HPCCSystems/landingzone"
     storageSize: 1Gi
     storageClass: ""
-    labels: [ lz ]
+    category: lz
 
   - name: sasha
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/sashastorage"
-    labels: [ sasha ]
+    category: sasha
 
   dllStorage:
     plane: my-dll-plane

+ 6 - 5
testing/helm/tests/implicitplanes2.yaml

@@ -4,33 +4,34 @@ storage:
     prefix: "/var/lib/HPCCSystems/hpcc-data"
     storageSize: 1Gi
     storageClass: ""
+    category: data
   - name: my-dll-plane
     prefix: "/var/lib/HPCCSystems/queries"
     storageSize: 3Gi
     storageClass: ""
     forcePermissions: true
-    labels: [ dll ]
+    category: dll
   - name: my-sasha-plane
     prefix: "/var/lib/HPCCSystems/sasha"
     storageSize: 3Gi
     storageClass: ""
     forcePermissions: true
-    labels: [ unknown ]
+    category: sasha
   - name: my-dali-plane
     prefix: "/var/lib/HPCCSystems/dalistorage"
     storageSize: 1Gi
     storageClass: ""
-    labels: [ dali ]
+    category: dali
   - name: landingzone
     prefix: "/var/lib/HPCCSystems/landingzone"
     storageSize: 1Gi
     storageClass: ""
-    labels: [ lz ]
+    category: lz
   - name: sasha
     storageClass: ""
     storageSize: 1Gi
     prefix: "/var/lib/HPCCSystems/sashastorage"
-    labels: [ sasha ]
+    category: sasha
 
   #   name: <required>
   #   prefix: <path>                        # Root directory for accessing the plane (if pvc defined), or url to access plane.