Skip to content

Commit 1b53d78

Browse files
committed
chore(nessie): add nessie init
1 parent 930d705 commit 1b53d78

19 files changed

Lines changed: 2906 additions & 0 deletions
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v2
2+
description: A Helm chart for Nessie
3+
home: https://projectnessie.org/
4+
icon: https://raw.githubusercontent.com/projectnessie/nessie/main/site/docs/img/nessie.svg
5+
keywords:
6+
- nessie
7+
- iceberg
8+
- delta
9+
- data lake
10+
- transactional catalog
11+
- git-like semantics
12+
maintainers:
13+
- name: nastra
14+
- name: snazy
15+
- name: dimas-b
16+
- name: adutra
17+
name: nessie
18+
sources:
19+
- https://github.com/projectnessie/nessie
20+
type: application
21+
version: 0.103.0

addons/nessie/0.103/chart/nessie/README.md

Lines changed: 351 additions & 0 deletions
Large diffs are not rendered by default.

addons/nessie/0.103/chart/nessie/simple-values.yaml

Whitespace-only changes.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{/**
2+
3+
Copyright (C) 2024 Dremio
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
17+
**/}}
18+
19+
To connect to Nessie, please execute the following commands:
20+
{{- if .Values.ingress.enabled }}
21+
{{- range $host := .Values.ingress.hosts }}
22+
{{- range .paths }}
23+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
24+
{{- end }}
25+
{{- end }}
26+
{{- else if contains "NodePort" .Values.service.type }}
27+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "nessie.fullname" . }})
28+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
29+
echo http://$NODE_IP:$NODE_PORT
30+
{{- else if contains "LoadBalancer" .Values.service.type }}
31+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
32+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "nessie.fullname" . }}'
33+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nessie.fullname" . }} -o jsonpath="{ .status.loadBalancer.ingress[0].ip }")
34+
echo http://$SERVICE_IP:{{ get (first .Values.service.ports) "number" }}
35+
{{- else if contains "ClusterIP" .Values.service.type }}
36+
nohup kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "nessie.fullname" . }} 19120:{{ get (first .Values.service.ports) "number" }} &
37+
echo "Visit http://127.0.0.1:19120 to use your application"
38+
{{- end }}

addons/nessie/0.103/chart/nessie/templates/_helpers.tpl

