diff --git a/Charts/beamline-chart/Chart.yaml b/Charts/beamline-chart/Chart.yaml index b9a4545..2b2957a 100644 --- a/Charts/beamline-chart/Chart.yaml +++ b/Charts/beamline-chart/Chart.yaml @@ -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 diff --git a/Charts/beamline-chart/templates/_configmap.yaml b/Charts/beamline-chart/templates/_configmap.yaml new file mode 100644 index 0000000..e7c1d78 --- /dev/null +++ b/Charts/beamline-chart/templates/_configmap.yaml @@ -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 -}} diff --git a/Charts/beamline-chart/templates/deployment.yaml b/Charts/beamline-chart/templates/_deployment.yaml similarity index 98% rename from Charts/beamline-chart/templates/deployment.yaml rename to Charts/beamline-chart/templates/_deployment.yaml index d7b49ed..efd02f3 100644 --- a/Charts/beamline-chart/templates/deployment.yaml +++ b/Charts/beamline-chart/templates/_deployment.yaml @@ -1,3 +1,5 @@ +{{- define "ioc-instance.deployment" -}} + apiVersion: apps/v1 kind: Deployment metadata: @@ -138,3 +140,6 @@ spec: operator: Equal value: {{ .Values.beamline }} effect: NoSchedule + +--- +{{- end -}} diff --git a/Charts/beamline-chart/templates/ioc-volume.yaml b/Charts/beamline-chart/templates/_ioc-volume.yaml similarity index 87% rename from Charts/beamline-chart/templates/ioc-volume.yaml rename to Charts/beamline-chart/templates/_ioc-volume.yaml index b566a9d..bdcb6b1 100644 --- a/Charts/beamline-chart/templates/ioc-volume.yaml +++ b/Charts/beamline-chart/templates/_ioc-volume.yaml @@ -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 @@ -14,4 +16,9 @@ spec: resources: requests: storage: 1000Mi + +--- +{{- end }} + {{- end }} + diff --git a/Charts/beamline-chart/templates/_ioc.yaml b/Charts/beamline-chart/templates/_ioc.yaml new file mode 100644 index 0000000..e88f7de --- /dev/null +++ b/Charts/beamline-chart/templates/_ioc.yaml @@ -0,0 +1,5 @@ +{{- define "ioc-instance.ioc" }} +{{ include "ioc-instance.volume" . }} +{{ include "ioc-instance.deployment" . }} +{{ include "ioc-instance.configmap" . }} +{{ end }} \ No newline at end of file diff --git a/ioc-instance-1.0.0.tgz b/ioc-instance-1.0.0.tgz new file mode 100644 index 0000000..b45d140 Binary files /dev/null and b/ioc-instance-1.0.0.tgz differ