- Add default vs custom (s3) storage - K8S: All storages correspond to secrets - K8S: Default storages inited via helm - K8S: Custom storage results in custom secret (per archive) - K8S: Don't add secret per crawl config - API for changing storage per archive - Docker: default storage just hard-coded from env vars (only one for now) - Validate custom storage via aiobotocore before confirming - Data Model: remove usage from users - Data Model: support adding multiple files per crawl for parallel crawls - Data Model: track completions for parallel crawls - Data Model: initial support for tags per crawl, add collection as 'coll' tag README fixes
96 lines
2.1 KiB
YAML
96 lines
2.1 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Values.name }}
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Values.name }}
|
|
replicas: {{ .Values.api_num_replicas }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Values.name }}
|
|
|
|
annotations:
|
|
# force helm to update the deployment each time
|
|
"helm.update": {{ randAlphaNum 5 | quote }}
|
|
|
|
spec:
|
|
|
|
{{- if .Values.minio_local }}
|
|
initContainers:
|
|
- name: init-bucket
|
|
image: {{ .Values.minio_mc_image }}
|
|
imagePullPolicy: {{ .Values.minio_pull_policy }}
|
|
env:
|
|
- name: MC_HOST_local
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: auth-secrets
|
|
key: MC_HOST
|
|
|
|
command: ['/bin/sh']
|
|
args: ['-c', 'mc mb local/test-bucket; mc policy set public local/test-bucket' ]
|
|
{{- end }}
|
|
|
|
containers:
|
|
- name: api
|
|
image: {{ .Values.api_image }}
|
|
imagePullPolicy: {{ .Values.api_pull_policy }}
|
|
envFrom:
|
|
- configMapRef:
|
|
name: {{ .Values.name }}-env-config
|
|
- secretRef:
|
|
name: auth-secrets
|
|
|
|
resources:
|
|
limits:
|
|
cpu: {{ .Values.api_limits_cpu }}
|
|
memory: {{ .Values.api_limits_memory }}
|
|
|
|
requests:
|
|
cpu: {{ .Values.api_requests_cpu }}
|
|
memory: {{ .Values.api_requests_memory }}
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
|
|
metadata:
|
|
namespace: {{ .Release.Namespace }}
|
|
name: {{ .Values.name }}
|
|
labels:
|
|
app: {{ .Values.name }}
|
|
|
|
{{- 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 }}
|
|
|
|
{{- if .Values.service }}
|
|
{{- if .Values.service.type }}
|
|
type: {{ .Values.service.type | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8000
|
|
name: api
|
|
#externalIPs:
|
|
# - 127.0.0.1
|