Преглед на файлове

Merge pull request #14583 from jakesmith/hpcc-25360-sasha-dict

HPCC-25360 Convert sasha service list to a dictionary

Reviewed-By: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman преди 4 години
родител
ревизия
b7c677bee8
променени са 5 файла, в които са добавени 327 реда и са изтрити 264 реда
  1. 21 23
      helm/hpcc/templates/_helpers.tpl
  2. 48 36
      helm/hpcc/templates/dali.yaml
  3. 17 12
      helm/hpcc/templates/sasha.yaml
  4. 185 136
      helm/hpcc/values.schema.json
  5. 56 57
      helm/hpcc/values.yaml

+ 21 - 23
helm/hpcc/templates/_helpers.tpl

@@ -609,17 +609,19 @@ Generate list of available services
   public: {{ $esp.public }}
 {{ end -}}
 {{- range $dali := $.Values.dali -}}
-{{- range $sasha := $dali.services -}}
+{{- range $sashaName, $_sasha := $dali.services -}}
+{{- $sasha := ($_sasha | default dict) -}}
 {{- if and (not $sasha.disabled) ($sasha.servicePort) -}}
-- name: {{ printf "sasha-%s" $sasha.service }}
+- name: {{ printf "sasha-%s" $sashaName }}
   type: sasha
   port: {{ $sasha.servicePort }}
 {{ end -}}
 {{ end -}}
 {{ end -}}
-{{- range $sasha := $.Values.sasha -}}
+{{- range $sashaName, $_sasha := $.Values.sasha -}}
+{{- $sasha := ($_sasha | default dict) -}}
 {{- if and (not $sasha.disabled) ($sasha.servicePort) -}}
-- name: {{ printf "sasha-%s" $sasha.service }}
+- name: {{ printf "sasha-%s" $sashaName }}
   type: sasha
   port: {{ $sasha.servicePort }}
 {{ end -}}
@@ -664,12 +666,12 @@ Sasha configmap
 Pass in dict with root and me
 */}}
 {{- define "hpcc.sashaConfigMap" -}}
-{{- $serviceName := printf "sasha-%s" .me.service -}}
+{{- $configMapName := printf "sasha-%s" .me.name -}}
 apiVersion: v1
 metadata:
-  name: {{ printf "%s-configmap" $serviceName }}
+  name: {{ printf "%s-configmap" $configMapName }}
 data:
-  {{ $serviceName }}.yaml: |
+  {{ $configMapName }}.yaml: |
     version: 1.0
     sasha:
 {{ toYaml (omit .me "logging") | indent 6 }}
@@ -680,7 +682,7 @@ data:
 {{- end }}
 {{ include "hpcc.generateVaultConfig" (dict "root" .root "categories" $categories ) | indent 6 }}
 {{- if .me.storage }}
-      storagePath: {{ include "hpcc.getVolumeMountPrefix" (dict "root" .root "name" (printf "sasha-%s" .me.service) "me" .me.storage) }}
+      storagePath: {{ include "hpcc.getVolumeMountPrefix" (dict "root" .root "name" (printf "sasha-%s" .me.name) "me" .me.storage) }}
 {{- end }}
     global:
 {{ include "hpcc.generateGlobalConfigMap" .root | indent 6 }}
@@ -690,7 +692,7 @@ data:
 A template to generate Sasha service containers
 */}}
 {{- define "hpcc.addSashaContainer" }}
-{{- $serviceName := printf "sasha-%s" .me.service }}
+{{- $serviceName := printf "sasha-%s" .me.name }}
 - name: {{ $serviceName | quote }}
   workingDir: /var/lib/HPCCSystems
   command: [ saserver ] 
@@ -698,7 +700,7 @@ A template to generate Sasha service containers
 {{- with (dict "name" $serviceName) }}
           {{ include "hpcc.configArg" . }},
 {{- end }}
-          "--service={{ .me.service }}",
+          "--service={{ .me.name }}",
 {{ include "hpcc.daliArg" .root | indent 10 }}
         ]
 {{- include "hpcc.addResources" (dict "me" .me.resources) | indent 2 }}
@@ -714,7 +716,7 @@ A template to generate Sasha service
 Pass in dict with root, me
 */}}
 {{- define "hpcc.addSashaVolumeMounts" }}
