-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from hasura/tskawinski/git-sync
Add option to enable git-sync under ndc-mongodb, ndc-postgres & ndc-connector-oracle
- Loading branch information
Showing
9 changed files
with
96 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,13 +26,33 @@ helm upgrade --install <release-name> \ | |
hasura-ddn/ndc-connector-oracle | ||
``` | ||
|
||
## Enabling git-sync | ||
|
||
Follow the pre-requisite [here](../../README.md#using-git-for-metadata-files) which has to be done once and deployed on the cluster. | ||
|
||
Replace `org`, `repo` placeholders in the below command to suit your git repository. Additionally, ensure that `connectorEnvVars.configDirectory` is set to the given path below, providing that you are also replacing `repo` and `connector-name` placeholders within it. For clarity, `connector-name` is the name that was give to your connector (ie. Check `app/connector` under your Supergraph). | ||
|
||
```bash | ||
helm upgrade --install <release-name> \ | ||
--set namespace="default" \ | ||
--set image.repository="my_repo/ndc-jvm-oracle" \ | ||
--set image.tag="my_custom_image_tag" \ | ||
--set connectorEnvVars.JDBC_URL="jdbc_url" \ | ||
--set initContainers.gitSync.enabled="true" \ | ||
--set initContainers.gitSync.repo="[email protected]:<org>/<repo>" \ | ||
--set initContainers.gitSync.branch="main" \ | ||
--set connectorEnvVars.configDirectory="/work-dir/<repo>/app/connector/<connector-name>" \ | ||
hasura-ddn/ndc-connector-oracle | ||
``` | ||
|
||
## Connector ENV Inputs | ||
|
||
| Name | Description | Value | | ||
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------- | | ||
| `connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET` | Hasura Service Token Secret (Optional) | `""` | | ||
| `connectorEnvVars.JDBC_URL` | The JDBC URL to connect to the database (Required) | `""` | | ||
| `connectorEnvVars.JDBC_SCHEMAS` | A comma-separated list of schemas to include in the metadata (Optional) | `""` | | ||
| `connectorEnvVars.configDirectory` | Connector config directory (See [Enabling git-sync](README.md#enabling-git-sync) when initContainers.gitSync.enabled is set to true) | `"/etc/connector"` | | ||
|
||
## Additional Parameters | ||
|
||
|
@@ -63,4 +83,7 @@ helm upgrade --install <release-name> \ | |
| `hpa.minReplicas` | minReplicas setting for HPA | `2` | | ||
| `hpa.maxReplicas` | maxReplicas setting for HPA | `4` | | ||
| `hpa.metrics.resource.name` | Resource name to autoscale on | `` | | ||
| `hpa.metrics.resource.target.averageUtilization` | Utilization target on specific resource type | `` | | ||
| `hpa.metrics.resource.target.averageUtilization` | Utilization target on specific resource type | `` | | ||
| `initContainers.gitSync.enabled` | Enable reading connector config files from a git repository | `false` | | ||
| `initContainers.gitSync.repo` | Git repository to read from (Used when initContainers.gitSync.enabled is set to true) | `[email protected]:<org>/<repo>` | | ||
| `initContainers.gitSync.branch` | Branch to read from (Used when initContainers.gitSync.enabled is set to true) | `main` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,12 @@ securityContext: | |
runAsUser: 100 | ||
fsGroup: 1000 | ||
|
||
initContainers: | ||
gitSync: | ||
enabled: false | ||
repo: "[email protected]:<org>/<repo>" | ||
branch: "main" | ||
|
||
healthChecks: | ||
enabled: false | ||
livenessProbePath: "/healthz" | ||
|
@@ -143,8 +149,6 @@ connectorEnvVars: | |
JDBC_URL: "" | ||
JDBC_SCHEMAS: "" | ||
configDirectory: /etc/connector | ||
# Configure as below when using git-sync w here ddn-example is the repo name | ||
# configDirectory: /work-dir/ddn-example/app/connector/mongodb | ||
|
||
env: | | ||
{{- if .Values.connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,12 +26,32 @@ helm upgrade --install <release-name> \ | |
hasura-ddn/ndc-mongodb | ||
``` | ||
|
||
## Enabling git-sync | ||
|
||
Follow the pre-requisite [here](../../README.md#using-git-for-metadata-files) which has to be done once and deployed on the cluster. | ||
|
||
Replace `org`, `repo` placeholders in the below command to suit your git repository. Additionally, ensure that `connectorEnvVars.configDirectory` is set to the given path below, providing that you are also replacing `repo` and `connector-name` placeholders within it. For clarity, `connector-name` is the name that was give to your connector (ie. Check `app/connector` under your Supergraph). | ||
|
||
```bash | ||
helm upgrade --install <release-name> \ | ||
--set namespace="default" \ | ||
--set image.repository="my_repo/ndc-mongodb" \ | ||
--set image.tag="my_custom_image_tag" \ | ||
--set connectorEnvVars.MONGODB_DATABASE_URI="db_connection_string" \ | ||
--set initContainers.gitSync.enabled="true" \ | ||
--set initContainers.gitSync.repo="[email protected]:<org>/<repo>" \ | ||
--set initContainers.gitSync.branch="main" \ | ||
--set connectorEnvVars.configDirectory="/work-dir/<repo>/app/connector/<connector-name>" \ | ||
hasura-ddn/ndc-mongodb | ||
``` | ||
|
||
## Connector ENV Inputs | ||
|
||
| Name | Description | Value | | ||
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------- | | ||
| `connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET` | Hasura Service Token Secret (Optional) | `""` | | ||
| `connectorEnvVars.MONGODB_DATABASE_URI` | Database Connection URI (Required) | `""` | | ||
| `connectorEnvVars.configDirectory` | Connector config directory (See [Enabling git-sync](README.md#enabling-git-sync) when initContainers.gitSync.enabled is set to true) | `"/etc/connector"` | | ||
|
||
## Additional Parameters | ||
|
||
|
@@ -62,4 +82,7 @@ helm upgrade --install <release-name> \ | |
| `hpa.minReplicas` | minReplicas setting for HPA | `2` | | ||
| `hpa.maxReplicas` | maxReplicas setting for HPA | `4` | | ||
| `hpa.metrics.resource.name` | Resource name to autoscale on | `` | | ||
| `hpa.metrics.resource.target.averageUtilization` | Utilization target on specific resource type | `` | | ||
| `hpa.metrics.resource.target.averageUtilization` | Utilization target on specific resource type | `` | | ||
| `initContainers.gitSync.enabled` | Enable reading connector config files from a git repository | `false` | | ||
| `initContainers.gitSync.repo` | Git repository to read from (Used when initContainers.gitSync.enabled is set to true) | `[email protected]:<org>/<repo>` | | ||
| `initContainers.gitSync.branch` | Branch to read from (Used when initContainers.gitSync.enabled is set to true) | `main` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,12 @@ securityContext: | |
runAsUser: 100 | ||
fsGroup: 1000 | ||
|
||
initContainers: | ||
gitSync: | ||
enabled: false | ||
repo: "[email protected]:<org>/<repo>" | ||
branch: "main" | ||
|
||
healthChecks: | ||
enabled: false | ||
livenessProbePath: "/healthz" | ||
|
@@ -142,8 +148,6 @@ connectorEnvVars: | |
HASURA_SERVICE_TOKEN_SECRET: "" | ||
MONGODB_DATABASE_URI: "" | ||
configDirectory: /etc/connector | ||
# Configure as below when using git-sync w here ddn-example is the repo name | ||
# configDirectory: /work-dir/ddn-example/app/connector/mongodb | ||
|
||
env: | | ||
{{- if .Values.connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,25 @@ helm upgrade --install <release-name> \ | |
hasura-ddn/ndc-postgres | ||
``` | ||
|
||
## Enabling git-sync | ||
|
||
Follow the pre-requisite [here](../../README.md#using-git-for-metadata-files) which has to be done once and deployed on the cluster. | ||
|
||
Replace `org`, `repo` placeholders in the below command to suit your git repository. Additionally, ensure that `connectorEnvVars.configDirectory` is set to the given path below, providing that you are also replacing `repo` and `connector-name` placeholders within it. For clarity, `connector-name` is the name that was give to your connector (ie. Check `app/connector` under your Supergraph). | ||
|
||
```bash | ||
helm upgrade --install <release-name> \ | ||
--set namespace="default" \ | ||
--set image.repository="my_repo/ndc-postgres" \ | ||
--set image.tag="my_custom_image_tag" \ | ||
--set connectorEnvVars.CONNECTION_URI="db_connection_string" \ | ||
--set initContainers.gitSync.enabled="true" \ | ||
--set initContainers.gitSync.repo="[email protected]:<org>/<repo>" \ | ||
--set initContainers.gitSync.branch="main" \ | ||
--set connectorEnvVars.configDirectory="/work-dir/<repo>/app/connector/<connector-name>" \ | ||
hasura-ddn/ndc-postgres | ||
``` | ||
|
||
## Connector ENV Inputs | ||
|
||
| Name | Description | Value | | ||
|
@@ -35,6 +54,7 @@ helm upgrade --install <release-name> \ | |
| `connectorEnvVars.CLIENT_CERT` | Database Client cert (Optional) | `""` | | ||
| `connectorEnvVars.CLIENT_KEY` | Database Client key (Optional) | `""` | | ||
| `connectorEnvVars.ROOT_CERT` | Database Root cert (Optional) | `""` | | ||
| `connectorEnvVars.configDirectory` | Connector config directory (See [Enabling git-sync](README.md#enabling-git-sync) when initContainers.gitSync.enabled is set to true) | `"/etc/connector"` | | ||
|
||
## Additional Parameters | ||
|
||
|
@@ -65,4 +85,7 @@ helm upgrade --install <release-name> \ | |
| `hpa.minReplicas` | minReplicas setting for HPA | `2` | | ||
| `hpa.maxReplicas` | maxReplicas setting for HPA | `4` | | ||
| `hpa.metrics.resource.name` | Resource name to autoscale on | `` | | ||
| `hpa.metrics.resource.target.averageUtilization` | Utilization target on specific resource type | `` | | ||
| `hpa.metrics.resource.target.averageUtilization` | Utilization target on specific resource type | `` | | ||
| `initContainers.gitSync.enabled` | Enable reading connector config files from a git repository | `false` | | ||
| `initContainers.gitSync.repo` | Git repository to read from (Used when initContainers.gitSync.enabled is set to true) | `[email protected]:<org>/<repo>` | | ||
| `initContainers.gitSync.branch` | Branch to read from (Used when initContainers.gitSync.enabled is set to true) | `main` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,12 @@ securityContext: | |
runAsUser: 100 | ||
fsGroup: 1000 | ||
|
||
initContainers: | ||
gitSync: | ||
enabled: false | ||
repo: "[email protected]:<org>/<repo>" | ||
branch: "main" | ||
|
||
healthChecks: | ||
enabled: false | ||
livenessProbePath: "/healthz" | ||
|
@@ -144,6 +150,7 @@ connectorEnvVars: | |
CLIENT_CERT: "" | ||
CLIENT_KEY: "" | ||
ROOT_CERT: "" | ||
configDirectory: /etc/connector | ||
|
||
env: | | ||
{{- if .Values.connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET }} | ||
|
@@ -181,3 +188,5 @@ env: | | |
{{- end }} | ||
- name: OTEL_EXPORTER_OTLP_ENDPOINT | ||
value: http://localhost:4317 | ||
- name: HASURA_CONFIGURATION_DIRECTORY | ||
value: {{ .Values.connectorEnvVars.configDirectory }} |