Deploys a Mendix Portable Runtime application to Kubernetes or OpenShift.
- Helm 3.x
- Kubernetes 1.21+ or OpenShift 4.x
# Install
helm install myapp . -f examples/dev-simple.yaml -n <namespace>
# Upgrade after changes
helm upgrade myapp . -f examples/dev-simple.yaml -n <namespace>
# Check what will be deployed (dry-run)
helm template myapp . -f examples/dev-simple.yaml
# Uninstall
helm uninstall myapp -n <namespace>mendix-portable-runtime/
├── Chart.yaml # Chart metadata
├── values.yaml # Default values (all options documented)
├── templates/ # Kubernetes resource templates
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ ├── route.yaml # OpenShift Route
│ ├── configmap.yaml
│ ├── secret.yaml
│ ├── serviceaccount.yaml
│ ├── namespace.yaml
│ ├── storage.yaml # PVC
│ └── _helpers.tpl
└── examples/
├── dev-simple.yaml # Development values example
└── custom-config.conf # Example HOCON config file
All configuration is in values.yaml with inline documentation. Key sections:
| Section | Description |
|---|---|
image |
Container image repository and tag |
runtime |
Base config and optional custom config file mounting |
env |
Plain-text environment variables |
secrets / secretKeyRefs |
Secret creation or external secret references |
configMaps / configMapVolumes |
ConfigMap creation or external ConfigMap mounting |
ingress |
Kubernetes Ingress (nginx, ALB, etc.) |
route |
OpenShift Route with TLS |
storage |
PVC, S3, or Azure Blob storage |
resources |
CPU/memory requests and limits |
livenessProbe / readinessProbe |
Health checks |
The chart deploys the Mendix Portable Runtime container which starts with:
./bin/start <baseConfig> [customConfigFile...]
baseConfig— base configuration baked into the container image (default:etc/Default)customConfigFile— optional overrides mounted from a ConfigMap
Configuration is layered: base config < custom config file < environment variables.
You can optionally layer additional configuration on top of the base config by mounting a ConfigMap as a file. Define this in values:
runtime:
baseConfig: "etc/Default"
customConfigFiles:
- name: custom
configMapName: my-config # external ConfigMap name
key: custom-config.conf # key in the ConfigMap
filename: custom-config.conf # filename to mount as
mountPath: /opt/app/etcThe file uses HOCON format:
runtime {
params {
"DTAPMode" = "D"
"SessionTimeout" = 2 minutes
}
}Database credentials and other secrets can be provided in multiple ways:
- Selective key references from an external secret:
secretKeyRefs:
- envName: RUNTIME_PARAMS_DATABASEJDBCURL
secretName: my-db-secret
key: DATABASE_URL- Import all keys from a secret as env vars:
secretEnvFrom:
- name: my-db-secret- Chart-created secrets (for development):
secrets:
- name: db-credentials
stringData:
DATABASE_URL: "jdbc:postgresql://host:5432/db"# Get pods
kubectl get pods -n <namespace>
# View logs
kubectl logs -l app=myapp-mendix-portable-runtime -n <namespace>
# Restart after ConfigMap content change
kubectl rollout restart deployment myapp-mendix-portable-runtime -n <namespace>
# Get route URL (OpenShift)
kubectl get route -n <namespace>
# Get ingress URL (Kubernetes)
kubectl get ingress -n <namespace>