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

Restructure for new edge containers cli #7

Merged
merged 12 commits into from
Feb 18, 2024
2 changes: 1 addition & 1 deletion .github/workflows/helm_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

env:
HELM_VERSION_TO_INSTALL: 3.13.1 # version of HELM to install
HELM_VERSION_TO_INSTALL: 3.13.2

jobs:
build-and-push-helm-charts:
Expand Down
9 changes: 0 additions & 9 deletions Charts/beamline-chart/Chart.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions Charts/beamline-chart/templates/_configmap.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions Charts/beamline-chart/templates/_ioc-volume.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions Charts/beamline-chart/templates/_ioc.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions Charts/opis/Chart.yaml → Charts/epics-opis/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: domain-opis
name: epics-opis
description: |
A service for sharing bob files to phoebus for all iocs on the beamline.

type: application

version: 1.0.2
version: 2.0.0+b3
File renamed without changes.
113 changes: 113 additions & 0 deletions Charts/epics-opis/templates/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# a config map to contain nginx config - ingests the files in config folder
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-nginx-config
labels:
app: {{ .Release.Name }}
location: {{ .Values.location }}
ioc_group: {{ .Values.ioc_group }}
data:
{{ (.Files.Glob "config/*").AsConfig | indent 2 }}
version.txt: |
IOC {{ .Release.Name }} version {{ .Chart.AppVersion }}
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Release.Name }}
labels:
app: {{ .Release.Name }}
location: {{ .Values.location }}
ioc_group: {{ .Values.ioc_group }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
location: {{ .Values.location }}
ioc_group: {{ .Values.ioc_group }}
spec:
volumes:
- name: html-volume
persistentVolumeClaim:
claimName: {{ .Values.ioc_group }}-opi-claim
- name: config-volume
configMap:
name: {{ .Release.Name }}-nginx-config
containers:
- name: server
image: {{ .Values.image }}
resources:
requests:
memory: 100Mi
cpu: 200m
limits:
memory: 500Mi
cpu: 600m
ports:
- containerPort: 90
protocol: TCP
volumeMounts:
# - mountPath: /opis
- mountPath: /usr/share/nginx/html
name: html-volume
# mount a config file over the default nginx config
- mountPath: /etc/nginx/nginx.conf
name: config-volume
subPath: nginx.conf
{{- if .Values.useAffinity }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
{{ if .Values.beamline -}}
- matchExpressions:
- key: beamline
operator: In
values:
- {{ .Values.beamline }}
{{- else -}}
- matchExpressions:
- key: location
operator: In
values:
- {{ .Values.location }}
{{- end }}
{{- end }}
tolerations:
- key: beamline
operator: Equal
value: {{ .Values.beamline }}
effect: NoSchedule
- key: location
operator: Equal
value: {{ .Values.location }}
effect: NoSchedule
{{- if .Values.tolerations }}
{{ toYaml .Values.tolerations | indent 8}}
{{- end }}

---
kind: Service
apiVersion: v1
metadata:
name: {{ .Release.Name }}
labels:
app: {{ .Release.Name }}
location: {{ .Values.location }}
ioc_group: {{ .Values.ioc_group }}
spec:
type: LoadBalancer
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
sessionAffinity: None
selector:
app: {{ .Release.Name }}
5 changes: 4 additions & 1 deletion Charts/opis/values.yaml → Charts/epics-opis/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# use nginx for publishing opi files over http
image: docker.io/nginxinc/nginx-unprivileged:stable-bullseye-perl
beamline: bl38p

# These are overridden per ioc_group repository
beamline:
location:
ioc_group:
4 changes: 2 additions & 2 deletions Charts/shared/Chart.yaml → Charts/epics-pvcs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# EPICS services

apiVersion: v2
name: domain-shared-pvcs
name: epics-pvcs
description: |
A set of PVCs to share between pods for a beamline/accelerator domain

type: application

version: 1.1.0
version: 2.0.0+b3
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Values.beamline }}-opi-claim
name: {{ .Values.ioc_group }}-opi-claim
labels:
app: {{ .Values.beamline }}-opi
beamline: {{ .Values.beamline }}
app: {{ .Release.Name }}
location: {{ .Values.location }}
ioc_group: {{ .Values.ioc_group }}
spec:
accessModes:
- ReadWriteMany
Expand All @@ -17,10 +18,11 @@ spec:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Values.beamline }}-runtime-claim
name: {{ .Values.ioc_group }}-runtime-claim
labels:
app: {{ .Values.beamline }}-runtime
beamline: {{ .Values.beamline }}
app: {{ .Release.Name }}
location: {{ .Values.location }}
ioc_group: {{ .Values.ioc_group }}
spec:
accessModes:
- ReadWriteMany
Expand All @@ -32,10 +34,11 @@ spec:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Values.beamline }}-autosave-claim
name: {{ .Values.ioc_group }}-autosave-claim
labels:
app: {{ .Values.beamline }}-autosave
beamline: {{ .Values.beamline }}
app: {{ .Release.Name }}
location: {{ .Values.location }}
ioc_group: {{ .Values.ioc_group }}
spec:
accessModes:
- ReadWriteMany
Expand Down
2 changes: 2 additions & 0 deletions Charts/epics-pvcs/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# this value must be overridden
beamline:
7 changes: 7 additions & 0 deletions Charts/ioc-instance/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# A Helm Chart for an IOC instance
apiVersion: v2
name: ioc-instance

version: 2.0.0+b3

type: application
Loading
Loading