-{{- $serviceName := printf "sasha-%s" .me.service -}}
+{{- $serviceName := printf "sasha-%s" .me.name -}}
 {{- if .me.storage }}
 {{ include "hpcc.addVolumeMount" (dict "root" .root "name" $serviceName "me" .me.storage ) -}}
 {{- end }}
@@ -742,7 +744,7 @@ A template to generate Sasha service
 Pass in dict with root, me
 */}}
 {{- define "hpcc.addSashaVolumes" }}
-{{- $serviceName := printf "sasha-%s" .me.service -}}
+{{- $serviceName := printf "sasha-%s" .me.name -}}
 {{- if .me.storage }}
 {{ include "hpcc.addVolume" (dict "root" .root "name" $serviceName "me" .me.storage) -}}
 {{- end }}
@@ -758,10 +760,6 @@ Pass in dict with root, me
 {{- if has "dll" .me.access }}
 {{ include "hpcc.addDllVolume" . -}}
 {{- end }}
-{{ include "hpcc.addSecretVolumes" (dict "root" .root "categories" (list "system" ) ) -}}
-{{- if has "data" .me.access -}}
-{{ include "hpcc.addSecretVolumes" (dict "root" .root "categories" (list "storage" ) ) -}}
-{{- end }}
 {{- end -}}
 
 {{/*
@@ -769,7 +767,7 @@ A template to generate Sasha service
 Pass in dict me
 */}}
 {{- define "hpcc.addSashaService" }}
-{{- $serviceName := printf "sasha-%s" .me.service }}
+{{- $serviceName := printf "sasha-%s" .me.name }}
 apiVersion: v1
 kind: Service
 metadata:
@@ -789,18 +787,18 @@ spec:
 Return access permssions for a given service
 */}}
 {{- define "hpcc.getSashaServiceAccess" }}
-{{- if (eq "coalescer" .service) -}}
+{{- if (eq "coalescer" .name) -}}
 dalidata
-{{- else if (eq "wu-archiver" .service) -}}
+{{- else if (eq "wu-archiver" .name) -}}
 dali data dll
-{{- else if (eq "dfuwu-archiver" .service) -}}
+{{- else if (eq "dfuwu-archiver" .name) -}}
 dali
-{{- else if (eq "dfurecovery-archiver" .service) -}}
+{{- else if (eq "dfurecovery-archiver" .name) -}}
 dali
-{{- else if (eq "file-expiry" .service) -}}
+{{- else if (eq "file-expiry" .name) -}}
 dali data
 {{- else -}}
-{{- $_ := fail (printf "Unknown sasha service:" .service ) -}}
+{{- $_ := fail (printf "Unknown sasha service:" .name ) -}}
 {{- end -}}
 {{- end -}}
 

+ 48 - 36
helm/hpcc/templates/dali.yaml

@@ -1,93 +1,104 @@
-{{ range $.Values.dali -}}
-{{- if not .disabled -}}
-{{- $commonCtx := dict "root" $ "me" . }}
+{{ range $dali := $.Values.dali -}}
+{{- if not $dali.disabled -}}
+{{- $commonCtx := dict "root" $ "me" $dali }}
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: {{ .name | quote }}
+  name: {{ $dali.name | quote }}
 spec:
   replicas: 1
   selector:
     matchLabels:
-      run: {{ .name | quote }}
+      run: {{ $dali.name | quote }}
       app: dali
   template:
     metadata:
       labels:
-        run: {{ .name | quote }}
+        run: {{ $dali.name | quote }}
         app: dali
     spec:
       serviceAccountName: "hpcc-default"
       initContainers: 
         {{- include "hpcc.checkDaliMount" (dict "root" $) | indent 6 }}
       containers:
-      - name: {{ .name | quote }}
+      - name: {{ $dali.name | quote }}
         workingDir: /var/lib/HPCCSystems
         command: [ daserver ] 
         args: [
-                {{ include "hpcc.configArg" . }}
+                {{ include "hpcc.configArg" $dali }}
               ]
