added init container and chown for nexus files
This commit is contained in:
parent
364fe53114
commit
fd86066cee
|
@ -6,8 +6,35 @@ NEXUS repository for kubernetes to deploy on a kubernetes cluster with NFS-share
|
||||||
|
|
||||||
This chart will deploy:
|
This chart will deploy:
|
||||||
|
|
||||||
|
- 1 NEXUS-nfs initialization container
|
||||||
|
|
||||||
|
We need this container to avoid permission issues on the NEXUS docker
|
||||||
- 1 NEXUS container
|
- 1 NEXUS container
|
||||||
- 1 MOLGENIS-httpd container ()to proxy the registry and docker to one domain)
|
- 1 MOLGENIS-httpd container (to proxy the registry and docker to one domain)
|
||||||
|
|
||||||
|
## Backup restore
|
||||||
|
|
||||||
|
Go to the commandline:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl get pv
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
| NAME | CAPACITY | ACCESS | MODES | RECLAIM | POLICY | STATUS | CLAIM | STORAGECLASS | REASON | AGE |
|
||||||
|
| ---- | -------- | ------ | ----- | ------- | ------ | ------ | ----- | ------------ | ------ | --- |
|
||||||
|
| pvc-45988f55-900f-11e8-a0b4-005056a51744 | 30G | RWX | | Retain | Bound | molgenis-nexus/molgenis-nfs-claim | nfs-provisioner-retain | | | 33d |
|
||||||
|
| pvc-3984723d-220f-14e8-a98a-skjhf88823kk | 30G | RWO | | Delete | Bound | molgenis-test/molgenis-nfs-claim | nfs-provisioner | | | 33d |
|
||||||
|
```
|
||||||
|
|
||||||
|
The persistent volume is the one in the molgenis-nexus namespace.
|
||||||
|
|
||||||
|
Go to the NFS-provisioner to the path of the persistent volume:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls -t --full-time | head -7 | xargs cp ../restore-from-backup/
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Installing the Chart
|
## Installing the Chart
|
||||||
|
|
||||||
|
|
|
@ -20,32 +20,39 @@ spec:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: {{ .Values.nexus.restartPolicy }}
|
restartPolicy: {{ .Values.nexus.restartPolicy }}
|
||||||
|
initContainers:
|
||||||
|
- name: nexus-nfs
|
||||||
|
image: busybox
|
||||||
|
command: ["sh", "-c", "chown -R 200:200 /nexus-data"]
|
||||||
|
volumeMounts:
|
||||||
|
- name: molgenis-nexus-nfs
|
||||||
|
mountPath: "/nexus-data"
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Values.nexus.name }}
|
- name: {{ .Values.nexus.name }}
|
||||||
image: "{{ .Values.nexus.image.repository }}:{{ .Values.nexus.image.tag }}"
|
image: "{{ .Values.nexus.image.repository }}:{{ .Values.nexus.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.nexus.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.nexus.image.pullPolicy }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.nexus.port.ui }}
|
- containerPort: {{ .Values.nexus.port.ui }}
|
||||||
- containerPort: {{ .Values.nexus.port.docker }}
|
- containerPort: {{ .Values.nexus.port.docker }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: molgenis-nexus-nfs
|
- name: molgenis-nexus-nfs
|
||||||
mountPath: "/nexus-data"
|
mountPath: /nexus-data
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: {{ .Values.nexus.port.ui }}
|
port: {{ .Values.nexus.port.ui }}
|
||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 20
|
periodSeconds: 20
|
||||||
failureThreshold: 5
|
failureThreshold: 5
|
||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: {{ .Values.nexus.port.ui }}
|
port: {{ .Values.nexus.port.ui }}
|
||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
failureThreshold: 5
|
failureThreshold: 5
|
||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: molgenis-nexus-nfs
|
- name: molgenis-nexus-nfs
|
||||||
|
|
|
@ -13,7 +13,7 @@ nexus:
|
||||||
selector: nexus
|
selector: nexus
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
image:
|
image:
|
||||||
repository: sonatype/nexus3
|
repository: molgenis/nexus3
|
||||||
tag: latest
|
tag: latest
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
port:
|
port:
|
||||||
|
@ -32,8 +32,8 @@ nexusProxy:
|
||||||
selector: nexus-proxy
|
selector: nexus-proxy
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
image:
|
image:
|
||||||
repository: registry.webhosting.rug.nl/molgenis/httpd
|
repository: molgenis/httpd
|
||||||
tag: lts
|
tag: latest
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
port: 80
|
port: 80
|
||||||
service:
|
service:
|
||||||
|
|
Loading…
Reference in New Issue