diff --git a/helm/fhir-server/templates/deployment.yaml b/helm/fhir-server/templates/deployment.yaml index 182374df..537307a3 100644 --- a/helm/fhir-server/templates/deployment.yaml +++ b/helm/fhir-server/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "fhir-server.fullname" . }} + name: fhir-server-deployment labels: {{- include "fhir-server.labels" . | nindent 4 }} spec: @@ -49,7 +49,6 @@ spec: path: /_status port: http initialDelaySeconds: 30 - resources: {{- toYaml .Values.resources | nindent 12 }} command: diff --git a/helm/grip/templates/deployment.yaml b/helm/grip/templates/deployment.yaml index 4eed828d..781c67c3 100644 --- a/helm/grip/templates/deployment.yaml +++ b/helm/grip/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: local-grip + name: grip-deployment labels: {{- include "grip.labels" . | nindent 4 }} spec: @@ -27,12 +27,21 @@ spec: serviceAccountName: {{ include "grip.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + - name: mongo-config-volume + configMap: + name: grip-values containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - name: mongo-config-volume + mountPath: /data/mongo.yml + subPath: mongoConfig + readOnly: true ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/helm/grip/templates/grip-values.yaml b/helm/grip/templates/grip-values.yaml new file mode 100644 index 00000000..bd4fa202 --- /dev/null +++ b/helm/grip/templates/grip-values.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: grip-values +data: + serviceName: {{ .Values.serviceName | quote }} + mongoConfig: |- + {{ toYaml .Values.mongoConfig| nindent 4}} diff --git a/helm/grip/templates/post-install.yaml b/helm/grip/templates/post-install.yaml index 1affe372..5814a37a 100644 --- a/helm/grip/templates/post-install.yaml +++ b/helm/grip/templates/post-install.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: grip-mongo-initdb + name: grip-initdb spec: backoffLimit: 10 template: @@ -19,6 +19,5 @@ spec: args: - "-c" - | - apk add --no-cache curl && \ - curl -X POST http://local-grip:8201/v1/graph/CALIPER + apk add --no-cache curl && sleep 10 && curl -X POST 'http://{{ .Values.serviceName }}:8201/v1/graph/CALIPER' restartPolicy: OnFailure diff --git a/helm/grip/templates/service.yaml b/helm/grip/templates/service.yaml index f234b2e2..c87dbaca 100644 --- a/helm/grip/templates/service.yaml +++ b/helm/grip/templates/service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: local-grip + name: {{ .Values.serviceName}} labels: {{- include "grip.labels" . | nindent 4 }} spec: diff --git a/helm/grip/values.yaml b/helm/grip/values.yaml index 7cf5d9e2..772ea7c2 100644 --- a/helm/grip/values.yaml +++ b/helm/grip/values.yaml @@ -3,6 +3,7 @@ # Declare variables to be passed into your templates. replicaCount: 1 +serviceName: grip-service image: repository: quay.io/ohsu-comp-bio/grip-caliper diff --git a/helm/mongodb/values.yaml b/helm/mongodb/values.yaml index c8c2d4d7..0afcfcf3 100644 --- a/helm/mongodb/values.yaml +++ b/helm/mongodb/values.yaml @@ -30,7 +30,7 @@ global: nameOverride: "" ## @param fullnameOverride String to fully override mongodb.fullname template ## -fullnameOverride: "mongodb-deployment" +fullnameOverride: "mongodb" ## @param namespaceOverride String to fully override common.names.namespace ## namespaceOverride: "" @@ -122,11 +122,11 @@ image: repository: zcube/bitnami-compat-mongodb tag: 6.0.5-debian-11 digest: "" -#image: - #registry: docker.io - #repository: bitnami/mongodb - #tag: 6.0.8-debian-11-r12 - #digest: "" +# image: + # registry: docker.io + # repository: bitnami/mongodb + # tag: 6.0.8-debian-11-r12 + # digest: "" ## Specify a imagePullPolicy ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images ## @@ -721,7 +721,7 @@ pdb: service: ## @param service.nameOverride MongoDB(®) service name ## - nameOverride: "" + nameOverride: "mongodb-service" ## @param service.type Kubernetes Service type (only for standalone architecture) ## type: ClusterIP diff --git a/helm/revproxy/gen3.nginx.conf/fhir-server-service.conf b/helm/revproxy/gen3.nginx.conf/fhir-server-service.conf new file mode 100644 index 00000000..cee8c994 --- /dev/null +++ b/helm/revproxy/gen3.nginx.conf/fhir-server-service.conf @@ -0,0 +1,10 @@ +location /Bundle { + proxy_connect_timeout 600s; + proxy_send_timeout 600s; + proxy_read_timeout 600s; + send_timeout 600s; + + set $upstream http://fhir-server-service.$namespace.svc.cluster.local:8000; + rewrite ^/Bundle/(.*) /$1 break; + proxy_pass $upstream; +} \ No newline at end of file diff --git a/helm/revproxy/gen3.nginx.conf/local-grip.conf b/helm/revproxy/gen3.nginx.conf/grip-service.conf similarity index 70% rename from helm/revproxy/gen3.nginx.conf/local-grip.conf rename to helm/revproxy/gen3.nginx.conf/grip-service.conf index 44f521ac..0c272ac4 100644 --- a/helm/revproxy/gen3.nginx.conf/local-grip.conf +++ b/helm/revproxy/gen3.nginx.conf/grip-service.conf @@ -5,7 +5,7 @@ location /grip/reader { send_timeout 600s; rewrite ^/grip/(.*) /$1 break; - proxy_pass http://local-grip.$namespace.svc.cluster.local:8201/reader/api; + proxy_pass http://grip-service.$namespace.svc.cluster.local:8201/reader/api; } location /grip/writer/ { @@ -15,5 +15,5 @@ location /grip/writer/ { send_timeout 600s; rewrite ^/grip/writer/(.*)$ /$1 break; - proxy_pass http://local-grip.$namespace.svc.cluster.local:8201; + proxy_pass http://grip-service.$namespace.svc.cluster.local:8201; } diff --git a/helm/revproxy/gen3.nginx.conf/local-fhir-server.conf b/helm/revproxy/gen3.nginx.conf/local-fhir-server.conf deleted file mode 100644 index 475339cf..00000000 --- a/helm/revproxy/gen3.nginx.conf/local-fhir-server.conf +++ /dev/null @@ -1,15 +0,0 @@ -location /Bundle { - proxy_connect_timeout 600s; - proxy_send_timeout 600s; - proxy_read_timeout 600s; - send_timeout 600s; - - set $proxy_service "local-fhir-server"; - #upstream is written to logs - #add_header Access-Control-Allow-Origin *; - #add_header Content-Type application/json; - set $upstream http://local-fhir-server.$namespace.svc.cluster.local:8000; - rewrite ^/Bundle/(.*) /$1 break; - proxy_pass $upstream; - client_max_body_size 0; -} \ No newline at end of file