* backend: k8s: - support crawls with multiple wacz files, don't assume crawl complete after first wacz uploaded - if crawl is running and has wacz file, still show as running - k8s: allow configuring node selector for main pods (eg. nodeType=main) and for crawlers (eg. nodeType=crawling) - profiles: support uploading to alternate storage specified via 'shared_profile_storage' value is set - misc fixes for profiles * backend: ensure docker run_profile api matches k8s k8s chart: don't delete pvc and pv in helm chart * dependency: bump authsign to 0.4.0 docker: disable public redis port * profiles: fix path, profile browser return value * fix typo in presigned url cacheing
111 lines
2.5 KiB
YAML
111 lines
2.5 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Values.name }}-frontend
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Values.name }}
|
|
role: frontend
|
|
replicas: {{ .Values.nginx_num_replicas | default 1 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Values.name }}
|
|
role: frontend
|
|
|
|
annotations:
|
|
# force helm to update the deployment each time
|
|
{{- if not .Values.backend_only }}
|
|
"helm.update": {{ randAlphaNum 5 | quote }}
|
|
{{- end }}
|
|
|
|
|
|
spec:
|
|
{{- if .Values.main_node_type }}
|
|
nodeSelector:
|
|
nodeType: {{ .Values.main_node_type }}
|
|
{{- end }}
|
|
|
|
volumes:
|
|
- name: nginx-resolver
|
|
emptyDir: {}
|
|
|
|
initContainers:
|
|
- name: init-nginx
|
|
image: {{ .Values.nginx_image }}
|
|
command: ["/bin/sh"]
|
|
args: ["-c", "echo resolver $(awk 'BEGIN{ORS=\" \"} $1==\"nameserver\" {print $2}' /etc/resolv.conf) valid=30s \";\" > /etc/nginx/resolvers/resolvers.conf"]
|
|
volumeMounts:
|
|
- name: nginx-resolver
|
|
mountPath: /etc/nginx/resolvers/
|
|
|
|
|
|
containers:
|
|
- name: nginx
|
|
image: {{ .Values.nginx_image }}
|
|
imagePullPolicy: {{ .Values.nginx_pull_policy }}
|
|
volumeMounts:
|
|
- name: nginx-resolver
|
|
mountPath: /etc/nginx/resolvers/
|
|
readOnly: true
|
|
|
|
env:
|
|
- name: BACKEND_HOST
|
|
value: {{ .Values.name }}-backend
|
|
|
|
resources:
|
|
limits:
|
|
cpu: {{ .Values.nginx_limits_cpu }}
|
|
memory: {{ .Values.nginx_limits_memory }}
|
|
|
|
requests:
|
|
cpu: {{ .Values.nginx_requests_cpu }}
|
|
memory: {{ .Values.nginx_requests_memory }}
|
|
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
|
|
metadata:
|
|
namespace: {{ .Release.Namespace }}
|
|
name: {{ .Values.name }}-frontend
|
|
labels:
|
|
app: {{ .Values.name }}
|
|
role: frontend
|
|
|
|
{{- if .Values.service }}
|
|
{{- if .Values.service.annotations }}
|
|
annotations:
|
|
{{- range $key, $val := .Values.service.annotations }}
|
|
{{ $key }}: {{ $val | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
spec:
|
|
selector:
|
|
app: {{ .Values.name }}
|
|
role: frontend
|
|
|
|
{{- if .Values.service }}
|
|
{{- if .Values.service.type }}
|
|
type: {{ .Values.service.type | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
name: frontend
|
|
|