Skip to content

Commit

Permalink
Helm chart: add support for DYNAMODB2, MONGODB2, CASSANDRA2, JDBC2 (#…
Browse files Browse the repository at this point in the history
…9520)

Also: remove support for old-model version store types.
  • Loading branch information
adutra authored Sep 12, 2024
1 parent 82a3061 commit f9b8715
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ as necessary. Empty sections will not end in the release notes.

### New Features

- Helm chart: support has been added for the `DYNAMODB2`, `MONGODB2`, `CASSANDRA2`, and `JDBC2`
version store types, introduced in Nessie 0.96.0. Also, support for legacy version store types
based on the old "database adapter" code, which were removed in Nessie 0.75.0, has also been
removed from the Helm chart.

### Changes

### Deprecations
Expand Down
2 changes: 1 addition & 1 deletion helm/nessie/ci/secrets-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
versionStoreType: JDBC
versionStoreType: JDBC2

jdbc:
jdbcUrl: jdbc:h2:mem:nessie;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;DEFAULT_NULL_ORDERING=HIGH
Expand Down
15 changes: 6 additions & 9 deletions helm/nessie/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ data:
{{- $_ = set $map "quarkus.log.file.level" .Values.logLevel -}}
{{- end -}}
{{- if or (eq .Values.versionStoreType "DYNAMODB") (eq .Values.versionStoreType "DYNAMO") -}}
{{- if hasPrefix "DYNAMODB" .Values.versionStoreType -}}
{{- if .Values.dynamodb.region -}}
{{- $_ = set $map "quarkus.dynamodb.aws.region" .Values.dynamodb.region -}}
{{- end -}}
Expand All @@ -52,7 +52,7 @@ data:
{{- end -}}
{{- end -}}
{{- if eq .Values.versionStoreType "CASSANDRA" -}}
{{- if hasPrefix "CASSANDRA" .Values.versionStoreType -}}
{{- $_ = set $map "quarkus.cassandra.keyspace" .Values.cassandra.keyspace -}}
{{- $_ = set $map "quarkus.cassandra.contact-points" .Values.cassandra.contactPoints -}}
{{- if .Values.cassandra.localDatacenter -}}
Expand All @@ -65,14 +65,11 @@ data:
{{- end -}}
{{- end -}}
{{- if eq .Values.versionStoreType "ROCKSDB" -}}
{{- if hasPrefix "ROCKSDB" .Values.versionStoreType -}}
{{- $_ = set $map "nessie.version.store.persist.rocks.database-path" "/rocks-nessie" -}}
{{- end -}}
{{- if eq .Values.versionStoreType "ROCKS" -}}
{{- $_ = set $map "nessie.version.store.rocks.db-path" "/rocks-nessie" -}}
{{- end -}}
{{- if or (eq .Values.versionStoreType "MONGODB") (eq .Values.versionStoreType "MONGO") -}}
{{- if hasPrefix "MONGODB" .Values.versionStoreType -}}
{{- if .Values.mongodb.name -}}
{{- $_ = set $map "quarkus.mongodb.database" .Values.mongodb.name -}}
{{- end -}}
Expand All @@ -81,7 +78,7 @@ data:
{{- end -}}
{{- end -}}
{{- if or (eq .Values.versionStoreType "JDBC") (eq .Values.versionStoreType "TRANSACTIONAL") -}}
{{- if hasPrefix "JDBC" .Values.versionStoreType -}}
{{- $oldConfig := .Values.postgres | default dict -}}
{{- $newConfig := .Values.jdbc | default dict -}}
{{- $jdbcUrl := coalesce $oldConfig.jdbcUrl $newConfig.jdbcUrl -}}
Expand All @@ -90,7 +87,7 @@ data:
{{- $_ = set $map ( printf "quarkus.datasource.%s.jdbc.url" $dbKind ) $jdbcUrl }}
{{- end -}}
{{- if eq .Values.versionStoreType "BIGTABLE" -}}
{{- if hasPrefix "BIGTABLE" .Values.versionStoreType -}}
{{- $_ = set $map "quarkus.google.cloud.project-id" .Values.bigtable.projectId -}}
{{- $_ = set $map "nessie.version.store.persist.bigtable.instance-id" .Values.bigtable.instanceId -}}
{{- $_ = set $map "nessie.version.store.persist.bigtable.app-profile-id" .Values.bigtable.appProfileId -}}
Expand Down
18 changes: 9 additions & 9 deletions helm/nessie/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ spec:
readOnly: true
- name: temp-dir
mountPath: /tmp
{{- if or (eq .Values.versionStoreType "ROCKSDB") (eq .Values.versionStoreType "ROCKS") }}
{{- if hasPrefix "ROCKSDB" .Values.versionStoreType }}
- name: rocks-storage
mountPath: /rocks-nessie
readOnly: false
{{- end }}
{{- if and (eq .Values.versionStoreType "BIGTABLE") (.Values.bigtable.secret) }}
{{- if and (hasPrefix "BIGTABLE" .Values.versionStoreType) (.Values.bigtable.secret) }}
- name: bigtable-creds
mountPath: /bigtable-nessie
readOnly: true
Expand All @@ -79,19 +79,19 @@ spec:
{{- tpl (toYaml .Values.extraVolumeMounts) . | nindent 12 }}
{{- end }}
env:
{{- if or (eq .Values.versionStoreType "DYNAMODB") (eq .Values.versionStoreType "DYNAMO") -}}
{{- if hasPrefix "DYNAMODB" .Values.versionStoreType -}}
{{- include "nessie.secretToEnv" (list .Values.dynamodb.secret "awsAccessKeyId" "AWS_ACCESS_KEY_ID" . ) | trim | nindent 12 -}}
{{- include "nessie.secretToEnv" (list .Values.dynamodb.secret "awsSecretAccessKey" "AWS_SECRET_ACCESS_KEY" . ) | trim | nindent 12 -}}
{{- end -}}
{{- if or (eq .Values.versionStoreType "MONGODB") (eq .Values.versionStoreType "MONGO") }}
{{- if hasPrefix "MONGODB" .Values.versionStoreType }}
{{- include "nessie.secretToEnv" (list .Values.mongodb.secret "username" "quarkus.mongodb.credentials.username" . ) | trim | nindent 12 -}}
{{- include "nessie.secretToEnv" (list .Values.mongodb.secret "password" "quarkus.mongodb.credentials.password" . ) | trim | nindent 12 -}}
{{- end -}}
{{- if eq .Values.versionStoreType "CASSANDRA" }}
{{- if hasPrefix "CASSANDRA" .Values.versionStoreType }}
{{- include "nessie.secretToEnv" (list .Values.cassandra.secret "username" "quarkus.cassandra.auth.username" . ) | trim | nindent 12 -}}
{{- include "nessie.secretToEnv" (list .Values.cassandra.secret "password" "quarkus.cassandra.auth.password" . ) | trim | nindent 12 -}}
{{- end -}}
{{- if or (eq .Values.versionStoreType "JDBC") (eq .Values.versionStoreType "TRANSACTIONAL") }}
{{- if hasPrefix "JDBC" .Values.versionStoreType }}
{{- $oldConfig := .Values.postgres | default dict }}
{{- $newConfig := .Values.jdbc | default dict }}
{{- $jdbcUrl := coalesce $oldConfig.jdbcUrl $newConfig.jdbcUrl }}
Expand All @@ -100,7 +100,7 @@ spec:
{{- include "nessie.secretToEnv" (list $secret "username" (printf "quarkus.datasource.%s.username" $dbKind) . ) | trim | nindent 12 }}
{{- include "nessie.secretToEnv" (list $secret "password" (printf "quarkus.datasource.%s.password" $dbKind) . ) | trim | nindent 12 }}
{{- end -}}
{{- if eq .Values.versionStoreType "BIGTABLE" }}
{{- if hasPrefix "BIGTABLE" .Values.versionStoreType }}
{{- if .Values.bigtable.secret }}
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /bigtable-nessie/sa_credentials.json
Expand Down Expand Up @@ -152,12 +152,12 @@ spec:
name: {{ include "nessie.fullname" . }}
- name: temp-dir
emptyDir: {}
{{- if or (eq .Values.versionStoreType "ROCKSDB") (eq .Values.versionStoreType "ROCKS") }}
{{- if hasPrefix "ROCKSDB" .Values.versionStoreType }}
- name: rocks-storage
persistentVolumeClaim:
claimName: {{ include "nessie.fullname" . }}
{{- end }}
{{- if and (eq .Values.versionStoreType "BIGTABLE") (.Values.bigtable.secret) }}
{{- if and (hasPrefix "BIGTABLE" .Values.versionStoreType) (.Values.bigtable.secret) }}
- name: bigtable-creds
secret:
secretName: {{ .Values.bigtable.secret.name }}
Expand Down

0 comments on commit f9b8715

Please sign in to comment.