-{{ include "hpcc.addSentinelProbes" . | indent 8 }}
+{{ include "hpcc.addSentinelProbes" $dali | indent 8 }}
 {{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
-{{- include "hpcc.addResources" (dict "me" .resources) | indent 8 }}
+{{- include "hpcc.addResources" (dict "me" $dali.resources) | indent 8 }}
 {{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
         volumeMounts:
-{{ include "hpcc.addConfigMapVolumeMount" . | indent 8 }}
+{{ include "hpcc.addConfigMapVolumeMount" $dali | indent 8 }}
 {{ include "hpcc.addDaliVolumeMount" $commonCtx | indent 8 }}
 {{ include "hpcc.addSecretVolumeMounts" (dict "root" $ "categories" (list "system" ) ) | indent 8 }}
-{{- range .services -}}
-{{- if not .disabled -}}
-{{- $_ := set . "access" (splitList " " (include "hpcc.getSashaServiceAccess" .)) -}}
+{{- range $sashaName, $_sasha := $dali.services -}}
+{{- $sasha := ($_sasha | default dict) -}}
+{{- if not $sasha.disabled -}}
+{{- $_ := set $sasha "name" $sashaName -}}
+{{- with ($sasha | merge (dict "access" (splitList " " (include "hpcc.getSashaServiceAccess" $sasha)))) }}
 {{ include "hpcc.addSashaContainer" (dict "root" $ "me" .) | indent 6 }}
         volumeMounts:
 {{- include "hpcc.addSashaVolumeMounts" (dict "root" $ "me" .) | indent 8 }}
 {{- end }}
 {{- end }}
+{{- end }}
       volumes:
-{{ include "hpcc.addConfigMapVolume" . | indent 6 }}
-{{- range .services -}}
-{{- if not .disabled -}}
-{{- $_ := set . "access" (without (splitList " " (include "hpcc.getSashaServiceAccess" .)) "dalidata") -}}
-{{- include "hpcc.addSashaVolumes" (dict "root" $ "me" .) | indent 6 }}
+{{ include "hpcc.addConfigMapVolume" $dali | indent 6 }}
+{{- $tmpDaliScope := dict -}}
+{{- $_ := set $tmpDaliScope "sashaAccess" list -}}
+{{- range $sashaName, $_sasha := $dali.services -}}
+{{- $sasha := ($_sasha | default dict) -}}
+{{- if not $sasha.disabled -}}
+{{- $_ := set $sasha "name" $sashaName -}}
+{{- $_ := set $tmpDaliScope "sashaAccess" (concat $tmpDaliScope.sashaAccess (splitList " " (include "hpcc.getSashaServiceAccess" $sasha))) -}}
+{{- include "hpcc.addSashaVolumes" (dict "root" $ "me" $sasha) | indent 6 }}
 {{- end }}
 {{- end }}
 {{ include "hpcc.addDaliVolume" $commonCtx | indent 6 }}
-{{ include "hpcc.addSecretVolumes" (dict "root" $ "categories" (list "system" ) ) | indent 6 }}
-{{- if or (has "data" .access) (has "dalidata" .access) -}}
-{{ include "hpcc.addSecretVolumes" (dict "root" .root "categories" (list "storage" ) ) | indent 6 -}}
+{{- if has "data" $tmpDaliScope.sashaAccess }}
+{{ include "hpcc.addDataVolume" $commonCtx | indent 6}}
+{{ include "hpcc.addSecretVolumes" (dict "root" $ "categories" (list "storage" ) ) | indent 6 }}
 {{- end }}
+{{- if has "dll" $tmpDaliScope.sashaAccess }}
+{{ include "hpcc.addDllVolume" $commonCtx | indent 6 -}}
+{{- end }}
+{{ include "hpcc.addSecretVolumes" (dict "root" $ "categories" (list "system" ) ) | indent 6 }}
 ---
 kind: ConfigMap 
 apiVersion: v1 
 metadata:
-  name: {{ .name }}-configmap 
+  name: {{ $dali.name }}-configmap 
 data:
-  {{ .name }}.yaml: |
+  {{ $dali.name }}.yaml: |
     version: 1.0
     dali:
-{{ toYaml (omit . "logging" "services") | indent 6 }}
+{{ toYaml (omit $dali "logging" "services") | indent 6 }}
 {{- include "hpcc.generateLoggingConfig" $commonCtx | indent 6 }}
 {{ include "hpcc.generateVaultConfig" (dict "root" $ "categories" (list "system" ) ) | indent 6 }}
     global:
 {{ include "hpcc.generateGlobalConfigMap" $ | indent 6 }}
 ---
-{{- $daliScope := . -}}
-{{- range .services -}}
-{{- if not .disabled -}}
-{{- $_ := set . "access" (splitList " " (include "hpcc.getSashaServiceAccess" .)) -}}
+{{- range $sashaName, $_sasha := .services -}}
+{{- $sasha := ($_sasha | default dict) -}}
+{{- if not $sasha.disabled -}}
+{{- $_ := set $sasha "name" $sashaName -}}
 kind: ConfigMap
-{{- with (. | merge (pick $daliScope "logging") | merge (dict "inDaliPod" true)) }}
+{{- with ($sasha | merge (pick $dali "logging") | merge (dict "inDaliPod" true "access" (splitList " " (include "hpcc.getSashaServiceAccess" $sasha)))) }}
 {{ include "hpcc.sashaConfigMap" (dict "root" $ "me" .) }}
 {{- end }}
 ---
-{{- if .servicePort -}}
-{{ include "hpcc.addSashaService" (dict "root" $ "me" .) }}
+{{- if $sasha.servicePort -}}
+{{ include "hpcc.addSashaService" (dict "root" $ "me" $sasha) }}
 ---
 {{- end }}
 
-{{- if .storage }}
-{{- if (not .storage.existingClaim) }}
-{{ include "hpcc.addPVC" (dict "root" $ "name" (printf "sasha-%s" .service) "me" .storage) }}
+{{- if $sasha.storage }}
+{{- if (not $sasha.storage.existingClaim) }}
+{{ include "hpcc.addPVC" (dict "root" $ "name" (printf "sasha-%s" $sashaName) "me" $sasha.storage) }}
 {{- end }}
 ---
 {{- end }}
@@ -109,7 +120,8 @@ spec:
 {{- if (not $.Values.storage.daliStorage.existingClaim) }}
 {{- $storage := ($.Values.storage | default dict) -}}
 {{- $daliStorage := ($storage.daliStorage | default dict) -}}
-{{- $modeForCoalescer := (has "coalescer" .services) | ternary "ReadWriteOnce" "ReadWriteMany" -}}
+{{- $services := (.services | default dict) -}}
+{{- $modeForCoalescer := (hasKey $services "coalescer") | ternary "ReadWriteOnce" "ReadWriteMany" -}}
 {{- include "hpcc.addPVC" (dict "root" $ "name" "dalistorage-pvc" "mode" $modeForCoalescer "me" $daliStorage) -}}
 {{- end }}
 {{- end }}

+ 17 - 12
helm/hpcc/templates/sasha.yaml

@@ -1,15 +1,17 @@
-{{ range $.Values.sasha -}}
-{{- if not .disabled -}}
-{{- $commonCtx := dict "root" $ "me" . }}
-{{- $configSHA := include "hpcc.sashaConfigMap" $commonCtx | sha256sum }}
-{{- $serviceName := printf "sasha-%s" .service }}
-{{- $_ := set $commonCtx.me "access" (splitList " " (include "hpcc.getSashaServiceAccess" .)) -}}
+{{ range $sashaName, $_sasha := $.Values.sasha -}}
+{{ $sasha := ($_sasha | default dict) -}}
+{{ if not $sasha.disabled -}}
+{{ $_ := set $sasha "name" $sashaName -}}
+{{ $_ := set $sasha "access" (splitList " " (include "hpcc.getSashaServiceAccess" $sasha)) -}}
+{{ $commonCtx := dict "root" $ "me" $sasha -}}
+{{ $configSHA := include "hpcc.sashaConfigMap" $commonCtx | sha256sum -}}
+{{ $serviceName := printf "sasha-%s" $sashaName -}}
 apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ $serviceName | quote }}
 spec:
-  replicas: {{ .replicas | default 1 }}
+  replicas: {{ $sasha.replicas | default 1 }}
   selector:
     matchLabels:
       run: {{ $serviceName | quote }}
@@ -17,7 +19,7 @@ spec:
     metadata:
       labels:
         run: {{ $serviceName | quote }}
-        accessDali: {{ (has "dali" $commonCtx.me.access) | ternary "yes" "no" | quote }}
+        accessDali: {{ (has "dali" $sasha.access) | ternary "yes" "no" | quote }}
       annotations:
         checksum/config: {{ $configSHA }}
     spec:
@@ -28,20 +30,23 @@ spec:
 {{- include "hpcc.addSashaVolumeMounts" $commonCtx | indent 8 }}
       volumes:
 {{- include "hpcc.addSashaVolumes" $commonCtx | indent 6 }}
+{{ include "hpcc.addSecretVolumes" (dict "root" $ "categories" (list "system" ) ) | indent 6 -}}
+{{- if has "data" $sasha.access -}}
+{{ include "hpcc.addSecretVolumes" (dict "root" $ "categories" (list "storage" ) ) | indent 6 -}}
+{{- end }}
 ---
-{{- if and (not .disabled) (.servicePort) -}}
+{{- if and (not $sasha.disabled) ($sasha.servicePort) -}}
 {{ include "hpcc.addSashaService" $commonCtx }}
 ---
 {{- end }}
 kind: ConfigMap 
 {{ include "hpcc.sashaConfigMap" $commonCtx }}
 ---
-{{- if .storage }}
+{{- if $sasha.storage }}
 {{- if (not .storage.existingClaim) }}
-{{ include "hpcc.addPVC" (dict "root" $ "name" (printf "sasha-%s" .service) "me" .storage) }}
+{{ include "hpcc.addPVC" (dict "root" $ "name" (printf "sasha-%s" $sasha.name) "me" $sasha.storage) }}
 {{- end }}
 ---
 {{- end }}
-
 {{- end }}
 {{- end }}

+ 185 - 136
helm/hpcc/values.schema.json

@@ -151,9 +151,9 @@
       "items": { "$ref": "#/definitions/thor" }
     },
     "sasha": {
-      "description": "sasha process",
-      "type": "array",
-      "items": { "$ref": "#/definitions/sashaservice" }
+      "description": "sasha services",
+      "type": "object",
+      "$ref": "#/definitions/sashaservice"
     },
     "kibana": {
       "description": "HPCC managed Elastic Stack deployment Kibana (log visualizer) component"
@@ -496,9 +496,9 @@
           "$ref": "#/definitions/resources"
         },
         "services": {
-          "description": "sasha process",
-          "type": "array",
-          "items": { "$ref": "#/definitions/sashaservice" }
+          "description": "sasha services",
+          "type": "object",
+          "$ref": "#/definitions/sashaservice"
         }
       }
     },
