-
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 #3 from hasura/ndc-elasticsearch-and-connector-envs
Add ndc-elasticsearch connector. Require connector ENVs
- Loading branch information
Showing
23 changed files
with
408 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
ndc-connector-oracle | ||
ndc-connector-phoenix | ||
ndc-graphql | ||
ndc-mongodb | ||
ndc-nodejs-lambda | ||
ndc-connector-oracle | ||
ndc-connector-phoenix | ||
ndc-elasticsearch | ||
ndc-graphql | ||
ndc-mongodb | ||
ndc-nodejs-lambda | ||
ndc-postgres |
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
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apiVersion: v2 | ||
name: ndc-elasticsearch | ||
description: (DDN) A Helm chart for deploying ndc-elasticsearch | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: v2024.10.28 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "3.0.0" | ||
|
||
dependencies: | ||
- name: common | ||
version: 0.0.6 | ||
repository: oci://us-west1-docker.pkg.dev/hasura-ee/helm-charts |
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Ndc-elasticsearch Helm Chart | ||
|
||
This chart deploys the ndc-elasticsearch connector. Refer to the pre-requisites section [here](../../README.md#get-started) | ||
|
||
## Install Chart | ||
|
||
See all [configuration](#parameters) below. | ||
|
||
```bash | ||
# EXAMPLES: | ||
|
||
# helm template and apply manifests via kubectl (example) | ||
helm template <release-name> \ | ||
--set image.repository="my_repo/ndc-elasticsearch" \ | ||
--set image.tag="my_custom_image_tag" \ | ||
--set connectorEnvVars.ELASTICSEARCH_URL="elasticsearch_url" \ | ||
--set connectorEnvVars.ELASTICSEARCH_USERNAME="elasticsearch_username" \ | ||
--set connectorEnvVars.ELASTICSEARCH_PASSWORD="elasticsearch_password" \ | ||
--set connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET="token" \ | ||
--set dataPlane.id="data_plane_id" \ | ||
--set dataPlane.key="data_plane_key" \ | ||
hasura-ddn/ndc-elasticsearch | kubectl apply -f- | ||
|
||
# helm upgrade --install (pass configuration via command line) | ||
helm upgrade --install <release-name> \ | ||
--set image.repository="my_repo/ndc-elasticsearch" \ | ||
--set image.tag="my_custom_image_tag" \ | ||
--set connectorEnvVars.ELASTICSEARCH_URL="elasticsearch_url" \ | ||
--set connectorEnvVars.ELASTICSEARCH_USERNAME="elasticsearch_username" \ | ||
--set connectorEnvVars.ELASTICSEARCH_PASSWORD="elasticsearch_password" \ | ||
--set connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET="token" \ | ||
--set dataPlane.id="data_plane_id" \ | ||
--set dataPlane.key="data_plane_key" \ | ||
hasura-ddn/ndc-elasticsearch | ||
``` | ||
|
||
## Connector ENV Inputs | ||
|
||
| Name | Description | Value | | ||
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------- | | ||
| `connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET` | Hasura Service Token Secret (Required) | `""` | | ||
| `connectorEnvVars.ELASTICSEARCH_URL` | The comma-separated list of Elasticsearch host addresses for connection (Required) | `""` | | ||
| `connectorEnvVars.ELASTICSEARCH_USERNAME` | The username for authenticating to the Elasticsearch cluster (Required) | `""` | | ||
| `connectorEnvVars.ELASTICSEARCH_PASSWORD` | The password for the Elasticsearch user account (Required) | `""` | | ||
| `connectorEnvVars.ELASTICSEARCH_API_KEY` | The Elasticsearch API key for authenticating to the Elasticsearch cluster (Optional) | `""` | | ||
| `connectorEnvVars.ELASTICSEARCH_CA_CERT_PATH` | The path to the Certificate Authority (CA) certificate for verifying the Elasticsearch server's SSL certificate (Optional) | `""` | | ||
| `connectorEnvVars.ELASTICSEARCH_INDEX_PATTERN` | The pattern for matching Elasticsearch indices, potentially including wildcards, used by the connector (Optional) | `""` | | ||
| `connectorEnvVars.ELASTICSEARCH_DEFAULT_RESULT_SIZE` | The default query size when no limit is applied. Defaults to 10,000 (Optional) | `""` | | ||
|
||
|
||
## Additional Parameters | ||
|
||
| Name | Description | Value | | ||
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------- | | ||
| `namespace` | Namespace to deploy to | `"default"` | | ||
| `image.repository` | Image repository containing custom created ndc-elasticsearch | `""` | | ||
| `image.tag` | Image tag to use for custom created ndc-elasticsearch | `""` | | ||
| `image.pullPolicy` | Image pull policy | `Always` | | ||
| `image.otelCollectorRepository` | OTEL collector image repository | `otel/opentelemetry-collector` | | ||
| `image.otelCollectorTag` | OTEL collector image tag | `0.104.0` | | ||
| `observability.enabled` | Deploy OTEL collector as sidecar | `true` | | ||
| `dataPlane.id` | Data Plane ID (Required when observability.enabled is set to true) | `""` | | ||
| `dataPlane.key` | Data Plane Key (Required when observability.enabled is set to true) | `""` | | ||
| `controlPlane.otlpEndpoint` | OTEL endpoint under Hasura | `"https://gateway.otlp.hasura.io:443"` | | ||
| `controlPlane.oauthTokenEndpoint` | Oauth Token URL | `"https://ddn-oauth.pro.hasura.io/oauth2/token"` | | ||
| `extraVolumes` | Optionally specify extra list of additional volumes for the ndc-elasticsearch pod | `[]` | | ||
| `extraContainers` | Optionally specify extra list of additional containers for the ndc-elasticsearch pod | `[]` | | | ||
| `resources` | Resource requests and limits of ndc-elasticsearch container | `{}` | | ||
| `env` | Env variable section for ndc-elasticsearch | `[]` | | ||
| `replicas` | Replicas setting for pod | `1` | | ||
| `wsInactiveExpiryMins` | To be documented | `1` | | ||
| `securityContext` | Define privilege and access control settings for a Pod or Container | `{}` | | ||
| `healthChecks.enabled` | Enable health check for ndc-elasticsearch container | `false` | | ||
| `healthChecks.livenessProbePath` | Health check liveness Probe path ndc-elasticsearch container | `"/healthz"` | | ||
| `healthChecks.readinessProbePath` | Health check readiness Probe path ndc-elasticsearch container | `"/healthz"` | | ||
| `hpa.enabled` | Enable HPA for ndc-elasticsearch. Ensure metrics cluster is configured when enabling | `false` | | ||
| `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 | `` | |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Ndc-elasticsearch Helm Chart Deployment | ||
|
||
1. Deployment Information: | ||
- Release Name: {{ .Release.Name }} | ||
- Namespace: {{ template "common.namespace" . }} | ||
- Chart Name: {{ .Chart.Name }} | ||
- Chart Version: {{ .Chart.Version }} | ||
|
||
2. Service Information: | ||
- Service Name: {{ template "common.name" . }} | ||
- Service Port: {{ .Values.httpPort }} | ||
|
||
3. Useful Commands: | ||
- Check the Deployment Status: | ||
helm status {{ .Release.Name }} | ||
|
||
- Get Detailed Information about the Deployment: | ||
helm get all {{ .Release.Name }} | ||
|
||
4. Clean Up: | ||
- To uninstall/delete the deployment, run: | ||
helm uninstall {{ .Release.Name }} |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# deployment.yaml | ||
{{- template "common.deployment" . -}} |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# hpa.yaml | ||
{{- template "common.hpa" . -}} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- if ((.Values.global).dataPlane).deployImagePullSecret -}} | ||
{{- with .Values.secrets }} | ||
{{- if .imagePullSecret -}} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: hasura-image-pull | ||
namespace: {{ template "common.namespace" $ }} | ||
type: kubernetes.io/dockerconfigjson | ||
data: | ||
.dockerconfigjson: | | ||
{{- toJson .imagePullSecret | b64enc | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ printf "%s-secret" (include "common.name" .) }} | ||
namespace: {{ template "common.namespace" $ }} | ||
data: | ||
HASURA_SERVICE_TOKEN_SECRET: {{ required "Error: .Values.connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET is required!" .Values.connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET | b64enc | quote }} | ||
ELASTICSEARCH_URL: {{ required "Error: .Values.connectorEnvVars.ELASTICSEARCH_URL is required!" .Values.connectorEnvVars.ELASTICSEARCH_URL | b64enc | quote }} | ||
ELASTICSEARCH_USERNAME: {{ required "Error: .Values.connectorEnvVars.ELASTICSEARCH_USERNAME is required!" .Values.connectorEnvVars.ELASTICSEARCH_USERNAME | b64enc | quote }} | ||
ELASTICSEARCH_PASSWORD: {{ required "Error: .Values.connectorEnvVars.ELASTICSEARCH_PASSWORD is required!" .Values.connectorEnvVars.ELASTICSEARCH_PASSWORD | b64enc | quote }} | ||
{{- if .Values.connectorEnvVars.ELASTICSEARCH_API_KEY }} | ||
ELASTICSEARCH_API_KEY: {{ .Values.connectorEnvVars.ELASTICSEARCH_API_KEY | b64enc | quote }} | ||
{{- end }} | ||
{{- if .Values.connectorEnvVars.ELASTICSEARCH_CA_CERT_PATH }} | ||
ELASTICSEARCH_CA_CERT_PATH: {{ .Values.connectorEnvVars.ELASTICSEARCH_CA_CERT_PATH | b64enc | quote }} | ||
{{- end }} | ||
{{- if .Values.connectorEnvVars.ELASTICSEARCH_INDEX_PATTERN }} | ||
ELASTICSEARCH_INDEX_PATTERN: {{ .Values.connectorEnvVars.ELASTICSEARCH_INDEX_PATTERN | b64enc | quote }} | ||
{{- end }} | ||
{{- if .Values.connectorEnvVars.ELASTICSEARCH_DEFAULT_RESULT_SIZE }} | ||
ELASTICSEARCH_DEFAULT_RESULT_SIZE: {{ .Values.connectorEnvVars.ELASTICSEARCH_DEFAULT_RESULT_SIZE | b64enc | quote }} | ||
{{- end }} | ||
{{- if .Values.observability.enabled }} | ||
otel-collector-config.yaml: {{ (tpl .Values.otel.config .) | b64enc | quote }} | ||
{{- end }} |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# service.yaml | ||
{{- template "common.service" . -}} |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# serviceaccount.yaml | ||
{{- template "common.serviceaccount" . -}} |
Oops, something went wrong.