Skip to content

Commit

Permalink
Merge pull request #59 from eleanorhealth/config-from-values
Browse files Browse the repository at this point in the history
  • Loading branch information
gane5hvarma authored Jan 18, 2023
2 parents dd9a0c9 + 0ea500c commit 3367f33
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 21 deletions.
28 changes: 14 additions & 14 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: rudderstack
description: A Helm chart for Kubernetes
description: Privacy and Security focused Segment-alternative, in Golang and React

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -14,21 +14,21 @@ 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.
version: 0.4.0
version: 0.5.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.16.0
appVersion: 1.4.3

# WIP
#dependencies:
# - name: nginx-ingress
# version: ~1.6.0
# repository: https://helm.nginx.com/stable
# condition: (optional) A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled )
# tags: # (optional)
# - Tags can be used to group charts for enabling/disabling together
# enabled: (optional) Enabled bool determines if chart should be loaded
# import-values: # (optional)
# - ImportValues holds the mapping of source values to parent key to be imported. Each item can be a string or pair of child/parent sublist items.
# alias: (optional) Alias usable alias to be used for the chart. Useful when you have to add the same chart multiple times
# dependencies:
# - name: nginx-ingress
# version: ~1.6.0
# repository: https://helm.nginx.com/stable
# condition: (optional) A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled )
# tags: # (optional)
# - Tags can be used to group charts for enabling/disabling together
# enabled: (optional) Enabled bool determines if chart should be loaded
# import-values: # (optional)
# - ImportValues holds the mapping of source values to parent key to be imported. Each item can be a string or pair of child/parent sublist items.
# alias: (optional) Alias usable alias to be used for the chart. Useful when you have to add the same chart multiple times
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ The following table lists the configurable parameters of the Rudderstack chart a
| `backend.image.repository` | Container image repository for the backend | `rudderlabs/rudder-server` |
| `backend.image.version` | Container image tag for the backend. [Available versions](https://hub.docker.com/r/rudderlabs/rudder-server/tags) | `v0.1.6` |
| `backend.image.pullPolicy` | Container image pull policy for the backend image | `Always` |
| `backend.config.overrides` | object | `{}` | rudder-server config overrides See [config parameters](https://docs.rudderlabs.com/administrators-guide/config-parameters) for more details |
| `transformer.image.repository` | Container image repository for the transformer | `rudderlabs/transformer` |
| `transformer.image.version` | Container image tag for the transformer. [Available versions](https://hub.docker.com/r/rudderlabs/rudder-transformer/tags) | `v0.1.2` |
| `transformer.image.pullPolicy` | Container image pull policy for the transformer image | `Always` |
Expand All @@ -93,7 +94,8 @@ $ helm install --name my-release \
```

**Note:** Configuration specific to:
- Backend can be edited in [rudder-config.yaml](https://docs.rudderlabs.com/administrators-guide/config-parameters).

- Backend can be edited in [rudder-config.yaml](https://github.com/rudderlabs/rudderstack-helm/blob/master/rudder-config.yaml). or in values.yaml under `backend.config.overrides`.
- PostgreSQL can be edited in `pg_hba.conf`, `postgresql.conf`

## Components
Expand Down
5 changes: 4 additions & 1 deletion templates/configmap-rudder-server.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
{{- $baseConfig := .Files.Get "rudder-config.yaml" | fromYaml -}}
{{- $mergedConfig := mustMergeOverwrite $baseConfig .Values.backend.config.overrides -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -7,7 +10,7 @@ metadata:
release: {{ .Release.Name | quote }}
data:
config.yaml: |-
{{ .Files.Get "rudder-config.yaml" | indent 4}}
{{ $mergedConfig | toYaml | nindent 4 }}
google-application-credentials.json: |-
{{.Files.Get "rudder-google-application-credentials.json" | indent 4}}
{{- if .Values.backend.controlPlaneJSON}}
Expand Down
4 changes: 3 additions & 1 deletion templates/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{- $baseConfig := .Files.Get "rudder-config.yaml" | fromYaml -}}
{{- $rudderConfig := mustMergeOverwrite $baseConfig .Values.backend.config.overrides -}}
apiVersion: {{ include "statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
Expand All @@ -18,7 +20,7 @@ spec:
{{- if not .Values.rudderWorkspaceTokenExistingSecret }}
checksum/rudder-workspace-token: {{ include (print $.Template.BasePath "/secret-rudder-token.yaml") . | sha256sum }}
{{- end }}
checksum/rudder-config: {{ .Files.Get "rudder-config.yaml" | sha256sum }}
checksum/rudder-config: {{ $rudderConfig | toYaml | sha256sum }}
checksum/rudder-bigquery-credentials: {{ .Files.Get "bigquery-credentials.json" | sha256sum }}
spec:
{{- with .Values.global.imagePullSecrets }}
Expand Down
14 changes: 10 additions & 4 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Please uncomment below lines and fill values accordingly.
# Please enter api token obtained from rudder dashboard below or specify existing secret, that contains rudderWorkspaceToken key
# rudderWorkspaceToken:
rudderWorkspaceToken: replaceMe
# rudderWorkspaceTokenExistingSecret:

gcpCredentialSecret:
Expand Down Expand Up @@ -45,7 +45,7 @@ backend:
annotations:
## Refer https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer for more annotations
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
## For enabling https on aws,
## For enabling https on aws,
## uncomment below line with acm managed certificate arn and change port value below to 443
# service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012
type: LoadBalancer
Expand All @@ -69,6 +69,12 @@ backend:

config:
mountPath: "/etc/rudderstack"
# -- rudder-server config overrides
# See [config parameters](https://docs.rudderlabs.com/administrators-guide/config-parameters) for more details
overrides: {}
# enableStats: false
# Logger:
# consoleJsonFormat: true

extraEnvVars:
- name: CONFIG_BACKEND_URL
Expand All @@ -85,15 +91,15 @@ backend:
- name: RUDDER_TMPDIR
value: "/data/rudderstack"
- name: JOBS_BACKUP_STORAGE_PROVIDER
value: "S3" # object storage provider to store backups eg. S3, GCS, AZURE_BLOB, MINIO
value: "S3" # object storage provider to store backups eg. S3, GCS, AZURE_BLOB, MINIO
- name: JOBS_BACKUP_BUCKET
value: "Add your bucket name to store backups of incoming events"
- name: JOB_STATUS_BACKUP_BUCKET
value: "Add your bucket name to store backups of status of incoming events"
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/etc/rudderstack/google-application-credentials.json"
- name: LOG_LEVEL
value: "INFO" # eg. DEBUG, ERROR
value: "INFO" # eg. DEBUG, ERROR

transformer:
replicaCount: 1
Expand Down

0 comments on commit 3367f33

Please sign in to comment.