@@ -752,7 +752,6 @@
     },
     "sashacommon": {
       "type": "object",
-      "required": [ "service" ],
       "properties": {
         "disabled": {
           "type": "boolean"
@@ -799,151 +798,201 @@
       }
     },
     "sasha-coalescer": {
-      "type": "object",
-      "allOf": [{ "$ref": "#/definitions/sashacommon" }],
-      "properties": {
-        "service": { "const": "coalescer" },
-        "minDeltaSize": {
-          "type": "integer",
-          "description": "Coalescing will only begin, if the delta size is above this threashold (K)"
-        },
-        "disabled": {},
-        "interval": {},
-        "servicePort": {},
-        "port": {},
-        "at" : {},
-        "throttle": {},
-        "storage": {},
-        "resources": {}
-      },
-      "additionalProperties": false
+      "oneOf": [
+        {
+          "type": "object",
+          "allOf": [
+            { "$ref": "#/definitions/sashacommon" },
+            {
+              "properties": {
+                "minDeltaSize": {
+                  "type": "integer",
+                  "description": "Coalescing will only begin, if the delta size is above this threashold (K)"
+                },
+                "disabled": {},
+                "interval": {},
+                "servicePort": {},
+                "port": {},
+                "at" : {},
+                "throttle": {},
+                "storage": {},
+                "resources": {}    
+              },
+              "additionalProperties": false
+            }
+          ]
+        },
+        {
+          "type": "null"
+        }
+      ]
     },
     "sasha-wu-archiver": {
-      "type": "object",
-      "allOf": [{ "$ref": "#/definitions/sashacommon" }],
-      "allOf": [{ "$ref": "#/definitions/sasha-limitcutoff" }],
-      "properties": {
-        "service": { "const": "wu-archiver" },
-        "backup": {
-          "type": "integer",
-          "description": "minimum workunit age to backup (days, 0 disables)",
-          "default": "0"
-        },
-        "duration": {
-          "type": "integer",
-          "description": "Maximum duration to run WorkUnit archiving session (hours, 0 unlimited)",
-          "default": "0"
-        },
-        "keepResultFiles": {
-          "type": "boolean",
-          "description": "option to keep result files owned by workunits after workunit is archived",
-          "default": "false"
+      "oneOf": [
+        {
+          "type": "object",
+          "allOf": [
+            { "$ref": "#/definitions/sashacommon" },
+            { "$ref": "#/definitions/sasha-limitcutoff" },
+            {
+              "properties": 
+              {
+                "backup": {
+                  "type": "integer",
+                  "description": "minimum workunit age to backup (days, 0 disables)",
+                  "default": "0"
+                },
+                "duration": {
+                  "type": "integer",
+                  "description": "Maximum duration to run WorkUnit archiving session (hours, 0 unlimited)",
+                  "default": "0"
+                },
+                "keepResultFiles": {
+                  "type": "boolean",
+                  "description": "option to keep result files owned by workunits after workunit is archived",
+                  "default": "false"
+                },
+                "retryinterval": {
+                  "type": "integer",
+                  "description": "minimal time before retrying archive of failed WorkUnits (days)",
+                  "default": "7"
+                },
+                "disabled": {},
+                "interval": {},
+                "servicePort": {},
+                "port": {},
+                "at" : {},
+                "throttle": {},
+                "storage": {},
+                "resources": {},
+                "limit": {},
+                "cutoff": {}    
+              },
+              "additionalProperties": false
+            }
+          ]
         },
-        "retryinterval": {
-          "type": "integer",
-          "description": "minimal time before retrying archive of failed WorkUnits (days)",
-          "default": "7"
-        },
-        "disabled": {},
-        "interval": {},
-        "servicePort": {},
-        "port": {},
-        "at" : {},
-        "throttle": {},
-        "storage": {},
-        "resources": {},
-        "limit": {},
-        "cutoff": {}
-      },
-      "additionalProperties": false
+        {
+          "type": "null"
+        }
+      ]
     },
     "sasha-dfuwu-archiver": {
-      "type": "object",
-      "allOf": [{ "$ref": "#/definitions/sashacommon" }],
-      "allOf": [{ "$ref": "#/definitions/sasha-limitcutoff" }],
-      "properties": {
-        "service": { "const": "dfuwu-archiver" },
-        "persistExpiryDefault": {
-          "type": "integer",
-          "description": "Default number of days to delete unused persist files",
-          "default": "7"
+      "oneOf": [
+        {
+          "type": "object",
+          "allOf": [ 
+            { "$ref": "#/definitions/sashacommon" },
+            { "$ref": "#/definitions/sasha-limitcutoff" },
+            {
+              "properties": 
+              {
+                "disabled": {},
+                "interval": {},
+                "servicePort": {},
+                "port": {},
+                "at" : {},
+                "throttle": {},
+                "storage": {},
+                "resources": {},
+                "limit": {},
+                "cutoff": {}
+              },
+              "additionalProperties": false
+            }
+          ]
         },
-        "expiryDefault": {
-          "type": "integer",
-          "description": "Default number of days to delete unused standard files that are flagged with EXPIRY",
-          "default": "14"
-        },
-        "disabled": {},
-        "interval": {},
-        "servicePort": {},
-        "port": {},
-        "at" : {},
-        "throttle": {},
-        "storage": {},
-        "resources": {},
-        "limit": {},
-        "cutoff": {}
-      },
-      "additionalProperties": false
+        {
+          "type": "null"
+        }
+      ]
     },
     "sasha-dfurecovery-archiver": {
-      "type": "object",
-      "allOf": [{ "$ref": "#/definitions/sashacommon" }],
-      "allOf": [{ "$ref": "#/definitions/sasha-limitcutoff" }],
-      "properties": {
-        "service": { "const": "dfurecovery-archiver" },
-        "disabled": {},
-        "interval": {},
-        "servicePort": {},
-        "port": {},
-        "at" : {},
-        "throttle": {},
-        "storage": {},
-        "resources": {},
-        "limit": {},
-        "cutoff": {}
-      },
-      "additionalProperties": false
+      "oneOf": [
+        {
+          "type": "object",
+          "allOf": [
+            { "$ref": "#/definitions/sashacommon" },
+            { "$ref": "#/definitions/sasha-limitcutoff" },
+            {
+              "properties": {
+                "disabled": {},
+                "interval": {},
+                "servicePort": {},
+                "port": {},
+                "at" : {},
+                "throttle": {},
+                "storage": {},
+                "resources": {},
+                "limit": {},
+                "cutoff": {}    
+              },
+              "additionalProperties": false
+            }
+          ]
+        },
+        {
+          "type": "null"
+        }
+      ]
     },
     "sasha-file-expiry": {
+      "oneOf": [
+        {
+          "type": "object",
+          "allOf": [{ "$ref": "#/definitions/sashacommon" }],
+          "properties": {
+            "persistExpiryDefault": {
+              "type": "integer",
+              "description": "Default number of days to delete unused persist files",
+              "default": "7"
+            },
+            "expiryDefault": {
+              "type": "integer",
+              "description": "Default number of days to delete unused standard files that are flagged with EXPIRY",
+              "default": "14"
+            },
+            "user": {
+              "type": "string",
+              "description": "A username authorized to access and remove expired files"
+            },
+            "disabled": {},
+            "interval": {},
+            "servicePort": {},
+            "port": {},
+            "at" : {},
+            "throttle": {},
+            "storage": {},
+            "resources": {}
+          },
+          "additionalProperties": false
+        },
+        {
+          "type": "null"
+        }
+      ]
+    },
+    "sashaservice": {
+      "description": "sasha services",
       "type": "object",
-      "allOf": [{ "$ref": "#/definitions/sashacommon" }],
       "properties": {
-        "service": { "const": "file-expiry" },
-        "persistExpiryDefault": {
-          "type": "integer",
-          "description": "Default number of days to delete unused persist files",
-          "default": "7"
+        "coalescer": {
+          "$ref": "#/definitions/sasha-coalescer"
         },
-        "expiryDefault": {
-          "type": "integer",
-          "description": "Default number of days to delete unused standard files that are flagged with EXPIRY",
-          "default": "14"
+        "wu-archiver": {
+          "$ref": "#/definitions/sasha-wu-archiver"
         },
-        "user": {
-          "type": "string",
-          "description": "A username authorized to access and remove expired files"
-        },
-        "disabled": {},
-        "interval": {},
-        "servicePort": {},
-        "port": {},
-        "at" : {},
-        "throttle": {},
-        "storage": {},
-        "resources": {}
+        "dfuwu-archiver": {
+          "$ref": "#/definitions/sasha-dfuwu-archiver"
+        },
+        "dfurecovery-archiver": {
+          "$ref": "#/definitions/sasha-dfurecovery-archiver"
+        },
+        "file-expiry": {
+          "$ref": "#/definitions/sasha-file-expiry"
+        }
       },
       "additionalProperties": false
-    },
-    "sashaservice" : {
-      "type": "object",
-      "oneOf": [
-        { "$ref": "#/definitions/sasha-coalescer" },
-        { "$ref": "#/definitions/sasha-wu-archiver" },
-        { "$ref": "#/definitions/sasha-dfuwu-archiver" },
-        { "$ref": "#/definitions/sasha-dfurecovery-archiver" },
-        { "$ref": "#/definitions/sasha-file-expiry" }
-      ]
     }
   }
 }

+ 56 - 57
helm/hpcc/values.yaml

@@ -234,70 +234,69 @@ bundles: []
 dali:
 - name: mydali
   services: # internal house keeping services
-  - service: coalescer
-    #servicePort: 8877
-    #interval: 2 # (hours)
-    #at: "* * * * *" # cron type schedule, i.e. Min(0-59) Hour(0-23) DayOfMonth(1-31) Month(1-12) DayOfWeek(0-6)
-    #minDeltaSize: 50 # (Kb) will not start coalescing until delta log is above this threshold
-    #recoverFromIncErrors: false # Try to continue after transaction load failures
-    #resources:
-    #  cpu: "1"
-    #  memory: "1G"
+    coalescer:
+      #servicePort: 8877
+      #interval: 2 # (hours)
+      #at: "* * * * *" # cron type schedule, i.e. Min(0-59) Hour(0-23) DayOfMonth(1-31) Month(1-12) DayOfWeek(0-6)
+      #minDeltaSize: 50 # (Kb) will not start coalescing until delta log is above this threshold
+      #resources:
+      #  cpu: "1"
+      #  memory: "1G"
 
-  # metaAccess: "shared" # enable if coalescer running in separate pod, and thus needs access to meta over PVC mount
+  #metaAccess: "shared" # enable if coalescer running in separate pod, and thus needs access to meta over PVC mount
 
   #resources:
   #  cpu: "1"
   #  memory: "4G"
 
 sasha:
-- service: wu-archiver
-  #disabled: true
-  servicePort: 8877
-  storage:
-    #existingClaim: pvc
-    storageSize: 1Gi
-    storageClass: ""
-    # forcePermissions: false
-  #interval: 6 # (hours)
-  #limit: 1000 # threshold number of workunits before archiving starts (0 disables)
-  #cutoff: 8 # minimum workunit age to archive (days)
-  #backup: 0 # minimum workunit age to backup (days, 0 disables)
-  #at: "* * * * *"
-  #duration: 0 # (maxDuration) - Maximum duration to run WorkUnit archiving session (hours, 0 unlimited)
-  #throttle: 0 # throttle ratio (0-99, 0 no throttling, 50 is half speed)
-  #retryinterval: 7 # minimal time before retrying archive of failed WorkUnits (days)
-  #keepResultFiles: false # option to keep result files owned by workunits after workunit is archived
-
-- service: dfuwu-archiver
-  #disabled: true
-  servicePort: 8877
-  storage:
-    #existingClaim: pvc
-    storageSize: 1Gi
-    storageClass: ""
-    #forcePermissions: false
-  #limit: 1000 # threshold number of DFU workunits before archiving starts (0 disables)
-  #cutoff: 14 # minimum DFU workunit age to archive (days)
-  #interval: 24 # minimum interval between running DFU recovery archiver (in hours, 0 disables)
-  #at: "* * * * *" # schedule to run DFU workunit archiver (cron format)
-  #duration: 0 # (maxDuration) maximum duration to run DFU WorkUnit archiving session (hours, 0 unlimited)
-  #throttle: 0 # throttle ratio (0-99, 0 no throttling, 50 is half speed)
-
-- service: dfurecovery-archiver
-  #disabled: true
-  #limit: 20 # threshold number of DFU recovery items before archiving starts (0 disables)
-  #cutoff: 4 # minimum DFU recovery item age to archive (days)
-  #interval: 12 # minimum interval between running DFU recovery archiver(in hours, 0 disables)
-  #at: "* * * * *" # schedule to run DFU recovery archiver (cron format)
-
-- service: file-expiry
-  #disabled: true
-  #interval: 1
-  #at: "* 3 * * *"
-  #persistExpiryDefault: 7
-  #expiryDefault: 4
-  #user: sasha
+  wu-archiver:
+    #disabled: true
+    servicePort: 8877
+    storage:
+      #existingClaim: pvc
+      storageSize: 1Gi
+      storageClass: ""
+      # forcePermissions: false
+    #interval: 6 # (hours)
+    #limit: 1000 # threshold number of workunits before archiving starts (0 disables)
+    #cutoff: 8 # minimum workunit age to archive (days)
+    #backup: 0 # minimum workunit age to backup (days, 0 disables)
+    #at: "* * * * *"
+    #duration: 0 # (maxDuration) - Maximum duration to run WorkUnit archiving session (hours, 0 unlimited)
+    #throttle: 0 # throttle ratio (0-99, 0 no throttling, 50 is half speed)
+    #retryinterval: 7 # minimal time before retrying archive of failed WorkUnits (days)
+    #keepResultFiles: false # option to keep result files owned by workunits after workunit is archived
+
+  dfuwu-archiver:
+    #disabled: true
+    servicePort: 8877
+    storage:
+      #existingClaim: pvc
+      storageSize: 1Gi
+      storageClass: ""
+      #forcePermissions: false
+    #limit: 1000 # threshold number of DFU workunits before archiving starts (0 disables)
+    #cutoff: 14 # minimum DFU workunit age to archive (days)
+    #interval: 24 # minimum interval between running DFU recovery archiver (in hours, 0 disables)
+    #at: "* * * * *" # schedule to run DFU workunit archiver (cron format)
+    #duration: 0 # (maxDuration) maximum duration to run DFU WorkUnit archiving session (hours, 0 unlimited)
+    #throttle: 0 # throttle ratio (0-99, 0 no throttling, 50 is half speed)
+
+  dfurecovery-archiver:
+    #disabled: true
+    #limit: 20 # threshold number of DFU recovery items before archiving starts (0 disables)
+    #cutoff: 4 # minimum DFU recovery item age to archive (days)
+    #interval: 12 # minimum interval between running DFU recovery archiver(in hours, 0 disables)
+    #at: "* * * * *" # schedule to run DFU recovery archiver (cron format)
+
+  file-expiry:
+    #disabled: true
+    #interval: 1
+    #at: "* 3 * * *"
+    #persistExpiryDefault: 7
+    #expiryDefault: 4
+    #user: sasha
 
 eclagent:
 - name: hthor