diff --git a/Charts/epics-opis/values.yaml b/Charts/epics-opis/values.yaml index 6e17f93..de2e26a 100644 --- a/Charts/epics-opis/values.yaml +++ b/Charts/epics-opis/values.yaml @@ -1,7 +1,10 @@ # use nginx for publishing opi files over http image: nginx:1.25.4 -# These are overridden per ioc_group repository + +# the beamline name - only set for beamlines beamline: -location: +# the name of the repository in which the IOC is grouped ioc_group: +# the location where the IOCs will run - same as beamline for beamlines +location: \ No newline at end of file diff --git a/Charts/epics-pvcs/Chart.yaml b/Charts/epics-pvcs/Chart.yaml index d4b0838..ebcbd20 100644 --- a/Charts/epics-pvcs/Chart.yaml +++ b/Charts/epics-pvcs/Chart.yaml @@ -9,4 +9,4 @@ description: | type: application -version: 2.0.0+b3 +version: 3.0.4 diff --git a/Charts/epics-pvcs/templates/deploy.yaml b/Charts/epics-pvcs/templates/deploy.yaml index 871bb26..f183779 100644 --- a/Charts/epics-pvcs/templates/deploy.yaml +++ b/Charts/epics-pvcs/templates/deploy.yaml @@ -12,7 +12,7 @@ spec: - ReadWriteMany resources: requests: - storage: 100Mi + storage: {{ .Values.opi_size }} --- # PVC for shared runtime files kind: PersistentVolumeClaim @@ -28,7 +28,7 @@ spec: - ReadWriteMany resources: requests: - storage: 100Mi + storage: {{ .Values.runtime_size }} --- # PVC for Autosave volumes kind: PersistentVolumeClaim @@ -44,4 +44,21 @@ spec: - ReadWriteMany resources: requests: - storage: 1Gi + storage: {{ .Values.autosave_size }} + +--- +# PVC for non-native ioc binaries +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Values.ioc_group }}-binaries-claim + labels: + app: {{ .Release.Name }} + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.binaries_size }} \ No newline at end of file diff --git a/Charts/epics-pvcs/values.yaml b/Charts/epics-pvcs/values.yaml index 4f61d5b..88c87be 100644 --- a/Charts/epics-pvcs/values.yaml +++ b/Charts/epics-pvcs/values.yaml @@ -1,2 +1,12 @@ -# this value must be overridden -beamline: +# the beamline name - only set for beamlines +beamline: bl20j +# the name of the repository in which the IOC is grouped +ioc_group: bl20j +# the location where the IOCs will run - same as beamline for beamlines +location: bl20j + +# sizes of the auto provisioned PVs +opi_size: 1Gi +runtime_size: 1Gi +autosave_size: 1Gi +binaries_size: 1Gi diff --git a/Charts/nfsv2-tftp/Chart.yaml b/Charts/nfsv2-tftp/Chart.yaml new file mode 100644 index 0000000..a49fc8d --- /dev/null +++ b/Charts/nfsv2-tftp/Chart.yaml @@ -0,0 +1,8 @@ +apiVersion: v2 +name: nfsv2-tftp +description: | + A service for sharing bob files to phoebus for all iocs on the beamline. + +type: application + +version: 3.0.4 \ No newline at end of file diff --git a/Charts/nfsv2-tftp/templates/deploy.yaml b/Charts/nfsv2-tftp/templates/deploy.yaml new file mode 100644 index 0000000..7d8d6ee --- /dev/null +++ b/Charts/nfsv2-tftp/templates/deploy.yaml @@ -0,0 +1,98 @@ + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.ioc_group }}-nfs-tftp + labels: + app: {{ .Release.Name }} + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Values.ioc_group }}-nfs-tftp + template: + metadata: + labels: + app: {{ .Values.ioc_group }}-nfs-tftp + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} + spec: + volumes: + - name: ioc-binaries-volume + persistentVolumeClaim: + claimName: {{ .Values.ioc_group }}-binaries-claim + - name: ioc-autosave-volume + emptyDir: {} + # TODO - we should rsync to this volume from the autosave PV during + # runtime and rsync from it at startup + - name: autosave-backing-store + persistentVolumeClaim: + claimName: {{ .Values.ioc_group }}-autosave-claim + + containers: + - name: server + image: ghcr.io/epics-containers/nfsv2-tftp-server:0.1.1 + ports: + - containerPort: 2049 + protocol: UDP + - containerPort: 20048 + protocol: UDP + - containerPort: 111 + protocol: UDP + - containerPort: 69 + protocol: UDP + command: ["/bin/bash"] + args: ["-c", "bash /scripts/startup.sh && sleep infinity"] + + resources: + limits: + memory: 50Mi + cpu: 100m + requests: + memory: 20Mi + cpu: 50m + + volumeMounts: + - mountPath: "/iocs" + name: ioc-binaries-volume + - mountPath: "/autosave" + name: ioc-autosave-volume + - mountPath: "/autosave-backing-store" + name: autosave-backing-store + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.ioc_group }}-nfs-tftp + labels: + app: {{ .Values.ioc_group }}-nfs-tftp + location: {{ .Values.location }} + ioc_group: {{ .Values.ioc_group }} +spec: + externalTrafficPolicy: Local + type: LoadBalancer + ports: + - name: rpcbind + port: 111 + protocol: UDP + targetPort: 111 + - name: nfsd + port: 2049 + protocol: UDP + targetPort: 2049 + - name: mountd + port: 20048 + protocol: UDP + targetPort: 20048 + - name: tftp + port: 69 + protocol: UDP + targetPort: 69 + # a j20 static IP + loadBalancerIP: {{ .Values.static_ip }} + sessionAffinity: None + selector: + app: {{ .Values.ioc_group }}-nfs-tftp diff --git a/Charts/nfsv2-tftp/values.yaml b/Charts/nfsv2-tftp/values.yaml new file mode 100644 index 0000000..5c39dcd --- /dev/null +++ b/Charts/nfsv2-tftp/values.yaml @@ -0,0 +1,14 @@ +# a container for publishing NFS and TFTP services +image: ghcr.io/epics-containers/nfsv2-tftp-server:main + +# The following values must all be set by each invoker + +# the beamline name - only set for beamlines +beamline: +# the name of the repository in which the IOC is grouped +ioc_group: +# the location where the IOCs will run - same as beamline for beamlines +location: + +# static IP for both services (must be from the allowed range for the cluster) +static_ip: