Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Jan 18, 2024
1 parent 7c9c177 commit f921f50
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 25 deletions.
4 changes: 2 additions & 2 deletions kubernetes/loculus/templates/_common-metadata.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fields:
{{- define "loculus.generateWebsiteConfig" }}
{{- $commonMetadata := (include "loculus.commonMetadata" . | fromYaml).fields }}
instances:
{{- range $key, $instance := .instances }}
{{- range $key, $instance := $.Values.instances }}
{{ $key }}:
schema:
{{- with $instance.schema }}
Expand Down Expand Up @@ -65,7 +65,7 @@ fields:
{{/* Generate backend config from passed config object */}}
{{- define "loculus.generateBackendConfig" }}
instances:
{{- range $key, $instance := .instances }}
{{- range $key, $instance := $.Values.instances }}
{{ $key }}:
schema:
{{- with $instance.schema }}
Expand Down
3 changes: 1 addition & 2 deletions kubernetes/loculus/templates/lapis-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{- $lapisHost := printf "lapis.%s" .Values.host }}
{{- $config := $.Values.configYaml }}
{{- range $key, $_ := $config.instances }}
{{- range $key, $_ := $.instances }}

---
apiVersion: traefik.containo.us/v1alpha1
Expand Down
4 changes: 1 addition & 3 deletions kubernetes/loculus/templates/lapis-service.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{{- $config := $.Values.configYaml }}

{{- range $key, $_ := $config.instances }}
{{- range $key, $_ := $.Values.instances }}
---
apiVersion: v1
kind: Service
Expand Down
3 changes: 1 addition & 2 deletions kubernetes/loculus/templates/lapis-silo-database-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{- $config := $.Values.configYaml }}
{{- $commonMetadata := (include "loculus.commonMetadata" . | fromYaml).fields }}
{{- $importScriptLines := .Files.Lines "silo_import_job.sh" }}

{{- range $key, $instance := $config.instances }}
{{- range $key, $instance := $.Values.instances }}
---
apiVersion: v1
kind: ConfigMap
Expand Down
4 changes: 1 addition & 3 deletions kubernetes/loculus/templates/lapis-silo-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{{- $config := $.Values.configYaml }}

{{- range $key, $_ := $config.instances }}
{{- range $key, $_ := $.Values.instances }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down
4 changes: 1 addition & 3 deletions kubernetes/loculus/templates/lapis-silo-import-cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{{- $config := $.Values.configYaml }}

{{- $keycloakTokenUrl := "http://loculus-keycloak-service:8083/realms/loculusRealm/protocol/openid-connect/token" }}


{{- range $key, $_ := $config.instances }}
{{- range $key, $_ := $.Values.instances }}
---
apiVersion: batch/v1
kind: CronJob
Expand Down
4 changes: 1 addition & 3 deletions kubernetes/loculus/templates/lapis-silo-shared-data.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{{- $config := $.Values.configYaml }}

{{- range $key, $_ := $config.instances }}
{{- range $key, $_ := $.Values.instances }}
---
apiVersion: v1
kind: PersistentVolumeClaim
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/loculus/templates/loculus-backend-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ metadata:
namespace: {{ .Values.namespace }}
data:
backend_config.json: |
{{ $.Values.configYaml | include "loculus.generateBackendConfig" | fromYaml | toJson }}
{{ include "loculus.generateBackendConfig" . | fromYaml | toJson }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- $dockerTag := include "loculus.dockerTag" .Values }}
{{ $config := $.Values.configYaml }}
{{ $backendHost := .Values.disableBackend | ternary
"http://host.k3d.internal:8079"
"http://loculus-backend-service:8079"
Expand Down Expand Up @@ -28,7 +27,7 @@ spec:
component: loculus-preprocessing
spec:
containers:
{{- range $key, $_ := $config.instances }}
{{- range $key, $_ := $.Values.instances }}
- name: preprocessing-{{ $key }}
image: ghcr.io/loculus-project/preprocessing-dummy:{{ $dockerTag }}
imagePullPolicy: Always
Expand Down
7 changes: 3 additions & 4 deletions kubernetes/loculus/templates/loculus-website-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{{- $keycloakHost := printf "authentication.%s" .Values.host }}
{{- $config := $.Values.configYaml }}
{{- $lapisHost := (
eq .Values.environment "server" | ternary
(printf "https://lapis.%s" .Values.host)
"http://localhost:8080"
) }}
{{- $externalLapisUrlConfig := dict
"host" $lapisHost
"config" $config
"config" $.Values
}}

---
Expand All @@ -18,7 +17,7 @@ metadata:
namespace: {{ .Values.namespace }}
data:
website_config.json: |
{{ $config | include "loculus.generateWebsiteConfig" | fromYaml | toJson }}
{{ include "loculus.generateWebsiteConfig" . | fromYaml | toJson }}
runtime_config.json: |
{
Expand All @@ -28,7 +27,7 @@ data:
{{- else }}
"backendUrl": "http://localhost:8079",
{{- end }}
"lapisUrls": {{- include "loculus.generateInternalLapisUrls" $config | fromYaml | toJson }},
"lapisUrls": {{- include "loculus.generateInternalLapisUrls" . | fromYaml | toJson }},
"keycloakUrl": "http://loculus-keycloak-service:8083"
},
"public": {
Expand Down

0 comments on commit f921f50

Please sign in to comment.