-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helm chart for taxonium backend (#615)
* update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add ingress and svc * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update ingress.yaml * Update ingress.yaml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9c2ed5c
commit e8bff46
Showing
6 changed files
with
151 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v2 | ||
name: taxonium-backend | ||
description: A Helm chart for the Taxonium backend | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Release.Name }}-taxonium-backend | ||
labels: | ||
app: {{ .Release.Name }}-taxonium-backend | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Release.Name }}-taxonium-backend | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxSurge: {{ .Values.maxSurge | default "25%" }} | ||
maxUnavailable: {{ .Values.maxUnavailable | default "25%" }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Release.Name }}-taxonium-backend | ||
annotations: | ||
kubectl.kubernetes.io/restartedAt: {{ now | date "2006-01-02T15:04:05Z" | quote }} | ||
spec: | ||
containers: | ||
- name: taxonium-backend | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: DATA_URL | ||
value: {{ .Values.dataUrl }} | ||
- name: CONFIG_JSON | ||
value: {{ .Values.configJson }} | ||
- name: MAXMEM | ||
value: {{ .Values.maxmem | quote }} | ||
ports: | ||
- containerPort: 80 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: 80 | ||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }} | ||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} | ||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }} | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: 80 | ||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }} | ||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} | ||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }} | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Release.Name }}-taxonium-backend | ||
labels: | ||
app: {{ .Release.Name }}-taxonium-backend | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.ingress.className }} | ||
ingressClassName: {{ .Values.ingress.className }} | ||
{{- end }} | ||
rules: | ||
- host: {{ .Values.hostname | quote }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ .Release.Name }}-taxonium-backend | ||
port: | ||
number: {{ .Values.service.port }} | ||
{{- with .Values.ingress.tls }} | ||
tls: | ||
- hosts: | ||
- {{ $.Values.hostname | quote }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Release.Name }}-taxonium-backend | ||
labels: | ||
app: {{ .Release.Name }}-taxonium-backend | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: 80 | ||
protocol: TCP | ||
selector: | ||
app: {{ .Release.Name }}-taxonium-backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
replicaCount: 1 | ||
|
||
image: | ||
repository: theosanderson/taxonium_backend | ||
tag: master | ||
pullPolicy: Always | ||
|
||
maxSurge: "25%" | ||
maxUnavailable: "25%" | ||
|
||
dataUrl: "https://cov2tree.nyc3.cdn.digitaloceanspaces.com/latest_public.jsonl.gz" | ||
configJson: "config_public.json" | ||
maxmem: "7000" | ||
|
||
livenessProbe: | ||
initialDelaySeconds: 120 | ||
periodSeconds: 30 | ||
timeoutSeconds: 10 | ||
failureThreshold: 3 | ||
|
||
readinessProbe: | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
timeoutSeconds: 1 | ||
failureThreshold: 3 | ||
|
||
resources: | ||
requests: | ||
cpu: "1" | ||
memory: 6500Mi | ||
|
||
ingress: | ||
enabled: true | ||
className: "" | ||
annotations: | ||
{} | ||
# kubernetes.io/ingress.class: nginx | ||
# kubernetes.io/tls-acme: "true" | ||
hosts: | ||
- host: chart-example.local | ||
paths: | ||
- path: / | ||
pathType: ImplementationSpecific | ||
tls: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters