EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit c9959c42 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Adding cache related templates in Chart

parent c70aadaf
No related branches found
No related tags found
1 merge request!55Production release 1.2.0
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "vs.fullname" . }}-cache
name: {{ include "vs.fullname" . }}-cache-config
data:
{{ (tpl (.Files.Glob "files/mapcache.xml").AsConfig . ) | nindent 2}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "vs.fullname" . }}-cache
labels:
{{- include "vs.labels" . | nindent 4 }}
app.kubernetes.io/service: cache
spec:
replicas: {{ .Values.cache.replicaCount }}
selector:
matchLabels:
{{- include "vs.selectorLabels" . | nindent 6 }}
app.kubernetes.io/service: cache
strategy:
rollingUpdate:
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
annotations:
prometheus.io/scrape: "false"
labels:
{{- include "vs.selectorLabels" . | nindent 8 }}
app.kubernetes.io/service: cache
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-cache
image: "{{ .Values.cache.image.repository | default "registry.gitlab.eox.at/esa/prism/vs/pvs_cache" }}:{{ .Values.cache.image.tag | default ( print "release-" .Chart.AppVersion ) }}"
imagePullPolicy: {{ .Values.cache.image.pullPolicy | default "IfNotPresent" }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
startupProbe:
httpGet:
path: /
port: http
failureThreshold: 30
periodSeconds: 10
resources:
{{- toYaml .Values.cache.resources | nindent 12 }}
args:
- /run-httpd.sh
env:
{{- range $key, $value := .Values.config.general }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.config.database }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
- name: DB_HOST
value: {{ .Release.Name }}-database
{{- range $key, $value := .Values.config.objectStorage.data }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
- name: RENDERER_HOST
value: {{ .Release.Name }}-renderer
- name: INSTANCE_ID
value: prism-view-server_cache
- name: WAIT_SERVICES
value: "{{ .Release.Name }}-database:{{ .Values.config.database.DB_PORT }} {{ .Release.Name }}-renderer:80"
- name: WAIT_TIMEOUT
value: 300
volumeMounts:
- mountPath: /mapcache-template.xml
name: cache-config.xml
subPath: cache-config.xml
{{- with .Values.cache.affinity | default .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- configMap:
items:
- key: cache-config.xml
path: cache-config.xml
name: {{ include "vs.fullname" . }}-cache-config
name: cache-config
apiVersion: v1
kind: Service
metadata:
name: {{ include "vs.fullname" . }}-cache
labels:
{{- include "vs.labels" . | nindent 4 }}
app.kubernetes.io/service: cache
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "vs.selectorLabels" . | nindent 4 }}
app.kubernetes.io/service: cache
......@@ -43,12 +43,12 @@ spec:
backend:
serviceName: {{ $fullName }}-renderer
servicePort: http
- path: /cache/(.*)
backend:
serviceName: {{ $fullName }}-cache
servicePort: http
- path: /(.*)
backend:
serviceName: {{ $fullName }}-client
servicePort: http
# - path: /cache/(.*)
# backend:
# serviceName: {{ $fullName }}-cache
# servicePort: http
{{- end }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment