Skip to content
Merged

v9.4.0 #2551

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/fhirpath-lab-api-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This workflow builds and publishes the FHIRPath Lab API Docker image to GHCR.

name: Release FHIRPath Lab API

on:
workflow_dispatch:
push:
branches: [main]
paths:
- "fhirpath-lab-api/**"
- "deployment/fhirpath-lab-api/**"

permissions:
contents: read
packages: write

jobs:
release:
name: Build and push Docker image
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: ./.github/actions/setup-build-tools
with:
java: "false"
python: "true"

- name: Run tests
working-directory: fhirpath-lab-api
run: |
uv sync --extra dev
uv run pytest -v

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: fhirpath-lab-api
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/aehrc/fhirpath-lab-api:latest
cache-from: type=gha
cache-to: type=gha,mode=max
20 changes: 20 additions & 0 deletions deployment/fhirpath-lab-api/chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright © 2026, Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230. Licensed under the Apache License, Version 2.0.
#
# Author: John Grimes

apiVersion: v2
name: fhirpath-lab-api
description: A FHIRPath Lab server backed by the Pathling FHIRPath engine
icon: https://raw.githubusercontent.com/aehrc/pathling/main/media/logo-icon-colour-detail.svg
type: application
version: 1.0.0
maintainers:
- name: John Grimes
email: John.Grimes@csiro.au
sources:
- https://github.com/aehrc/pathling
keywords:
- fhir
- fhirpath
- pathling
64 changes: 64 additions & 0 deletions deployment/fhirpath-lab-api/chart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# FHIRPath Lab API Helm chart

A Helm chart for deploying the FHIRPath Lab API server on Kubernetes.

## Prerequisites

- Kubernetes 1.26+
- Helm 3.x

## Installation

```bash
helm install fhirpath-lab-api ./deployment/fhirpath-lab-api/chart/
```

With custom values:

```bash
helm install fhirpath-lab-api ./deployment/fhirpath-lab-api/chart/ \
-f my-values.yaml
```

## Configuration

| Parameter | Description | Default |
| -------------------------------- | --------------------------------------- | --------------------------------------- |
| `fhirpathLabApi.image` | Container image | `ghcr.io/aehrc/fhirpath-lab-api:latest` |
| `fhirpathLabApi.imagePullPolicy` | Image pull policy | `Always` |
| `fhirpathLabApi.replicas` | Number of replicas | `1` |
| `fhirpathLabApi.service.type` | Kubernetes service type | `ClusterIP` |
| `fhirpathLabApi.service.port` | Service port | `8080` |
| `fhirpathLabApi.resources` | CPU/memory resource requests and limits | `{}` |
| `fhirpathLabApi.config` | Environment variables for the container | `{}` |
| `fhirpathLabApi.tolerations` | Pod tolerations | `[]` |
| `fhirpathLabApi.affinity` | Pod affinity rules | `{}` |
| `fhirpathLabApi.nodeSelector` | Pod node selector | `{}` |

## Examples

### Basic deployment with resource limits

```yaml
fhirpathLabApi:
resources:
requests:
memory: "4Gi"
cpu: "1"
limits:
memory: "4Gi"
```

### Additional CORS origins

```yaml
fhirpathLabApi:
config:
CORS_ALLOWED_ORIGINS: "https://my-app.example.com,https://staging.example.com"
```

## Uninstalling

```bash
helm uninstall fhirpath-lab-api
```
60 changes: 60 additions & 0 deletions deployment/fhirpath-lab-api/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright © 2026, Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230. Licensed under the Apache License, Version 2.0.
#
# Author: John Grimes

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-deployment
labels:
app: {{ .Release.Name }}
spec:
replicas: {{ .Values.fhirpathLabApi.replicas }}
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
containers:
- name: fhirpath-lab-api
image: {{ .Values.fhirpathLabApi.image | quote }}
imagePullPolicy: {{ .Values.fhirpathLabApi.imagePullPolicy | quote }}
ports:
- name: http
containerPort: 8080
protocol: TCP
{{- if gt (len .Values.fhirpathLabApi.config) 0 }}
env:
{{- range $key, $value := .Values.fhirpathLabApi.config }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
startupProbe:
httpGet:
path: /healthcheck
port: http
periodSeconds: 5
failureThreshold: 36
livenessProbe:
httpGet:
path: /healthcheck
port: http
periodSeconds: 30
failureThreshold: 3
readinessProbe:
httpGet:
path: /healthcheck
port: http
periodSeconds: 10
failureThreshold: 3
{{- if .Values.fhirpathLabApi.resources }}
resources: {{ toYaml .Values.fhirpathLabApi.resources | nindent 12 }}
{{- end }}
tolerations: {{ toJson .Values.fhirpathLabApi.tolerations }}
affinity: {{ toJson .Values.fhirpathLabApi.affinity }}
nodeSelector: {{ toJson .Values.fhirpathLabApi.nodeSelector }}
20 changes: 20 additions & 0 deletions deployment/fhirpath-lab-api/chart/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright © 2026, Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230. Licensed under the Apache License, Version 2.0.
#
# Author: John Grimes

apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-service
labels:
app: {{ .Release.Name }}
spec:
type: {{ .Values.fhirpathLabApi.service.type | quote }}
ports:
- port: {{ .Values.fhirpathLabApi.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ .Release.Name }}
103 changes: 103 additions & 0 deletions deployment/fhirpath-lab-api/chart/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "FHIRPath Lab API Helm Chart Values",
"description": "Configuration values for deploying the FHIRPath Lab API server on Kubernetes",
"type": "object",
"properties": {
"fhirpathLabApi": {
"type": "object",
"description": "FHIRPath Lab API server configuration",
"properties": {
"image": {
"type": "string",
"description": "Docker image for the FHIRPath Lab API server",
"default": "ghcr.io/aehrc/fhirpath-lab-api:latest"
},
"imagePullPolicy": {
"type": "string",
"description": "Image pull policy for the container",
"enum": ["Always", "IfNotPresent", "Never"],
"default": "Always"
},
"replicas": {
"type": "integer",
"description": "Number of replicas to deploy",
"minimum": 1,
"default": 1
},
"service": {
"type": "object",
"description": "Kubernetes service configuration",
"properties": {
"type": {
"type": "string",
"description": "Service type",
"enum": ["ClusterIP", "NodePort", "LoadBalancer"],
"default": "ClusterIP"
},
"port": {
"type": "integer",
"description": "Service port",
"default": 8080
}
}
},
"resources": {
"type": "object",
"description": "Resource requests and limits for the server pod",
"properties": {
"requests": {
"type": "object",
"properties": {
"cpu": {
"type": ["string", "integer"],
"description": "CPU request"
},
"memory": {
"type": "string",
"description": "Memory request"
}
}
},
"limits": {
"type": "object",
"properties": {
"memory": {
"type": "string",
"description": "Memory limit"
}
}
}
},
"default": {}
},
"config": {
"type": "object",
"description": "Environment variables passed to the server container",
"additionalProperties": {
"type": ["string", "integer", "boolean", "null"]
},
"default": {}
},
"tolerations": {
"type": "array",
"description": "Tolerations for pod scheduling",
"items": {
"type": "object"
},
"default": []
},
"affinity": {
"type": "object",
"description": "Affinity rules for pod scheduling",
"default": {}
},
"nodeSelector": {
"type": "object",
"description": "Node selector for pod scheduling",
"default": {}
}
}
}
}
}
27 changes: 27 additions & 0 deletions deployment/fhirpath-lab-api/chart/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright © 2026, Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230. Licensed under the Apache License, Version 2.0.
#
# Author: John Grimes

fhirpathLabApi:
image: "ghcr.io/aehrc/fhirpath-lab-api:latest"
imagePullPolicy: "Always"
replicas: 1

service:
type: "ClusterIP"
port: 8080

resources:
{}
# requests:
# memory: "4Gi"
# cpu: "1"
# limits:
# memory: "4Gi"

config: {}

tolerations: []
affinity: {}
nodeSelector: {}
2 changes: 1 addition & 1 deletion encoders/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<parent>
<groupId>au.csiro.pathling</groupId>
<artifactId>pathling</artifactId>
<version>9.3.1</version>
<version>9.4.0-SNAPSHOT</version>
</parent>
<artifactId>encoders</artifactId>
<packaging>jar</packaging>
Expand Down
Loading
Loading