Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart modifications for v2024-10-18 release #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/ndc-connector-oracle/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ 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: 0.3.0
version: v2024.10.18

# 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: "1.16.0"
appVersion: "3.0.0"

dependencies:
- name: common
Expand Down
64 changes: 29 additions & 35 deletions charts/ndc-connector-oracle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,53 @@ See all [configuration](#parameters) below.
# EXAMPLES:

# helm template and apply manifests via kubectl (example)
helm template \
helm template <release-name> \
--set image.repository="my_repo/ndc-jvm-oracle" \
--set image.tag="my_custom_image_tag" \
--set connector.JDBC_URL="jdbc_url" \
--set connector.HASURA_SERVICE_TOKEN_SECRET="token" \
--set connectorEnvVars.JDBC_URL="jdbc_url" \
--set connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET="token" \
--set dataPlane.id="data_plane_id" \
--set dataPlane.key="data_plane_key" \
hasura-ddn/ndc-connector-oracle | kubectl apply -f-

# helm upgrade --install (pass configuration via command line)
helm upgrade --install <release-name> \
--set image.repository="my_repo/ndc-jvm-oracle" \
--set image.tag="my_custom_image_tag" \
--set connector.JDBC_URL="jdbc_url" \
--set connector.HASURA_SERVICE_TOKEN_SECRET="token" \
hasura-ddn/ndc-connector-oracle

# helm upgrade --install (with OTEL variabes)
helm upgrade --install <release-name> \
--set image.repository="my_repo/ndc-jvm-oracle" \
--set image.tag="my_custom_image_tag" \
--set connector.JDBC_URL="jdbc_url" \
--set connector.HASURA_SERVICE_TOKEN_SECRET="token" \
--set otel.deployOtelCollector="true" \
--set otel.dataPlaneID=<data-plane-id> \
--set otel.dataPlaneKey=<data-plane-key> \
--set connectorEnvVars.JDBC_URL="jdbc_url" \
--set connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET="token" \
--set dataPlane.id="data_plane_id" \
--set dataPlane.key="data_plane_key" \
hasura-ddn/ndc-connector-oracle
```

## Parameters
## Connector ENV Inputs

| Name | Description | Value |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------- |
| `connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET` | Hasura Service Token Secret (Required) | `""` |
| `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) | `""` |

## Additional Parameters

| Name | Description | Value |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------|
| `namespace` | Namespace to deploy to | `"default"` |
| `image.repository` | Image repository containing custom created ndc-connector-oracle | `""` |
| `image.tag` | Image tag to use for custom created ndc-connector-oracle | `""` |
| `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-connector-oracle pod | `[]` |
| `extraContainers` | Optionally specify extra list of additional containers for the ndc-connector-oracle pod | `[]` |
| `resources` | Resource requests and limits of ndc-connector-oracle container | `{}` |
| `env` | Env variable section for ndc-connector-oracle | `[]` |
| `replicas` | Replicas setting for pod | `1` |
| `wsInactiveExpiryMins` | To be documented | `1` |
| `securityContext` | Define privilege and access control settings for a Pod or Container | `{}` |
Expand All @@ -56,21 +67,4 @@ 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 | `` |
| `otel.deployOtelCollector` | Deploy OTEL collector as sidecar to ndc-connector-oracle container | `true` |
| `otel.endpoint` | OTEL endpoint under Hasura | `https://gateway.otlp.hasura.io:443` |
| `otel.dataPlaneID` | Oauth Client ID for pushing telemetry data to endpoint | `""` |
| `otel.dataPlaneKey` | Oauth Client Secret for pushing telemetry data to endpoint | `""` |
| `otel.oauthTokenEndpoint` | Oauth Token URL | `""` |
| `extraVolumes` | Optionally specify extra list of additional volumes for the ndc-connector-oracle pod | `[]` |
| `extraContainers` | Optionally specify extra list of additional containers for the ndc-connector-oracle pod | `[]` |
| `resources` | Resource requests and limits of ndc-connector-oracle container | `{}` |
| `env` | Env variable section for ndc-connector-oracle | `[]` |

## Connector ENV Inputs

| Name | Description | Value |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------- |
| `connector.HASURA_SERVICE_TOKEN_SECRET` | Hasura Service Token Secret (Required) | `""` |
| `connector.JDBC_URL` | The JDBC URL to connect to the database (Required) | `""` |
| `connector.JDBC_SCHEMAS` | A comma-separated list of schemas to include in the metadata (Optional) | `""` |
| `hpa.metrics.resource.target.averageUtilization` | Utilization target on specific resource type | `` |
22 changes: 22 additions & 0 deletions charts/ndc-connector-oracle/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Ndc-connector-oracle 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 }}
6 changes: 3 additions & 3 deletions charts/ndc-connector-oracle/templates/imagepullsecret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ metadata:
name: hasura-image-pull
namespace: {{ template "common.namespace" $ }}
type: kubernetes.io/dockerconfigjson
data:
data:
.dockerconfigjson: |
{{- toJson .imagePullSecret | b64enc | nindent 4 }}
{{- toJson .imagePullSecret | b64enc | nindent 4 }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
6 changes: 3 additions & 3 deletions charts/ndc-connector-oracle/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ metadata:
name: {{ printf "%s-secret" (include "common.name" .) }}
namespace: {{ template "common.namespace" $ }}
data:
HASURA_SERVICE_TOKEN_SECRET: {{ .Values.connector.HASURA_SERVICE_TOKEN_SECRET | b64enc | quote }}
MONGODB_DATABASE_URI: {{ .Values.connector.MONGODB_DATABASE_URI | b64enc | quote }}
{{- if .Values.otel.deployOtelCollector }}
HASURA_SERVICE_TOKEN_SECRET: {{ .Values.connectorEnvVars.HASURA_SERVICE_TOKEN_SECRET | b64enc | quote }}
JDBC_URL: {{ .Values.connectorEnvVars.JDBC_URL | b64enc | quote }}
{{- if .Values.observability.enabled }}
otel-collector-config.yaml: {{ (tpl .Values.otel.config .) | b64enc | quote }}
{{- end }}
58 changes: 34 additions & 24 deletions charts/ndc-connector-oracle/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
namespace: "default"
useReleaseName: true

additionalAnnotations: |
Expand Down Expand Up @@ -27,7 +28,7 @@ hpa:
enabled: false
minReplicas: 2
maxReplicas: 4
metrics:
metrics:
- type: Resource
resource:
name: cpu
Expand All @@ -39,26 +40,35 @@ hpa:
name: memory
target:
type: Utilization
averageUtilization: 80 # Target 80% memory utilization per pod
averageUtilization: 80 # Target 80% memory utilization per pod

otel:
deployOtelCollector: false
endpoint: https://gateway.otlp.hasura.io:443
dataPlaneID: ""
dataPlaneKey: ""
# Observability defaults are tuned for Hasura hosted Control Plane
# Enable observability
observability:
enabled: true

# Required (when observability.enabled is set to true)
dataPlane:
id: ""
key: ""

controlPlane:
otlpEndpoint: https://gateway.otlp.hasura.io:443
oauthTokenEndpoint: https://ddn-oauth.pro.hasura.io/oauth2/token

otel:
config: |
extensions:
oauth2client:
client_id: {{ .Values.otel.dataPlaneID }}
client_secret: {{ .Values.otel.dataPlaneKey }}
token_url: {{ .Values.otel.oauthTokenEndpoint }}
client_id: {{ required "Error: .Values.dataPlane.id is required!" .Values.dataPlane.id }}
client_secret: {{ required "Error: .Values.dataPlane.key is required!" .Values.dataPlane.key }}
token_url: {{ .Values.controlPlane.oauthTokenEndpoint }}
scopes: ["opentelemetry:write"]
endpoint_params:
audience: https://ddn.hasura.io
exporters:
otlp/oauth:
endpoint: {{ .Values.otel.endpoint }}
endpoint: {{ .Values.controlPlane.otlpEndpoint }}
auth:
authenticator: oauth2client
processors:
Expand Down Expand Up @@ -93,31 +103,31 @@ otel:
processors:
- batch
receivers:
- otlp
- otlp

extraVolumes: |
{{- if .Values.otel.deployOtelCollector }}
{{- if .Values.observability.enabled }}
- name: otel-config
secret:
secretName: {{ printf "%s-secret" (include "common.name" .) }}
secretName: {{ printf "%s-secret" (include "common.name" .) }}
items:
- key: otel-collector-config.yaml
path: otel-collector-config.yaml
{{- end }}

extraContainers: |
{{- if .Values.otel.deployOtelCollector }}
{{- if .Values.observability.enabled }}
- name: "otel-collector"
command:
- --config=/etc/otel-collector-config.yaml
command:
image: {{ template "common.image" (dict "Values" $.Values "repository" .Values.image.otelCollectorRepository "tag" .Values.image.otelCollectorTag) }}
- --config=/etc/otel-collector-config.yaml
command:
image: {{ template "common.image" (dict "Values" $.Values "repository" .Values.image.otelCollectorRepository "tag" .Values.image.otelCollectorTag) }}
env:
- name: "OTEL_ENDPOINT"
value: "{{ .Values.otel.endpoint }}"
value: "{{ .Values.controlPlane.otlpEndpoint }}"
volumeMounts:
- name: otel-config
mountPath: "/etc/otelcol-contrib/config.yaml"
mountPath: "/etc/otelcol-contrib/config.yaml"
subPath: otel-collector-config.yaml
{{- end }}

Expand All @@ -129,7 +139,7 @@ resources: |
cpu: "1"
memory: "1Gi"

connector:
connectorEnvVars:
HASURA_SERVICE_TOKEN_SECRET: ""
JDBC_URL: ""
JDBC_SCHEMAS: ""
Expand All @@ -148,11 +158,11 @@ env: |
secretKeyRef:
key: JDBC_URL
name: {{ printf "%s-secret" (include "common.name" .) }}
{{- if .Values.connector.JDBC_SCHEMAS }}
{{- if .Values.connectorEnvVars.JDBC_SCHEMAS }}
- name: JDBC_SCHEMAS
value: {{ .Values.connector.JDBC_SCHEMAS | quote }}
value: {{ .Values.connectorEnvVars.JDBC_SCHEMAS | quote }}
{{- end }}
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4317
- name: HASURA_CONFIGURATION_DIRECTORY
value: {{ .Values.connector.configDirectory }}
value: {{ .Values.connectorEnvVars.configDirectory }}
4 changes: 2 additions & 2 deletions charts/ndc-connector-phoenix/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ 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: 0.3.0
version: v2024.10.18

# 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: "1.16.0"
appVersion: "3.0.0"

dependencies:
- name: common
Expand Down
Loading
Loading