diff --git a/ENV_VARIABLES.md b/ENV_VARIABLES.md index 4894167..e2ec696 100644 --- a/ENV_VARIABLES.md +++ b/ENV_VARIABLES.md @@ -1,6 +1,8 @@ # Environment Variables -* Mandatory -``` + +## Mandatory + +```sh NANGO_DB_HOST (server, jobs, persist) NANGO_DB_NAME (server, jobs, persist) NANGO_DB_USER (server, jobs, persist) @@ -17,10 +19,12 @@ MAILGUN_API_KEY # provided by Nango (server, jobs) PERSIST_SERVICE_URL (runner, jobs) JOBS_SERVICE_URL (jobs) RUNNER_SERVICE_URL (jobs) +NANGO_ENCRYPTION_KEY ``` -# Optional -``` +## Optional + +```sh NANGO_DATABASE_URL SERVER_PORT AWS_ACCESS_KEY_ID @@ -35,14 +39,11 @@ DD_SITE DD_TRACE_AGENT_URL ``` -## Recommended -``` -NANGO_ENCRYPTION_KEY -``` +## Required Files -# Required Files * Two files required by Temporal are expected to be mounted at `/etc/secrets/${TEMPORAL_NAMESPACE}`: -``` + +```sh /etc/secrets/${TEMPORAL_NAMESPACE}.crt /etc/secrets/${TEMPORAL_NAMESPACE}.key ``` diff --git a/README.md b/README.md index 7dcc890..0122cff 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,12 @@ Nango requires specific components and configurations to operate correctly within a Kubernetes cluster. Key dependencies include: -- **[Temporal](https://temporal.io/)**: Nango relies on Temporal for syncs and actions. +- **[Temporal](https://temporal.io/)**: Nango relies on Temporal for syncs and actions. The environment variables `TEMPORAL_ADDRESS` and `TEMPORAL_NAMESPACE` must be set which -you can receive from a Nango developer. Additionally, `TEMPORAL_NAMESPACE.key` +you can receive from a Nango developer. Additionally, `TEMPORAL_NAMESPACE.key` and `TEMPORAL_NAMESPACE.crt` files need to be configured as Kubernetes secrets. - **Required Values**: Obtain the following values from a Nango developer: + ``` TEMPORAL_ADDRESS TEMPORAL_NAMESPACE @@ -22,11 +23,13 @@ Nango expects the following secrets: ## `nango-secrets` This secret should contain: + - `postgres-password`: Required if `postgresql.enabled` is set to `false` (i.e., using an external database). - `encryption-key`: Required if `shared.encryptionEnabled` is set to `true`. - `mailgun-api-key`. Example command to create `nango-secrets`: + ```bash kubectl create secret generic nango-secrets \ --from-literal=postgres-password=secure-pw \ @@ -38,6 +41,7 @@ kubectl create secret generic nango-secrets \ Contains two files received from a Nango developer: `TEMPORAL_KEY` and `TEMPORAL_CERT`. The secret's name depends on `TEMPORAL_NAMESPACE`. Then create the secret: + ```bash kubectl create secret generic nango-temporal-secrets \ --from-file=name-of-your-temporal-namespace.key \ @@ -46,11 +50,14 @@ kubectl create secret generic nango-temporal-secrets \ Alternatively use a YAML file for all secret creation (ensure all values are base64 encoded). To encode the temporal key and cert: + ```bash TEMPORAL_KEY_BASE64=$(cat path/to/temporal.key | base64 | tr -d '\n') TEMPORAL_CRT_BASE64=$(cat path/to/temporal.crt | base64 | tr -d '\n') ``` + Then to create the secrets: + ```yaml apiVersion: v1 kind: Secret @@ -83,7 +90,7 @@ Reach out for assistance if you encounter issues with the volume attachment. # Exposing the Server -The server component, crucial for OAuth handshake, needs to be publicly accessible. +The server component, crucial for OAuth handshake, needs to be publicly accessible. By default, on AWS, a LoadBalancer exposes the server. Set useLoadBalancer to false to use an alternate exposure method. @@ -91,25 +98,32 @@ Note for Porter Users: There's a known issue where the server might not be correctly exposed due to an internal-only load balancer. Please contact us for support. # Usage + 1. Install helm: Follow the [official Helm documentation](https://helm.sh/docs) 2. Add the Nango Repository + ```bash helm repo add nangohq https://nangohq.github.io/nango-helm-charts ``` + 3. Update the Repository (if previously added): + ```bash helm repo update nangohq helm search repo nangohq ``` + 4. Configure values.yaml: Refer to the configuration section below. 5. Install Nango charts + ```bash helm install nango nangohq/nango ``` -* To uninstall the chart -``` +- To uninstall the chart + +```sh helm delete nango ``` @@ -144,9 +158,9 @@ helm delete nango | | tag | enterprise | | | replicas | 1 | | persist | name | persist | -| | tag | enterprise | +| | tag | | | | replicas | 1 | -| | url | http://nango-persist | +| | url | `http://nango-persist` | | shared | namespace | default | | | ENV | production | | | DB_HOST | nango-postgresql | @@ -154,8 +168,8 @@ helm delete nango | | DB_PORT | "5432" | | | DB_NAME | nango | | | DB_SSL | false | -| | APP_URL | https://your-hosted-instance.com | -| | CALLBACK_URL | https://your-hosted-instance.com/oauth/callback | +| | APP_URL | `https://your-hosted-instance.com` | +| | CALLBACK_URL | `https://your-hosted-instance.com/oauth/callback` | | | flows_path | /flows | | | useVolumeForFlows | true | | temporalio | volumeName | temporal-secrets | diff --git a/charts/nango/Chart.yaml b/charts/nango/Chart.yaml index cc2231b..f8d6507 100644 --- a/charts/nango/Chart.yaml +++ b/charts/nango/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: nango type: application -version: 0.0.22 +version: 0.0.23 appVersion: 0.0.2 dependencies: - condition: postgresql.enabled diff --git a/charts/nango/templates/persist/persist-deployment.yaml b/charts/nango/templates/persist/persist-deployment.yaml index c9771e1..cc77f8f 100644 --- a/charts/nango/templates/persist/persist-deployment.yaml +++ b/charts/nango/templates/persist/persist-deployment.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: {{ .Values.persist.name | default "nango-persist" }} - image: nangohq/nango-persist:{{ .Values.persist.tag | default "enterprise" }} + image: nangohq/nango:prod-{{ .Values.persist.tag }} imagePullPolicy: {{ .Values.imagePullPolicy | default "Always" }} env: - name: NANGO_DB_HOST diff --git a/charts/nango/values.yaml b/charts/nango/values.yaml index 6819b49..398eb65 100644 --- a/charts/nango/values.yaml +++ b/charts/nango/values.yaml @@ -45,6 +45,7 @@ persist: name: persist url: http://nango-persist replicas: 1 + tag: e6fd036d8bf2f5b7f9a8cd574746821e72b3801e # 2024/06/07 shared: namespace: default diff --git a/example-values.yaml b/example-values.yaml index 3aa0d50..c818c9f 100644 --- a/example-values.yaml +++ b/example-values.yaml @@ -35,6 +35,12 @@ runner: name: nango-runner replicas: 1 +persist: + name: persist + url: http://nango-persist + replicas: 1 + tag: e6fd036d8bf2f5b7f9a8cd574746821e72b3801e # 2024/06/07 + shared: namespace: default encryptionEnabled: false