Skip to content

Commit

Permalink
Add required dynamic helmfile values
Browse files Browse the repository at this point in the history
This PR updates helm values files with dynamic parameters required for Exoscale integration

* Updated tsdb-connect.js with dynamic postgres port from values
* Updated redis template to include dynamic storage from values
* Updated environmental values file for above changes

Signed-off-by: Abhijith H R <[email protected]>
  • Loading branch information
abhijith-hr authored and wagmarcel committed Jul 23, 2024
1 parent e258472 commit 2afc380
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
6 changes: 4 additions & 2 deletions KafkaBridge/timescaledb/utils/tsdb-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ const config = require('../../config/config.json');
var sequelize;
const postgPassword = process.env.POSTGRES_PASSWORD || config.timescaledb.password;
const postgHostname = process.env.POSTGRES_SERVICE || config.timescaledb.hostname;
const postgPort = process.env.POSTGRES_PORT || config.timescaledb.port;

if (config.timescaledb.PGSSLMODE === "require") {
sequelize = new Sequelize(config.timescaledb.dbname, config.timescaledb.username, postgPassword, {
host: postgHostname,
port: config.timescaledb.port,
port: postgPort,
dialect: 'postgres',
dialectOptions: {
ssl: {
Expand All @@ -35,7 +37,7 @@ if (config.timescaledb.PGSSLMODE === "require") {
} else {
sequelize = new Sequelize(config.timescaledb.dbname, config.timescaledb.username, postgPassword, {
host: postgHostname,
port: config.timescaledb.port,
port: postgPort,
dialect: 'postgres'
});
}
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/redis/templates/redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
storage: {{ .Values.redis.storage.size }}
4 changes: 4 additions & 0 deletions helm/environment/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,18 @@ kafkaBridge:
tokenRefreshInterval: 200
listenTopicRetention: 3600000
timescaledb:
postgresPort: 5432
replicaCount: 1
tokenRefreshInterval: 200
listenTopicRetention: 3600000

velero:
backupBucket: velero-backup
region: de

redis:
storage:
size: 2Gi
resources:
requests:
cpu: 50m
Expand Down
4 changes: 4 additions & 0 deletions helm/environment/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,18 @@ kafkaBridge:
tokenRefreshInterval: 200
listenTopicRetention: 28800000
timescaledb:
postgresPort: 5432
replicaCount: 1
tokenRefreshInterval: 200
listenTopicRetention: 28800000

velero:
backupBucket: velero-backup
region: de

redis:
storage:
size: 2Gi
resources:
requests:
cpu: 500m
Expand Down
9 changes: 6 additions & 3 deletions helm/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ kafka:
bootstrapServer: my-cluster-kafka-bootstrap:9092
storage:
type: persistent-claim
size: 5Gi
size: {{ .StateValues.kafka.storage.size }}
zookeeper:
replicas: 1
storage:
type: persistent-claim
size: 1Gi
size: {{ .StateValues.kafka.zookeeper.storage.size }}
connect:
debeziumTopicPrefix: iff.ngsild
tableIncludeList: public.entity$
Expand Down Expand Up @@ -187,6 +187,7 @@ kafkaBridge:
attributesTopic: "iff.ngsild.attributes"

timescaledb:
postgresPort: {{ .StateValues.kafkaBridge.timescaledb.postgresPort }}
replicaCount: 1
tokenRefreshInterval: 200
listenTopic: "iff.ngsild.attributes"
Expand Down Expand Up @@ -282,7 +283,7 @@ velero:
default: true
accessMode: ReadWrite
config:
region: de
region: {{ .StateValues.velero.region }}
s3Url: {{ if (hasKey $s3 "protocol") }} {{ $s3.protocol }} {{- else }} http{{- end }}://{{ if (hasKey $s3 "endpoint") }}{{ $s3.endpoint }}{{- else }}minio.{{ .StateValues.namespace }}.svc.cluster.local{{- end }}
s3ForcePathStyle: {{- if .StateValues.minio.enabled }} true {{- else }} false {{- end }}
defaultVolumesToRestic: true
Expand All @@ -307,6 +308,8 @@ velero:
# memory: 1024Mi

redis:
storage:
size: {{ .StateValues.redis.storage.size }}
resources:
requests:
cpu: {{ .StateValues.redis.resources.requests.cpu }}
Expand Down

0 comments on commit 2afc380

Please sign in to comment.