Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nfsv2-tftp chart and associated PVC #10

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Charts/epics-opis/values.yaml
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 1 addition & 1 deletion Charts/epics-pvcs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ description: |

type: application

version: 2.0.0+b3
version: 3.0.4
23 changes: 20 additions & 3 deletions Charts/epics-pvcs/templates/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
- ReadWriteMany
resources:
requests:
storage: 100Mi
storage: {{ .Values.opi_size }}
---
# PVC for shared runtime files
kind: PersistentVolumeClaim
Expand All @@ -28,7 +28,7 @@ spec:
- ReadWriteMany
resources:
requests:
storage: 100Mi
storage: {{ .Values.runtime_size }}
---
# PVC for Autosave volumes
kind: PersistentVolumeClaim
Expand All @@ -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 }}
14 changes: 12 additions & 2 deletions Charts/epics-pvcs/values.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions Charts/nfsv2-tftp/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
98 changes: 98 additions & 0 deletions Charts/nfsv2-tftp/templates/deploy.yaml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions Charts/nfsv2-tftp/values.yaml
Original file line number Diff line number Diff line change
@@ -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:
Loading