- no longer using :latest by default in values.yaml, instead updating version with each release - set chart version to match app version in Chart.yaml - update version in helm chart and values.yaml as part of update-version.sh script - update test.yaml and local-config.yaml to enable using :latest tag images - ci: add ci script for packaging current helm chart - docs: updates docs to indicate deploying directly from GitHub release - docs: add script to fill in latest version for 'VERSION' using custom script - chart: set local_service_port to 30870 by default, but use only if no ingress. - default values.yaml set up for local deployment, local-config.yaml contains additional commented out examples - ci draft: add deployment info to draft with helm install command for current version - test: fix password check test
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.frontend_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 }}
|
|
|
|
containers:
|
|
- name: nginx
|
|
image: {{ .Values.frontend_image }}
|
|
imagePullPolicy: {{ .Values.frontend_pull_policy }}
|
|
env:
|
|
- name: BACKEND_HOST
|
|
value: {{ .Values.name }}-backend
|
|
|
|
- name: CRAWLER_FQDN_SUFFIX
|
|
value: ".{{ .Values.crawler_namespace }}.svc.cluster.local"
|
|
|
|
- name: NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE
|
|
value: "1"
|
|
|
|
{{- if .Values.minio_local }}
|
|
- name: LOCAL_MINIO_HOST
|
|
value: "{{ .Values.minio_host }}"
|
|
|
|
- name: LOCAL_BUCKET
|
|
value: "{{ .Values.minio_local_bucket_name }}"
|
|
{{- end }}
|
|
|
|
resources:
|
|
limits:
|
|
memory: {{ .Values.frontend_memory }}
|
|
|
|
requests:
|
|
cpu: {{ .Values.frontend_cpu }}
|
|
memory: {{ .Values.frontend_memory }}
|
|
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 8880
|
|
failureThreshold: 3
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 1
|
|
---
|
|
|
|
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
|
|
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
name: frontend
|
|
|
|
{{- if and .Values.local_service_port (not .Values.ingress.host) }}
|
|
nodePort: {{ .Values.local_service_port }}
|
|
|
|
type: NodePort
|
|
{{- end }}
|
|
|
|
|
|
|