diff --git a/Charts/epics-opis/templates/deploy.yaml b/Charts/epics-opis/templates/deploy.yaml index ccd7af2..e284529 100644 --- a/Charts/epics-opis/templates/deploy.yaml +++ b/Charts/epics-opis/templates/deploy.yaml @@ -1,11 +1,15 @@ +{{- $location := default .Values.global.location .Values.location | required "ERROR - You must supply location or global.location" -}} +{{- $ioc_group := default .Values.global.ioc_group .Values.ioc_group | required "ERROR - You must supply ioc_group or global.ioc_group" -}} +{{- $opisClaim := default (print $ioc_group "-opi-claim") .Values.opisClaim -}} + kind: Deployment apiVersion: apps/v1 metadata: name: {{ .Release.Name }} labels: app: {{ .Release.Name }} - location: {{ .Values.location }} - ioc_group: {{ .Values.ioc_group }} + location: {{ $location }} + ioc_group: {{ $ioc_group }} spec: replicas: 1 selector: @@ -15,8 +19,8 @@ spec: metadata: labels: app: {{ .Release.Name }} - location: {{ .Values.location }} - ioc_group: {{ .Values.ioc_group }} + location: {{ $location }} + ioc_group: {{ $ioc_group }} annotations: {{ if and .Values.global .Values.global.files -}} {{- range $k, $v := .Values.global.files }} @@ -27,7 +31,7 @@ spec: volumes: - name: html-volume persistentVolumeClaim: - claimName: {{ .Values.ioc_group }}-opi-claim + claimName: {{ $opisClaim }} - name: config-volume configMap: name: {{ .Release.Name }}-nginx-config @@ -68,8 +72,8 @@ metadata: name: {{ .Release.Name }} labels: app: {{ .Release.Name }} - location: {{ .Values.location }} - ioc_group: {{ .Values.ioc_group }} + location: {{ $location }} + ioc_group: {{ $ioc_group }} spec: type: LoadBalancer ports: diff --git a/Charts/epics-opis/values.yaml b/Charts/epics-opis/values.yaml index 09030ab..a660b90 100644 --- a/Charts/epics-opis/values.yaml +++ b/Charts/epics-opis/values.yaml @@ -1,7 +1,6 @@ # use nginx for publishing opi files over http image: nginx:1.25.4 - -# the name of the repository in which the IOC is grouped +# Short name for this collection of services ioc_group: -# the location where the IOCs will run +# location where these IOCs and services will run location: \ No newline at end of file diff --git a/Charts/epics-pvcs/templates/deploy.yaml b/Charts/epics-pvcs/templates/deploy.yaml index f183779..0b359b1 100644 --- a/Charts/epics-pvcs/templates/deploy.yaml +++ b/Charts/epics-pvcs/templates/deploy.yaml @@ -1,12 +1,19 @@ +{{- $location := default .Values.global.location .Values.location | required "ERROR - You must supply location or global.location" -}} +{{- $ioc_group := default .Values.global.ioc_group .Values.ioc_group | required "ERROR - You must supply ioc_group or global.ioc_group" -}} +{{- $opisClaim := default (print $ioc_group "-opi-claim") .Values.opisClaim -}} +{{- $runtimeClaim := default (print $ioc_group "-runtime-claim") .Values.runtimeClaim -}} +{{- $autosaveClaim := default (print $ioc_group "-autosave-claim") .Values.autosaveClaim -}} +{{- $binariesClaim := default (print $ioc_group "-binaries-claim") .Values.binariesClaim -}} + # PVC for shared OPI files kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ .Values.ioc_group }}-opi-claim + name: {{ $opisClaim }} labels: app: {{ .Release.Name }} - location: {{ .Values.location }} - ioc_group: {{ .Values.ioc_group }} + location: {{ $location }} + ioc_group: {{ $ioc_group }} spec: accessModes: - ReadWriteMany @@ -18,11 +25,11 @@ spec: kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ .Values.ioc_group }}-runtime-claim + name: {{ $runtimeClaim }} labels: app: {{ .Release.Name }} - location: {{ .Values.location }} - ioc_group: {{ .Values.ioc_group }} + location: {{ $location }} + ioc_group: {{ $ioc_group }} spec: accessModes: - ReadWriteMany @@ -34,11 +41,11 @@ spec: kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ .Values.ioc_group }}-autosave-claim + name: {{ $autosaveClaim }} labels: app: {{ .Release.Name }} - location: {{ .Values.location }} - ioc_group: {{ .Values.ioc_group }} + location: {{ $location }} + ioc_group: {{ $ioc_group }} spec: accessModes: - ReadWriteMany @@ -51,11 +58,11 @@ spec: kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ .Values.ioc_group }}-binaries-claim + name: {{ $binariesClaim }} labels: app: {{ .Release.Name }} - location: {{ .Values.location }} - ioc_group: {{ .Values.ioc_group }} + location: {{ $location }} + ioc_group: {{ $ioc_group }} spec: accessModes: - ReadWriteMany diff --git a/Charts/epics-pvcs/values.yaml b/Charts/epics-pvcs/values.yaml index 59f9f2d..9556577 100644 --- a/Charts/epics-pvcs/values.yaml +++ b/Charts/epics-pvcs/values.yaml @@ -1,8 +1,7 @@ -# the name of the repository in which the IOC is grouped +# Short name for this collection of services ioc_group: -# the location where the IOCs will run +# location where these IOCs and services will run location: - # sizes of the auto provisioned PVs opi_size: 1Gi runtime_size: 1Gi diff --git a/Charts/ioc-instance/templates/deployment.yaml b/Charts/ioc-instance/templates/deployment.yaml index e5e2e5a..fc7ae5c 100644 --- a/Charts/ioc-instance/templates/deployment.yaml +++ b/Charts/ioc-instance/templates/deployment.yaml @@ -4,8 +4,8 @@ Default the derivable substitution values. This keeps the length of the values.txt file for each individual IOC to a minimum */ -}} -{{- $location := default .Values.global.location .Values.location | required "ERROR - You must supply location." -}} -{{- $ioc_group := default .Values.ioc_group $location -}} +{{- $location := default .Values.global.location .Values.location | required "ERROR - You must supply location or global.location" -}} +{{- $ioc_group := default .Values.global.ioc_group .Values.ioc_group | required "ERROR - You must supply ioc_group or global.ioc_group" -}} {{- $opisClaim := default (print $ioc_group "-opi-claim") .Values.opisClaim -}} {{- $runtimeClaim := default (print $ioc_group "-runtime-claim") .Values.runtimeClaim -}} {{- $autosaveClaim := default (print $ioc_group "-autosave-claim") .Values.autosaveClaim -}} diff --git a/Schemas/ioc-instance.schema.json b/Schemas/ioc-instance.schema.json index 2f7f5ae..a981594 100644 --- a/Schemas/ioc-instance.schema.json +++ b/Schemas/ioc-instance.schema.json @@ -17,7 +17,7 @@ }, "ioc_group": { "type": "string", - "description": "The name of the repository in which the IOC is grouped", + "description": "Short name for this collection of services", "default": "" }, "serviceAccountName": {