Skip to content

Commit

Permalink
feat: persist use new image
Browse files Browse the repository at this point in the history
feat: persist use new image
  • Loading branch information
bodinsamuel authored Jun 12, 2024
2 parents e43d875 + 6d4c2a4 commit ba82e5d
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 21 deletions.
21 changes: 11 additions & 10 deletions ENV_VARIABLES.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand All @@ -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
```
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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
Expand Down Expand Up @@ -83,33 +90,40 @@ 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.
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
```

Expand Down Expand Up @@ -144,18 +158,18 @@ 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 |
| | DB_USER | postgres |
| | 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 |
Expand Down
2 changes: 1 addition & 1 deletion charts/nango/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/nango/templates/persist/persist-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions charts/nango/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ persist:
name: persist
url: http://nango-persist
replicas: 1
tag: e6fd036d8bf2f5b7f9a8cd574746821e72b3801e # 2024/06/07

shared:
namespace: default
Expand Down
6 changes: 6 additions & 0 deletions example-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba82e5d

Please sign in to comment.