Skip to content

Commit

Permalink
add nfsv2-tftp chart
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Mar 19, 2024
1 parent 3e9a75e commit 253e574
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 1 deletion.
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
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:

0 comments on commit 253e574

Please sign in to comment.