add initial helm chart values
This commit is contained in:
355
templates/deploy.yml
Normal file
355
templates/deploy.yml
Normal file
@@ -0,0 +1,355 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: koha
|
||||
namespace: koha-{{ .Values.instance }}
|
||||
labels:
|
||||
app: koha
|
||||
component: plack
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: koha
|
||||
component: plack
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: koha
|
||||
component: plack
|
||||
spec:
|
||||
containers:
|
||||
- name: koha
|
||||
image: {{ .Values.docker.registry }}:{{ .Values.docker.tag }}
|
||||
env:
|
||||
- name: USE_PLACK
|
||||
value: "1"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: koha-map
|
||||
optional: false
|
||||
volumeMounts:
|
||||
- name: koha-pv
|
||||
mountPath: /var/lib/koha
|
||||
subPath: koha
|
||||
- name: koha-pv
|
||||
mountPath: /etc/koha/sites
|
||||
subPath: sites
|
||||
- name: koha-pv
|
||||
mountPath: /tmp/libshare
|
||||
subPath: lib
|
||||
volumes:
|
||||
- name: koha-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: koha-{{ .Values.instance }}-pvc
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: koha-apache
|
||||
namespace: koha-{{ .Values.instance }}
|
||||
labels:
|
||||
app: koha
|
||||
component: apache
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: koha
|
||||
component: apache
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: koha
|
||||
component: apache
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-wait
|
||||
image: alpine
|
||||
command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 {{ .Values.instance }}-plack 5000 && exit 0 || sleep 3; done; exit 1"]
|
||||
containers:
|
||||
- name: apache
|
||||
image: {{ .Values.docker.registry }}:{{ .Values.docker.tag }}
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- ALL
|
||||
env:
|
||||
- name: USE_APACHE2
|
||||
value: "1"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: koha-map
|
||||
volumeMounts:
|
||||
- name: koha-pv
|
||||
mountPath: /etc/koha/sites
|
||||
subPath: sites
|
||||
- name: koha-pv
|
||||
mountPath: /tmp/libshare
|
||||
subPath: lib
|
||||
ports:
|
||||
- containerPort: {{ .Values.opac.port }}
|
||||
- containerPort: {{ .Values.staff.port }}
|
||||
volumes:
|
||||
- name: koha-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: koha-{{ .Values.instance }}-pvc
|
||||
{{ if not .Values.db.external }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: koha-mysql
|
||||
namespace: koha-{{ .Values.instance }}
|
||||
labels:
|
||||
app: koha
|
||||
component: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: koha
|
||||
component: db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: koha
|
||||
component: db
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 999
|
||||
fsGroup: 999
|
||||
containers:
|
||||
- name: db
|
||||
image: mariadb:10.3
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: koha-map
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
volumeMounts:
|
||||
- name: koha-mysql-pv
|
||||
mountPath: /var/lib/mysql
|
||||
volumes:
|
||||
- name: koha-mysql-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: koha-{{ .Values.instance }}-mysql-pvc
|
||||
{{ end }}
|
||||
{{ if and .Values.elasticsearch.enabled (not .Values.elasticsearch.external) }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: koha-es
|
||||
namespace: koha-{{ .Values.instance }}
|
||||
labels:
|
||||
app: koha
|
||||
component: es
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: koha
|
||||
component: es
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: koha
|
||||
component: es
|
||||
spec:
|
||||
containers:
|
||||
- name: es
|
||||
image: koha/elasticsearch-icu
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- IPC_LOCK
|
||||
- SYS_RESOURCE
|
||||
env:
|
||||
- name: cluster.name
|
||||
value: "docker-cluster"
|
||||
- name: bootstrap.memory_lock
|
||||
value: "true"
|
||||
- name: xpack.security.enabled
|
||||
value: "false"
|
||||
- name: ES_JAVA_OPTS
|
||||
value: "-Xms1g -Xmx1g"
|
||||
- name: SET_ULIMIT
|
||||
value: "1"
|
||||
initContainers:
|
||||
- name: set-max-map-count
|
||||
image: alpine
|
||||
securityContext:
|
||||
privileged: true
|
||||
command: ["sh", "-c", "sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536"]
|
||||
{{ end }}
|
||||
{{ if .Values.sip.enabled }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: koha-sip
|
||||
namespace: koha-{{ .Values.instance }}
|
||||
labels:
|
||||
app: koha
|
||||
component: sip
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: koha
|
||||
component: sip
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: koha
|
||||
component: sip
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-wait
|
||||
image: alpine
|
||||
command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 {{ .Values.instance }}-plack 5000 && exit 0 || sleep 3; done; exit 1"]
|
||||
containers:
|
||||
- name: sip
|
||||
image: {{ .Values.docker.registry }}:{{ .Values.docker.tag }}
|
||||
env:
|
||||
- name: USE_SIP
|
||||
value: "1"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: koha-map
|
||||
volumeMounts:
|
||||
- name: koha-pv
|
||||
mountPath: /etc/koha/sites
|
||||
subPath: sites
|
||||
- name: koha-pv
|
||||
mountPath: /tmp/libshare
|
||||
subPath: lib
|
||||
ports:
|
||||
- containerPort: 6001
|
||||
volumes:
|
||||
- name: koha-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: koha-{{ .Values.instance }}-pvc
|
||||
{{ end }}
|
||||
{{ if .Values.z3950.enabled }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: koha-z3950
|
||||
namespace: koha-{{ .Values.instance }}
|
||||
labels:
|
||||
app: koha
|
||||
component: z3950
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: koha
|
||||
component: z3950
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: koha
|
||||
component: z3950
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-wait
|
||||
image: alpine
|
||||
command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 {{ .Values.instance }}-plack 5000 && exit 0 || sleep 3; done; exit 1"]
|
||||
containers:
|
||||
- name: z3950
|
||||
image: {{ .Values.docker.registry }}:{{ .Values.docker.tag }}
|
||||
env:
|
||||
- name: USE_Z3950
|
||||
value: "1"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: koha-map
|
||||
volumeMounts:
|
||||
- name: koha-pv
|
||||
mountPath: /etc/koha/sites
|
||||
subPath: sites
|
||||
- name: koha-pv
|
||||
mountPath: /tmp/libshare
|
||||
subPath: lib
|
||||
ports:
|
||||
- containerPort: 2100
|
||||
volumes:
|
||||
- name: koha-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: koha-{{ .Values.instance }}-pvc
|
||||
{{ end }}
|
||||
{{ if .Values.ncip.enabled }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: koha-ncip
|
||||
namespace: koha-{{ .Values.instance }}
|
||||
labels:
|
||||
app: koha
|
||||
component: ncip
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: koha
|
||||
component: ncip
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: koha
|
||||
component: ncip
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-wait
|
||||
image: alpine
|
||||
command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 {{ .Values.instance }}-plack 5000 && exit 0 || sleep 3; done; exit 1"]
|
||||
containers:
|
||||
- name: ncip
|
||||
image: bywater/koha-ncip-server:v19.05-latest
|
||||
env:
|
||||
- name: KOHA_CONF
|
||||
value: "/conf/{{ .Values.instance }}/koha-conf.xml"
|
||||
volumeMounts:
|
||||
- name: koha-pv
|
||||
mountPath: /conf
|
||||
subPath: sites
|
||||
- name: koha-pv
|
||||
mountPath: /usr/share/koha/lib
|
||||
subPath: lib
|
||||
volumes:
|
||||
- name: koha-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: koha-{{ .Values.instance }}-pvc
|
||||
{{ end }}
|
||||
|
||||
{{ if and .Values.memcached.enabled (not .Values.memcached.external) }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: koha-memcached
|
||||
namespace: koha-{{ .Values.instance }}
|
||||
labels:
|
||||
app: koha
|
||||
component: memcached
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: koha
|
||||
component: memcached
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: koha
|
||||
component: memcached
|
||||
spec:
|
||||
containers:
|
||||
- name: memcached
|
||||
image: memcached
|
||||
command: [ "memcached", "-m", "64m" ]
|
||||
{{ end }}
|
Reference in New Issue
Block a user