Skip to content

Commit

Permalink
switch to library
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Oct 23, 2023
1 parent 0acf59f commit 53ffa0f
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Charts/beamline-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# A Helm Chart for an IOC instance
apiVersion: v2
name: ioc-instance-beamline
name: ioc-instance

# this is replaced by command line arguments when `ec` invokes helm
version: 1.0.0

type: library
14 changes: 14 additions & 0 deletions Charts/beamline-chart/templates/_configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- define "ioc-instance.configmap" -}}

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.ioc_name }}
labels:
app: {{ .Values.ioc_name }}
beamline: {{ .Values.beamline }}
ioc_version: {{ .Values.ioc_version | quote }}
is_ioc: "True"
data:

{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{- define "ioc-instance.deployment" -}}

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -138,3 +140,6 @@ spec:
operator: Equal
value: {{ .Values.beamline }}
effect: NoSchedule

---
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# IOCS can use a PVC as a data volume, or mount the host filesystem
{{- define "ioc-instance.volume" -}}

{{- if .Values.dataVolume.pvc }}
---
kind: PersistentVolumeClaim
Expand All @@ -14,4 +16,9 @@ spec:
resources:
requests:
storage: 1000Mi

---
{{- end }}

{{- end }}

5 changes: 5 additions & 0 deletions Charts/beamline-chart/templates/_ioc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- define "ioc-instance.ioc" }}
{{ include "ioc-instance.volume" . }}
{{ include "ioc-instance.deployment" . }}
{{ include "ioc-instance.configmap" . }}
{{ end }}
Binary file added ioc-instance-1.0.0.tgz
Binary file not shown.

0 comments on commit 53ffa0f

Please sign in to comment.