diff --git a/Charts/epics-opis/Chart.yaml b/Charts/epics-opis/Chart.yaml index 43743b7..926c350 100644 --- a/Charts/epics-opis/Chart.yaml +++ b/Charts/epics-opis/Chart.yaml @@ -5,4 +5,4 @@ description: | type: application -version: 2.0.0+b1 +version: 2.0.0+b3 diff --git a/Charts/epics-opis/templates/deploy.yaml b/Charts/epics-opis/templates/deploy.yaml index bc031be..ff1b733 100644 --- a/Charts/epics-opis/templates/deploy.yaml +++ b/Charts/epics-opis/templates/deploy.yaml @@ -2,38 +2,43 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Values.domain }}-nginx-config + name: {{ .Release.Name }}-nginx-config labels: - app: {{ .Values.domain }}-opis - beamline: {{ .Values.domain }} + app: {{ .Release.Name }} + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} data: {{ (.Files.Glob "config/*").AsConfig | indent 2 }} version.txt: | - IOC {{ .Values.domain }} version {{ .Chart.AppVersion }} + IOC {{ .Release.Name }} version {{ .Chart.AppVersion }} --- kind: Deployment apiVersion: apps/v1 metadata: - name: {{ .Values.domain }}-opis + name: {{ .Release.Name }} labels: - app: {{ .Values.domain }}-opis + app: {{ .Release.Name }} + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} spec: replicas: 1 selector: matchLabels: - app: {{ .Values.domain }}-opis + app: {{ .Release.Name }} template: metadata: labels: - app: {{ .Values.domain }}-opis + app: {{ .Release.Name }} + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} spec: volumes: - name: html-volume persistentVolumeClaim: - claimName: {{ .Values.domain }}-opi-claim + claimName: {{ .Values.ioc_group }}-opi-claim - name: config-volume configMap: - name: {{ .Values.domain }}-nginx-config + name: {{ .Release.Name }}-nginx-config containers: - name: server image: {{ .Values.image }} @@ -60,16 +65,28 @@ spec: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: + {{ if .Values.beamline -}} - matchExpressions: - key: beamline operator: In values: - - {{ .Values.domain }} + - {{ .Values.beamline }} + {{- else -}} + - matchExpressions: + - key: location + operator: In + values: + - {{ .Values.location }} + {{- end }} {{- end }} tolerations: - key: beamline operator: Equal - value: {{ .Values.domain }} + value: {{ .Values.beamline }} + effect: NoSchedule + - key: location + operator: Equal + value: {{ .Values.location }} effect: NoSchedule {{- if .Values.tolerations }} {{ toYaml .Values.tolerations | indent 8}} @@ -79,9 +96,11 @@ spec: kind: Service apiVersion: v1 metadata: - name: {{ .Values.domain }}-opis + name: {{ .Release.Name }} labels: - app: {{ .Values.domain }}-opis + app: {{ .Release.Name }} + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} spec: type: LoadBalancer ports: @@ -91,4 +110,4 @@ spec: targetPort: 8080 sessionAffinity: None selector: - app: {{ .Values.domain }}-opis + app: {{ .Release.Name }} diff --git a/Charts/epics-opis/values.yaml b/Charts/epics-opis/values.yaml index 368eeb3..88fe143 100644 --- a/Charts/epics-opis/values.yaml +++ b/Charts/epics-opis/values.yaml @@ -1,4 +1,7 @@ # use nginx for publishing opi files over http image: docker.io/nginxinc/nginx-unprivileged:stable-bullseye-perl -# this value must be overridden + +# These are overridden per ioc_group repository beamline: +location: +ioc_group: diff --git a/Charts/epics-pvcs/Chart.yaml b/Charts/epics-pvcs/Chart.yaml index 19fc9d3..d4b0838 100644 --- a/Charts/epics-pvcs/Chart.yaml +++ b/Charts/epics-pvcs/Chart.yaml @@ -9,4 +9,4 @@ description: | type: application -version: 2.0.0+b1 +version: 2.0.0+b3 diff --git a/Charts/epics-pvcs/templates/deploy.yaml b/Charts/epics-pvcs/templates/deploy.yaml index 35e8b01..871bb26 100644 --- a/Charts/epics-pvcs/templates/deploy.yaml +++ b/Charts/epics-pvcs/templates/deploy.yaml @@ -2,10 +2,11 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ .Values.domain }}-opi-claim + name: {{ .Values.ioc_group }}-opi-claim labels: - app: {{ .Values.domain }}-opi - beamline: {{ .Values.domain }} + app: {{ .Release.Name }} + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} spec: accessModes: - ReadWriteMany @@ -17,10 +18,11 @@ spec: kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ .Values.domain }}-runtime-claim + name: {{ .Values.ioc_group }}-runtime-claim labels: - app: {{ .Values.domain }}-runtime - beamline: {{ .Values.domain }} + app: {{ .Release.Name }} + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} spec: accessModes: - ReadWriteMany @@ -32,10 +34,11 @@ spec: kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ .Values.domain }}-autosave-claim + name: {{ .Values.ioc_group }}-autosave-claim labels: - app: {{ .Values.domain }}-autosave - beamline: {{ .Values.domain }} + app: {{ .Release.Name }} + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} spec: accessModes: - ReadWriteMany diff --git a/Charts/ioc-instance/Chart.yaml b/Charts/ioc-instance/Chart.yaml index 610fc58..9d42336 100644 --- a/Charts/ioc-instance/Chart.yaml +++ b/Charts/ioc-instance/Chart.yaml @@ -2,6 +2,6 @@ apiVersion: v2 name: ioc-instance -version: 2.0.0+b1 +version: 2.0.0+b3 type: application diff --git a/Charts/ioc-instance/templates/deployment.yaml b/Charts/ioc-instance/templates/deployment.yaml index e85505c..25d0312 100644 --- a/Charts/ioc-instance/templates/deployment.yaml +++ b/Charts/ioc-instance/templates/deployment.yaml @@ -4,11 +4,7 @@ metadata: name: {{ .Release.Name }} labels: app: {{ .Release.Name }} - {{ if .Values.beamline -}} - beamline: {{ .Values.beamline }} - {{- else -}} location: {{ .Values.location }} - {{- end }} ioc_group: {{ .Values.ioc_group }} is_ioc: "true" spec: @@ -20,11 +16,7 @@ spec: metadata: labels: app: {{ .Release.Name }} - {{ if .Values.beamline -}} - beamline: {{ .Values.beamline }} - {{- else -}} location: {{ .Values.location }} - {{- end }} ioc_group: {{ .Values.ioc_group }} is_ioc: "true" spec: @@ -129,7 +121,7 @@ spec: - name: IOC_PREFIX value: {{ or .Values.prefix .Release.Name | quote }} - name: IOC_LOCATION - location: {{ .Values.location | quote}} + value: {{ .Values.location | quote }} - name: BEAMLINE value: {{ .Values.beamline | quote }} - name: IOC_GROUP