Skip to content

Commit

Permalink
feature(k8s.mica): Add more MICA documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-darms committed Nov 7, 2023
1 parent 87ffa4a commit a9498b1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 14 additions & 1 deletion k8s/mica/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,26 @@

`helm install my-test ./mica`


# Add Custom Templates
This creates a volume `{{ .Release.Name }}-template-container-mica` where one can store custom
templates. Just copy the freemaker files into the running pod.

`kubcetl cp ~/PycharmProjects/mica-templates/ {{ .Release.Name }}-mica-0:/usr/share/mica2/webapp/WEB-INF/classes/`


k cp _templates/ mica-mica-0:/usr/share/mica2/webapp/WEB-INF/classes/templates/
`k cp _templates/ mica-mica-0:/usr/share/mica2/webapp/WEB-INF/classes/templates/`

# Expose mica behind an ingress
Somehow the CRSF configuration does not work as expected.

`k exec -it {{ .Release.Name }}-mica-0 -c backup -- /bin/sh`
`/ #` vi /srv/conf/application.yml`
And add the following lines to the top of the file:
```
csrf:
allowed: {{ .Values.ingress.dns }}
```

# Load a backup
A backup consists of two parts, a mongodb backup and the contents of `MICA_HOME`.
Expand Down
4 changes: 4 additions & 0 deletions k8s/mica/templates/mica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
requests:
memory: 512Mi
env:
{{- if .Values.ingress.dns }}
- name: SPRING_CSRF_ALLOWED
value: {{ .Values.ingress.dns }}
{{- end }}
- name: MICA_ADMINISTRATOR_PASSWORD
valueFrom:
secretKeyRef:
Expand Down

0 comments on commit a9498b1

Please sign in to comment.