Lines changed: 519 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
{{/**
2+
3+
Copyright (C) 2024 Dremio
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
17+
**/}}
18+
19+
apiVersion: v1
20+
kind: ConfigMap
21+
metadata:
22+
name: {{ include "nessie.fullname" . }}
23+
namespace: {{ .Release.Namespace }}
24+
labels:
25+
{{- include "nessie.labels" . | nindent 4 }}
26+
{{- if .Values.configMapLabels }}
27+
{{- toYaml .Values.configMapLabels | nindent 4 }}
28+
{{- end }}
29+
data:
30+
application.properties: |-
31+
{{- $map := dict -}}
32+
{{- $_ := set $map "nessie.version.store.type" .Values.versionStoreType -}}
33+
34+
{{- $serviceNamesMgmt := include "nessie.fullname" . | printf "%s-mgmt" -}}
35+
{{- $cacheInvalToken := .Values.managementService | toYaml | sha1sum -}}
36+
{{- $_ = set $map "nessie.version.store.persist.cache-invalidations.service-names" $serviceNamesMgmt -}}
37+
{{- $_ = set $map "nessie.version.store.persist.cache-invalidations.valid-tokens" $cacheInvalToken -}}
38+
39+
{{- $_ = set $map "quarkus.http.port" (get (first .Values.service.ports) "number") -}}
40+
{{- $_ = set $map "quarkus.management.port" .Values.managementService.portNumber -}}
41+
42+
{{- $_ = set $map "quarkus.log.level" (coalesce .Values.logLevel .Values.log.level) -}}
43+
{{- if .Values.log.console.enabled -}}
44+
{{- $_ = set $map "quarkus.log.console.enable" "true" -}}
45+
{{- $_ = set $map "quarkus.log.console.level" .Values.log.console.threshold -}}
46+
{{- if .Values.log.console.json -}}
47+
{{- $_ = set $map "quarkus.log.console.json" "true" -}}
48+
{{- else -}}
49+
{{- $_ = set $map "quarkus.log.console.format" .Values.log.console.format -}}
50+
{{- end -}}
51+
{{- else -}}
52+
{{- $_ = set $map "quarkus.log.console.enable" "false" -}}
53+
{{- end -}}
54+
{{- if .Values.log.file.enabled -}}
55+
{{- $_ = set $map "quarkus.log.file.enable" "true" -}}
56+
{{- $_ = set $map "quarkus.log.file.level" .Values.log.file.threshold -}}
57+
{{- $_ = set $map "quarkus.log.file.path" (printf "%s/%s" .Values.log.file.logsDir .Values.log.file.fileName) -}}
58+
{{- $_ = set $map "quarkus.log.file.rotation.max-file-size" (include "nessie.quantity" .Values.log.file.rotation.maxFileSize) -}}
59+
{{- $_ = set $map "quarkus.log.file.rotation.max-backup-index" .Values.log.file.rotation.maxBackupIndex -}}
60+
{{- if .Values.log.file.rotation.fileSuffix -}}
61+
{{- $_ = set $map "quarkus.log.file.rotation.file-suffix" .Values.log.file.rotation.fileSuffix -}}
62+
{{- end -}}
63+
{{- if .Values.log.file.json -}}
64+
{{- $_ = set $map "quarkus.log.file.json" "true" -}}
65+
{{- else -}}
66+
{{- $_ = set $map "quarkus.log.file.format" .Values.log.file.format -}}
67+
{{- end -}}
68+
{{- else -}}
69+
{{- $_ = set $map "quarkus.log.file.enable" "false" -}}
70+
{{- end -}}
71+
{{- if .Values.log.sentry.enabled -}}
72+
{{- $_ = set $map "quarkus.log.sentry" "true" -}}
73+
{{- if not .Values.log.sentry.dsn -}}{{- required "log.sentry.dsn is required when log.sentry.enabled is true" .Values.log.sentry.dsn -}}{{- end -}}
74+
{{- $_ = set $map "quarkus.log.sentry.dsn" .Values.log.sentry.dsn -}}
75+
{{- $_ = set $map "quarkus.log.sentry.level" .Values.log.sentry.level -}}
76+
{{- if .Values.log.sentry.environment -}}
77+
{{- $_ = set $map "quarkus.log.sentry.environment" .Values.log.sentry.environment -}}
78+
{{- end -}}
79+
{{- if .Values.log.sentry.release -}}
80+
{{- $_ = set $map "quarkus.log.sentry.release" .Values.log.sentry.release -}}
81+
{{- end -}}
82+
{{- $_ = set $map "quarkus.log.sentry.in-app-packages" ( join "," .Values.log.sentry.inAppPackages ) -}}
83+
{{- else -}}
84+
{{- $_ = set $map "quarkus.log.sentry" "false" -}}
85+
{{- end -}}
86+
{{- $categories := dict -}}
87+
{{- list .Values.log.categories "" $categories | include "nessie.mergeAdvancedConfig" -}}
88+
{{- range $k, $v := $categories -}}
89+
{{- $_ = set $map (printf "quarkus.log.category.\"%s\".level" $k) $v -}}
90+
{{- end -}}
91+
92+
{{- if hasPrefix "DYNAMODB" .Values.versionStoreType -}}
93+
{{- if .Values.dynamodb.region -}}
94+
{{- $_ = set $map "quarkus.dynamodb.aws.region" .Values.dynamodb.region -}}
95+
{{- end -}}
96+
{{- if .Values.dynamodb.profile -}}
97+
{{- $_ = set $map "quarkus.dynamodb.aws.credentials.profile-provider.profile-name" .Values.dynamodb.profile -}}
98+
{{- end -}}
99+
{{- end -}}
100+
101+
{{- if hasPrefix "CASSANDRA" .Values.versionStoreType -}}
102+
{{- $_ = set $map "quarkus.cassandra.keyspace" .Values.cassandra.keyspace -}}
103+
{{- $_ = set $map "quarkus.cassandra.contact-points" .Values.cassandra.contactPoints -}}
104+
{{- if .Values.cassandra.localDatacenter -}}
105+
{{- $_ = set $map "quarkus.cassandra.local-datacenter" .Values.cassandra.localDatacenter -}}
106+
{{- end -}}
107+
{{- /* legacy support for username/password */}}
108+
{{- if and .Values.cassandra.auth .Values.cassandra.auth.username -}}
109+
{{- $_ = set $map "quarkus.cassandra.auth.username" .Values.cassandra.auth.username -}}
110+
{{- $_ = set $map "quarkus.cassandra.auth.password" .Values.cassandra.auth.password -}}
111+
{{- end -}}
112+
{{- end -}}
113+
114+
{{- if hasPrefix "ROCKSDB" .Values.versionStoreType -}}
115+
{{- $_ = set $map "nessie.version.store.persist.rocks.database-path" "/rocks-nessie" -}}
116+
{{- end -}}
117+
118+
{{- if hasPrefix "MONGODB" .Values.versionStoreType -}}
119+
{{- if .Values.mongodb.name -}}
120+
{{- $_ = set $map "quarkus.mongodb.database" .Values.mongodb.name -}}
121+
{{- end -}}
122+
{{- if .Values.mongodb.connectionString -}}
123+
{{- $_ = set $map "quarkus.mongodb.connection-string" .Values.mongodb.connectionString -}}
124+
{{- end -}}
125+
{{- end -}}
126+
127+
{{- if hasPrefix "JDBC" .Values.versionStoreType -}}
128+
{{- $oldConfig := .Values.postgres | default dict -}}
129+
{{- $newConfig := .Values.jdbc | default dict -}}
130+
{{- $jdbcUrl := coalesce $oldConfig.jdbcUrl $newConfig.jdbcUrl -}}
131+
{{- $dbKind := include "nessie.dbKind" $jdbcUrl -}}
132+
{{- $_ = set $map "nessie.version.store.persist.jdbc.datasource" $dbKind -}}
133+
{{- $_ = set $map ( printf "quarkus.datasource.%s.jdbc.url" $dbKind ) $jdbcUrl }}
134+
{{- end -}}
135+
136+
{{- if hasPrefix "BIGTABLE" .Values.versionStoreType -}}
137+
{{- $_ = set $map "quarkus.google.cloud.project-id" .Values.bigtable.projectId -}}
138+
{{- $_ = set $map "nessie.version.store.persist.bigtable.instance-id" .Values.bigtable.instanceId -}}
139+
{{- $_ = set $map "nessie.version.store.persist.bigtable.app-profile-id" .Values.bigtable.appProfileId -}}
140+
{{- end -}}
141+
142+
{{- if .Values.authentication.enabled -}}
143+
{{- $_ = set $map "nessie.server.authentication.enabled" .Values.authentication.enabled -}}
144+
{{- $_ = set $map "quarkus.oidc.ui-app.application-type" "web-app" -}}
145+
{{- $_ = set $map "quarkus.oidc.ui-app.tenant-paths" "/,/tree*,/content*,/notfound*,/commits*" -}}
146+
{{- if .Values.authentication.oidcAuthServerUrl -}}
147+
{{- $_ = set $map "quarkus.oidc.auth-server-url" .Values.authentication.oidcAuthServerUrl -}}
148+
{{- $_ = set $map "quarkus.oidc.ui-app.auth-server-url" .Values.authentication.oidcAuthServerUrl -}}
149+
{{- end -}}
150+
{{- if .Values.authentication.oidcClientId -}}
151+
{{- $_ = set $map "quarkus.oidc.client-id" .Values.authentication.oidcClientId -}}
152+
{{- $_ = set $map "quarkus.oidc.ui-app.client-id" .Values.authentication.oidcClientId -}}
153+
{{- end -}}
154+
{{- else -}}
155+
{{- $_ = set $map "quarkus.oidc.tenant-enabled" false -}}
156+
{{- end -}}
157+
158+
{{- if .Values.authorization.enabled -}}
159+
{{- $_ = set $map "nessie.server.authorization.enabled" .Values.authorization.enabled -}}
160+
{{- if .Values.authorization.rules -}}
161+
{{- range $ruleId, $rule := .Values.authorization.rules -}}
162+
{{- $_ = set $map (printf "nessie.server.authorization.rules.%s" $ruleId ) $rule -}}
163+
{{- end -}}
164+
{{- end -}}
165+
{{- end -}}
166+
167+
{{- if .Values.tracing.enabled -}}
168+
{{- $_ = set $map "quarkus.otel.exporter.otlp.endpoint" .Values.tracing.endpoint -}}
169+
{{- if .Values.tracing.attributes -}}
170+
{{- $_ = set $map "quarkus.otel.resource.attributes" (include "nessie.dictToString" .Values.tracing.attributes) -}}
171+
{{- end -}}
172+
{{- if .Values.tracing.sample -}}
173+
{{ if eq .Values.tracing.sample "all" -}}
174+
{{- $_ = set $map "quarkus.otel.traces.sampler" "parentbased_always_on" -}}
175+
{{- else if eq .Values.tracing.sample "none" -}}
176+
{{- $_ = set $map "quarkus.otel.traces.sampler" "always_off" -}}
177+
{{- else -}}
178+
{{- $_ = set $map "quarkus.otel.traces.sampler" "parentbased_traceidratio" -}}
179+
{{- $_ = set $map "quarkus.otel.traces.sampler.arg" .Values.tracing.sample -}}
180+
{{- end -}}
181+
{{- end -}}
182+
{{- else -}}
183+
{{- $_ = set $map "quarkus.otel.sdk.disabled" true -}}
184+
{{- end -}}
185+
186+
{{- if .Values.metrics.enabled -}}
187+
{{- range $name, $value := .Values.metrics.tags -}}
188+
{{- $_ = set $map (print "nessie.metrics.tags." $name) $value -}}
189+
{{- end -}}
190+
{{- else -}}
191+
{{- $_ = set $map "quarkus.micrometer.enabled" "false" -}}
192+
{{- end -}}
193+
194+
{{- if .Values.catalog.enabled -}}
195+
{{- list .Values.catalog.iceberg $map | include "nessie.applyCatalogIcebergOptions" -}}
196+
{{- if .Values.catalog.storage.retryAfter -}}
197+
{{- $_ = set $map "nessie.catalog.error-handling.throttled-retry-after" .Values.catalog.storage.retryAfter -}}
198+
{{- end -}}
199+
{{- list .Values.catalog.storage.s3 "nessie.catalog.service.s3." $map | include "nessie.applyCatalogStorageS3RootOptions" }}
200+
{{- list .Values.catalog.storage.s3.defaultOptions "nessie.catalog.service.s3.default-options." $map | include "nessie.applyCatalogStorageS3BucketOptions" }}
201+
{{- range $i, $bucket := .Values.catalog.storage.s3.buckets -}}
202+
{{- if not $bucket.name -}}{{- required ( printf "catalog.storage.s3.buckets[%d]: missing bucket name" $i ) $bucket.name -}}{{- end -}}
203+
{{- list $bucket ( printf "nessie.catalog.service.s3.buckets.bucket%d." (add $i 1) ) $map | include "nessie.applyCatalogStorageS3BucketOptions" }}
204+
{{- end -}}
205+
{{- list .Values.catalog.storage.gcs "nessie.catalog.service.gcs." $map | include "nessie.applyCatalogStorageGcsRootOptions" }}
206+
{{- list .Values.catalog.storage.gcs.defaultOptions "nessie.catalog.service.gcs.default-options." $map | include "nessie.applyCatalogStorageGcsBucketOptions" }}
207+
{{- range $i, $bucket := .Values.catalog.storage.gcs.buckets -}}
208+
{{- if not $bucket.name -}}{{- required ( printf "catalog.storage.gcs.buckets[%d]: missing bucket name" $i ) $bucket.name -}}{{- end -}}
209+
{{ list $bucket ( printf "nessie.catalog.service.gcs.buckets.bucket%d." (add $i 1) ) $map | include "nessie.applyCatalogStorageGcsBucketOptions" }}
210+
{{- end -}}
211+
{{- list .Values.catalog.storage.adls "nessie.catalog.service.adls." $map | include "nessie.applyCatalogStorageAdlsRootOptions" }}
212+
{{- list .Values.catalog.storage.adls.defaultOptions "nessie.catalog.service.adls.default-options." $map | include "nessie.applyCatalogStorageAdlsFileSystemOptions" }}
213+
{{- range $i, $filesystem := .Values.catalog.storage.adls.filesystems -}}
214+
{{- if not $filesystem.name -}}{{- required ( printf "catalog.storage.adls.filesystems[%d]: missing filesystem name" $i ) $filesystem.name -}}{{- end -}}
215+
{{- list $filesystem ( printf "nessie.catalog.service.adls.file-systems.filesystem%d." (add $i 1) ) $map | include "nessie.applyCatalogStorageAdlsFileSystemOptions" }}
216+
{{- end -}}
217+
{{- else -}}
218+
{{- $_ = set $map "nessie.catalog.object-stores.health-check.enabled" false -}}
219+
{{- end -}}
220+
221+
{{- list .Values.advancedConfig "" $map | include "nessie.mergeAdvancedConfig" }}
222+
{{- $global := . -}}
223+
{{- range $k, $v := $map }}
224+
{{ include "nessie.appendConfigOption" (list $k $v $global) }}
225+
{{- end }}

0 commit comments

Comments
 (0)