From 610ebfef400aa7b2487e868c58e17004fefb77b2 Mon Sep 17 00:00:00 2001 From: chgl Date: Wed, 13 Jan 2021 11:43:40 +0100 Subject: [PATCH] docs: updated docs for ohdsi chart --- charts/ohdsi/Chart.yaml | 2 +- charts/ohdsi/README.md | 48 ++++++++------------ charts/ohdsi/README.tpl | 5 +- charts/ohdsi/templates/achilles-cronjob.yaml | 4 ++ charts/ohdsi/values.yaml | 30 ++++++++---- 5 files changed, 48 insertions(+), 41 deletions(-) diff --git a/charts/ohdsi/Chart.yaml b/charts/ohdsi/Chart.yaml index 60247811..5633e659 100644 --- a/charts/ohdsi/Chart.yaml +++ b/charts/ohdsi/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: ohdsi description: A Helm chart for deploying OHDSI ATLAS and WebAPI. type: application -version: 0.3.1 +version: 0.3.2 home: https://github.com/OHDSI keywords: - ohdsi diff --git a/charts/ohdsi/README.md b/charts/ohdsi/README.md index 9eeb7df4..f0be327c 100644 --- a/charts/ohdsi/README.md +++ b/charts/ohdsi/README.md @@ -52,7 +52,7 @@ The following table lists the configurable parameters of the `ohdsi` chart and t | imagePullSecrets | image pull secrets used by all pods | `[]` | | nameOverride | partially override the release name | `""` | | fullnameOverride | fully override the release name | `""` | -| commonAnnotations | annotations applied to the WebAPI and Atlas deployments | `[]` | +| commonAnnotations | annotations applied to all deployments and jobs | `[]` | | postgresql.enabled | enable an included PostgreSQL DB. if set to `false`, the values under `webApi.db` are used | `true` | | postgresql.image.tag | | `13.1.0` | | postgresql.image.pullPolicy | | `Always` | @@ -65,10 +65,7 @@ The following table lists the configurable parameters of the `ohdsi` chart and t | postgresql.metrics.enabled | should also be true for production use | `false` | | webApi.enabled | enable the OHDSI WebAPI deployment | `true` | | webApi.replicaCount | number of pod replicas for the WebAPI | `1` | -| webApi.image.registry | | `ghcr.io` | -| webApi.image.repository | | `chgl/ohdsi/webapi` | -| webApi.image.tag | | `2.8.0-snapshot` | -| webApi.image.pullPolicy | | `Always` | +| webApi.image | the WebAPI image | `{"pullPolicy":"Always","registry":"ghcr.io","repository":"chgl/ohdsi/webapi","tag":"2.8.0-snapshot"}` | | webApi.db.host | database hostname | `"host.example.com"` | | webApi.db.port | port used to connect to the postgres DB | `5432` | | webApi.db.database | name of the database inside. If postgresql.enabled=true, then postgresql.postgresqlDatabase is used | `"ohdsi"` | @@ -76,36 +73,32 @@ The following table lists the configurable parameters of the `ohdsi` chart and t | webApi.db.password | the database password. Only used if postgresql.enabled=false, otherwise the secret created by the postgresql chart is used | `"postgres"` | | webApi.db.existingSecret | name of an existing secret containing the password to the DB. | `""` | | webApi.db.existingSecretKey | name of the key in `webApi.db.existingSecret` to use as the password to the DB. | `"postgresql-postgres-password"` | -| webApi.podAnnotations | annotations applied to the WebAPI pod | `{}` | -| webApi.podSecurityContext | security context for the WebAPI pod | `{}` | +| webApi.podAnnotations | annotations applied to the pod | `{}` | +| webApi.podSecurityContext | security context for the pod | `{}` | | webApi.securityContext | security context for the WebAPI container | `{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":101}` | | webApi.service.type | | `ClusterIP` | | webApi.service.port | | `8080` | -| webApi.ingress.enabled | | `false` | +| webApi.ingress.enabled | whether to create an Ingress to expose the WebAPI | `false` | | webApi.ingress.annotations | | `{}` | | webApi.ingress.tls | | `[]` | -| webApi.resources | | `{}` | +| webApi.resources | resource requests and limits for the container | `{}` | | webApi.readinessProbe | | `{"failureThreshold":5,"initialDelaySeconds":45,"periodSeconds":15,"successThreshold":1,"timeoutSeconds":15}` | | webApi.nodeSelector | | `{}` | | webApi.tolerations | | `[]` | | webApi.affinity | | `{}` | | webApi.extraEnv | extra environment variables | `[]` | | atlas.enabled | enable the OHDSI Atlas deployment | `true` | -| atlas.replicaCount | | `1` | -| atlas.image.registry | | `ghcr.io` | -| atlas.image.repository | | `chgl/ohdsi/atlas` | -| atlas.image.tag | | `2.8.0` | -| atlas.image.pullPolicy | | `Always` | +| atlas.replicaCount | number of replicas | `1` | +| atlas.image | the Atlas image | `{"pullPolicy":"Always","registry":"ghcr.io","repository":"chgl/ohdsi/atlas","tag":"2.8.0"}` | | atlas.webApiUrl | the base URL of the OHDSI WebAPI, e.g. https://example.com/WebAPI if this value is not set but `webapi.ingress.enabled=true`, then this URL is constructed from `webapi.ingress` | `""` | -| atlas.podAnnotations | | `{}` | -| atlas.podSecurityContext | | `{}` | +| atlas.podAnnotations | annotations for the pod | `{}` | +| atlas.podSecurityContext | security context for the pod | `{}` | | atlas.securityContext | ContainerSecurityContext for the Atlas container | `{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":false,"runAsNonRoot":true,"runAsUser":101}` | -| atlas.service.type | | `ClusterIP` | -| atlas.service.port | | `8080` | -| atlas.ingress.enabled | | `false` | +| atlas.service | the service used to expose the Atlas web port | `{"port":8080,"type":"ClusterIP"}` | +| atlas.ingress.enabled | whether to create an Ingress to expose the Atlas web interface | `false` | | atlas.ingress.annotations | | `{}` | | atlas.ingress.tls | | `[]` | -| atlas.resources | | `{}` | +| atlas.resources | resource requests and limits for the container | `{}` | | atlas.readinessProbe | | `{"failureThreshold":5,"initialDelaySeconds":30,"periodSeconds":15,"successThreshold":1,"timeoutSeconds":15}` | | atlas.livenessProbe | | `{"failureThreshold":5,"initialDelaySeconds":30,"periodSeconds":15,"successThreshold":1,"timeoutSeconds":15}` | | atlas.nodeSelector | | `{}` | @@ -113,20 +106,14 @@ The following table lists the configurable parameters of the `ohdsi` chart and t | atlas.affinity | | `{}` | | atlas.extraEnv | extra environment variables | `[]` | | cdmInitJob.enabled | if enabled, create a Kubernetes Job running the specified container see [cdm-init-job.yaml](templates/cdm-init-job.yaml) for the env vars that are passed by default | `false` | -| cdmInitJob.image.registry | | `docker.io` | -| cdmInitJob.image.repository | | `docker/whalesay` | -| cdmInitJob.image.tag | | `latest` | -| cdmInitJob.image.pullPolicy | | `Always` | +| cdmInitJob.image | the Achilles image | `{"pullPolicy":"Always","registry":"docker.io","repository":"docker/whalesay","tag":"latest"}` | | cdmInitJob.podAnnotations | annotations set on the cdm-init pod | `{}` | | cdmInitJob.podSecurityContext | PodSecurityContext for the cdm-init pod | `{}` | | cdmInitJob.securityContext | ContainerSecurityContext for the cdm-init container | `{}` | | cdmInitJob.extraEnv | extra environment variables to set | `[]` | | achilles.enabled | whether or not to enable the Achilles cron job | `true` | | achilles.schedule | when to run the Achilles job. See | `"@daily"` | -| achilles.image.registry | | `ghcr.io` | -| achilles.image.repository | | `chgl/ohdsi/achilles` | -| achilles.image.tag | | `master` | -| achilles.image.pullPolicy | | `Always` | +| achilles.image | the Achilles image | `{"pullPolicy":"Always","registry":"ghcr.io","repository":"chgl/ohdsi/achilles","tag":"master"}` | | achilles.schemas.cdm | name of the schema containing the OMOP CDM. Equivalent to the Achilles `ACHILLES_CDM_SCHEMA` env var. | `"synpuf_cdm"` | | achilles.schemas.vocab | name of the schema containing the vocabulary. Equivalent to the Achilles `ACHILLES_VOCAB_SCHEMA` env var. | `"synpuf_vocab"` | | achilles.schemas.res | name of the schema containing the cohort generation results. Equivalent to the Achilles `ACHILLES_RES_SCHEMA` env var. | `"synpuf_results"` | @@ -148,5 +135,6 @@ $ helm install ohdsi chgl/ohdsi -n ohdsi --values values.yaml ## Initialize the CDM using a custom container -The `cdmInitJob` configuration parameter can be used to configure a -custom container that is run as a Kubernetes Job when the chart is installed. +The `cdmInitJob` configuration parameter can be used to configure a custom container that is run as a Kubernetes Job +when the chart is installed. See [templates/cdm-init-job.yaml](templates/cdm-init-job.yaml) for a list of default environment +variables passed to the container. diff --git a/charts/ohdsi/README.tpl b/charts/ohdsi/README.tpl index c60ac46f..f8e4eca3 100644 --- a/charts/ohdsi/README.tpl +++ b/charts/ohdsi/README.tpl @@ -64,5 +64,6 @@ $ helm install {{ .Release.Name }} {{ .Repository.Name }}/{{ .Chart.Name }} -n { ## Initialize the CDM using a custom container -The `cdmInitJob` configuration parameter can be used to configure a -custom container that is run as a Kubernetes Job when the chart is installed. +The `cdmInitJob` configuration parameter can be used to configure a custom container that is run as a Kubernetes Job +when the chart is installed. See [templates/cdm-init-job.yaml](templates/cdm-init-job.yaml) for a list of default environment +variables passed to the container. diff --git a/charts/ohdsi/templates/achilles-cronjob.yaml b/charts/ohdsi/templates/achilles-cronjob.yaml index 01a4b768..a60b0238 100644 --- a/charts/ohdsi/templates/achilles-cronjob.yaml +++ b/charts/ohdsi/templates/achilles-cronjob.yaml @@ -8,6 +8,10 @@ metadata: {{- include "ohdsi.labels" $ | nindent 4 }} app.kubernetes.io/name: {{ include "ohdsi.name" $ }}-achilles-cron app.kubernetes.io/instance: {{ $.Release.Name }}-achilles-cron + {{- with $.Values.commonAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: schedule: {{ .schedule | quote }} jobTemplate: diff --git a/charts/ohdsi/values.yaml b/charts/ohdsi/values.yaml index 5be718bd..623b4d9f 100644 --- a/charts/ohdsi/values.yaml +++ b/charts/ohdsi/values.yaml @@ -5,9 +5,10 @@ nameOverride: "" # fully override the release name fullnameOverride: "" -# annotations applied to the WebAPI and Atlas deployments +# annotations applied to all deployments and jobs commonAnnotations: [] +# see for details postgresql: # enable an included PostgreSQL DB. # if set to `false`, the values under `webApi.db` are used @@ -56,7 +57,8 @@ webApi: enabled: true # number of pod replicas for the WebAPI replicaCount: 1 - image: + # the WebAPI image + image: # +doc-gen:break registry: ghcr.io repository: chgl/ohdsi/webapi tag: 2.8.0-snapshot @@ -78,10 +80,10 @@ webApi: # name of the key in `webApi.db.existingSecret` to use as the password to the DB. existingSecretKey: "postgresql-postgres-password" - # annotations applied to the WebAPI pod + # annotations applied to the pod podAnnotations: {} - # security context for the WebAPI pod + # security context for the pod podSecurityContext: {} # fsGroup: 2000 @@ -95,11 +97,13 @@ webApi: runAsNonRoot: true runAsUser: 101 + # the service used to expose the WebAPI web port service: type: ClusterIP port: 8080 ingress: + # whether to create an Ingress to expose the WebAPI enabled: false annotations: {} @@ -113,6 +117,7 @@ webApi: # hosts: # - chart-example.local + # resource requests and limits for the container resources: {} # We usually recommend not to specify default resources and to leave this as a conscious @@ -156,8 +161,10 @@ webApi: atlas: # enable the OHDSI Atlas deployment enabled: true + # number of replicas replicaCount: 1 - image: + # the Atlas image + image: # +doc-gen:break registry: ghcr.io repository: chgl/ohdsi/atlas tag: 2.8.0 @@ -168,8 +175,10 @@ atlas: # URL is constructed from `webapi.ingress` webApiUrl: "" + # annotations for the pod podAnnotations: {} + # security context for the pod podSecurityContext: {} # fsGroup: 2000 @@ -183,11 +192,13 @@ atlas: runAsNonRoot: true runAsUser: 101 - service: + # the service used to expose the Atlas web port + service: # +doc-gen:break type: ClusterIP port: 8080 ingress: + # whether to create an Ingress to expose the Atlas web interface enabled: false annotations: {} @@ -201,6 +212,7 @@ atlas: # hosts: # - chart-example.local + # resource requests and limits for the container resources: {} # We usually recommend not to specify default resources and to leave this as a conscious @@ -245,7 +257,8 @@ cdmInitJob: # see [cdm-init-job.yaml](templates/cdm-init-job.yaml) for the env vars # that are passed by default enabled: false - image: + # the Achilles image + image: # +doc-gen:break registry: docker.io repository: docker/whalesay tag: latest @@ -276,7 +289,8 @@ achilles: enabled: true # when to run the Achilles job. See schedule: "@daily" - image: + # the Achilles image + image: # +doc-gen:break registry: ghcr.io repository: chgl/ohdsi/achilles tag: master