|
| 1 | +# Reference App Orders Go Helm Chart |
| 2 | + |
| 3 | +A Helm chart for deploying the reference-app-orders-go application, which demonstrates a distributed order management system built with Temporal. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Kubernetes 1.19+ |
| 8 | +- Helm 3.0+ |
| 9 | +- A running Temporal Service |
| 10 | + |
| 11 | +## Installation |
| 12 | + |
| 13 | +### Install from OCI Registry |
| 14 | + |
| 15 | +```bash |
| 16 | +helm install -n oms --create-namespace oms oci://ghcr.io/temporalio/charts/reference-app-orders-go |
| 17 | +``` |
| 18 | + |
| 19 | +### Install from Local Chart |
| 20 | + |
| 21 | +```bash |
| 22 | +helm install -n oms --create-namespace oms ./charts/reference-app-orders-go |
| 23 | +``` |
| 24 | + |
| 25 | +## Configuration |
| 26 | + |
| 27 | +The following table lists the configurable parameters and their default values: |
| 28 | + |
| 29 | +| Parameter | Description | Default | |
| 30 | +|-----------|-------------|---------| |
| 31 | +| `nameOverride` | Override the name of the chart | `""` | |
| 32 | +| `fullnameOverride` | Override the full name of the chart | `""` | |
| 33 | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | |
| 34 | +| `mongodb.enabled` | Enable MongoDB deployment | `true` | |
| 35 | +| `mongodb.image.repository` | MongoDB image repository | `mongo` | |
| 36 | +| `mongodb.image.tag` | MongoDB image tag | `6` | |
| 37 | +| `mongodb.resources.limits.cpu` | MongoDB CPU limit | `500m` | |
| 38 | +| `mongodb.resources.limits.memory` | MongoDB memory limit | `512Mi` | |
| 39 | +| `mongodb.resources.requests.cpu` | MongoDB CPU request | `250m` | |
| 40 | +| `mongodb.resources.requests.memory` | MongoDB memory request | `256Mi` | |
| 41 | +| `mongodb.persistence.enabled` | Enable MongoDB persistent storage | `true` | |
| 42 | +| `mongodb.persistence.size` | MongoDB storage size | `100Mi` | |
| 43 | +| `mongodb.persistence.storageClass` | MongoDB storage class | `""` | |
| 44 | +| `main.worker.replicaCount` | Number of main worker replicas | `1` | |
| 45 | +| `main.worker.image.repository` | Main worker image repository | `ghcr.io/temporalio/reference-app-orders-go` | |
| 46 | +| `main.worker.image.tag` | Main worker image tag | `Chart.appVersion` | |
| 47 | +| `main.api.replicaCount` | Number of main API replicas | `1` | |
| 48 | +| `main.api.image.repository` | Main API image repository | `ghcr.io/temporalio/reference-app-orders-go` | |
| 49 | +| `main.api.image.tag` | Main API image tag | `Chart.appVersion` | |
| 50 | +| `billing.worker.replicaCount` | Number of billing worker replicas | `1` | |
| 51 | +| `billing.worker.image.repository` | Billing worker image repository | `ghcr.io/temporalio/reference-app-orders-go` | |
| 52 | +| `billing.worker.image.tag` | Billing worker image tag | `Chart.appVersion` | |
| 53 | +| `billing.api.replicaCount` | Number of billing API replicas | `1` | |
| 54 | +| `billing.api.image.repository` | Billing API image repository | `ghcr.io/temporalio/reference-app-orders-go` | |
| 55 | +| `billing.api.image.tag` | Billing API image tag | `Chart.appVersion` | |
| 56 | +| `web.replicaCount` | Number of web application replicas | `1` | |
| 57 | +| `web.image.repository` | Web application image repository | `ghcr.io/temporalio/reference-app-orders-web` | |
| 58 | +| `web.image.tag` | Web application image tag | `latest` | |
| 59 | +| `temporal.address` | Temporal frontend address | `temporal-frontend:7233` | |
| 60 | +| `temporal.namespace` | Temporal namespace | `default` | |
| 61 | +| `services.billing.port` | Billing API port | `8081` | |
| 62 | +| `services.order.port` | Order API port | `8082` | |
| 63 | +| `services.shipment.port` | Shipment API port | `8083` | |
| 64 | +| `services.fraud.port` | Fraud API port | `8084` | |
| 65 | +| `metrics.enabled` | Enable metrics collection | `true` | |
| 66 | +| `metrics.port` | Metrics port | `9090` | |
| 67 | +| `serviceMonitor.enabled` | Enable ServiceMonitor for Prometheus | `false` | |
| 68 | +| `serviceMonitor.interval` | Scrape interval | `30s` | |
| 69 | +| `encryptionKeyID` | Optional encryption key ID for payload encryption | `""` | |
| 70 | + |
| 71 | +## Services |
| 72 | + |
| 73 | +This chart deploys the following services: |
| 74 | + |
| 75 | +### Database |
| 76 | +- **MongoDB**: Provides a shared cache for the main API service |
| 77 | + |
| 78 | +### Workers |
| 79 | +- **Main Worker**: Handles order and shipment workflows |
| 80 | +- **Billing Worker**: Handles billing workflows |
| 81 | + |
| 82 | +### APIs |
| 83 | +- **Main API**: Exposes order, shipment, and fraud APIs |
| 84 | +- **Billing API**: Exposes billing API |
| 85 | + |
| 86 | +### Web Application |
| 87 | +- **Web**: Frontend web application that provides a user interface for the order management system |
| 88 | + |
| 89 | +## Example Values |
| 90 | + |
| 91 | +```yaml |
| 92 | +# Scale API services horizontally |
| 93 | +main: |
| 94 | + api: |
| 95 | + replicaCount: 3 |
| 96 | + |
| 97 | +# Enable web application |
| 98 | +web: |
| 99 | + replicaCount: 2 |
| 100 | + image: |
| 101 | + tag: "v2.0.0" |
| 102 | + |
| 103 | +# Custom MongoDB configuration |
| 104 | +mongodb: |
| 105 | + resources: |
| 106 | + limits: |
| 107 | + cpu: "1000m" |
| 108 | + memory: "1Gi" |
| 109 | + persistence: |
| 110 | + size: 1Gi |
| 111 | + storageClass: "fast-ssd" |
| 112 | + |
| 113 | +# Custom image |
| 114 | +main: |
| 115 | + worker: |
| 116 | + image: |
| 117 | + repository: my-registry/orders-app |
| 118 | + tag: v1.0.0 |
| 119 | + |
| 120 | +# Enable monitoring |
| 121 | +serviceMonitor: |
| 122 | + enabled: true |
| 123 | + interval: 15s |
| 124 | + |
| 125 | +# Connect to external Temporal Service |
| 126 | +temporal: |
| 127 | + address: hostname.example.com:7233 |
| 128 | + namespace: orders |
| 129 | + |
| 130 | +# Enable payload encryption |
| 131 | +encryptionKeyID: "my-encryption-key" |
| 132 | +``` |
| 133 | +
|
| 134 | +## Database |
| 135 | +
|
| 136 | +The chart includes a MongoDB deployment that serves as a cache for the main API. |
| 137 | +
|
| 138 | +## Monitoring |
| 139 | +
|
| 140 | +When `serviceMonitor.enabled` is set to `true`, the chart creates ServiceMonitor resources for Prometheus to scrape metrics from the application endpoints. ServiceMonitors are deployed in the same namespace as the application services. |
| 141 | + |
| 142 | +## Accessing the Web Application |
| 143 | + |
| 144 | +You can forward port 80 for the oms-web service to access the OMS web application from outside the Kubernetes cluster. For example, running the following command enables you to access the web application through http://localhost:8100/. |
| 145 | + |
| 146 | +```bash |
| 147 | +kubectl -n oms port-forward service/oms-web 8100:80 |
| 148 | +``` |
| 149 | + |
| 150 | +## Uninstallation |
| 151 | + |
| 152 | +```bash |
| 153 | +helm uninstall -n oms oms |
| 154 | +``` |
| 155 | + |
| 156 | +**Note**: This will also remove the MongoDB StatefulSet and its associated PersistentVolumeClaim. Make sure to backup any important data before uninstalling. |
0 commit comments