Skip to content

Commit 0549a90

Browse files
authored
support metadata search (#348)
1 parent a4cd7f5 commit 0549a90

File tree

7 files changed

+233
-4
lines changed

7 files changed

+233
-4
lines changed

charts/lakefs/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: lakefs
33
description: A Helm chart for running LakeFS on Kubernetes
44
type: application
5-
version: 1.6.2
5+
version: 1.7.0
66
appVersion: 1.64.1
77

88
home: https://lakefs.io

charts/lakefs/templates/mds/_mds.tpl

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{{/*
2+
MDS resource full name
3+
*/}}
4+
{{- define "mds.fullname" -}}
5+
{{- $name := include "lakefs.fullname" . }}
6+
{{- printf "%s-mds" $name | trunc 63 }}
7+
{{- end }}
8+
9+
{{/*
10+
Common labels
11+
*/}}
12+
{{- define "mds.labels" -}}
13+
helm.sh/chart: {{ include "lakefs.chart" . }}
14+
{{ include "mds.selectorLabels" . }}
15+
{{- if .Chart.AppVersion }}
16+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
17+
{{- end }}
18+
app.kubernetes.io/managed-by: {{ .Release.Service }}
19+
{{- end }}
20+
21+
{{/*
22+
Selector labels
23+
*/}}
24+
{{- define "mds.selectorLabels" -}}
25+
app.kubernetes.io/name: {{ include "lakefs.name" . }}-mds
26+
app.kubernetes.io/instance: {{ .Release.Name }}
27+
app.kubernetes.io/component: mds
28+
app: {{ include "lakefs.name" . }}-mds
29+
{{- end }}
30+
31+
{{/*
32+
MDS volumes
33+
*/}}
34+
{{- define "mds.volumes" -}}
35+
- name: {{ include "mds.fullname" . }}-config
36+
configMap:
37+
name: {{ include "mds.fullname" . }}-config
38+
items:
39+
- key: config.yaml
40+
path: config.yaml
41+
{{ with .Values.mds.extraVolumes -}}
42+
{{- toYaml . }}
43+
{{- end -}}
44+
{{- end }}
45+
46+
{{/*
47+
MDS volume mounts
48+
*/}}
49+
{{- define "mds.volumeMounts" -}}
50+
- name: {{ include "mds.fullname" . }}-config
51+
mountPath: /app/config.yaml
52+
subPath: config.yaml
53+
{{ with .Values.mds.extraVolumeMounts -}}
54+
{{- toYaml . }}
55+
{{- end }}
56+
{{- end }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if .Values.mds.enabled }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "mds.fullname" . }}-config
6+
labels:
7+
{{- include "mds.labels" . | nindent 4 }}
8+
{{- with .Values.mds.config }}
9+
data:
10+
config.yaml: |
11+
{{ toYaml . | indent 4 }}
12+
{{- end }}
13+
{{- end }}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{{- if .Values.mds.enabled -}}
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: {{ include "mds.fullname" . }}
6+
labels:
7+
{{- include "mds.labels" . | nindent 4 }}
8+
spec:
9+
# Currently, MDS is not scalable, so we only run one replica
10+
replicas: 1
11+
selector:
12+
matchLabels:
13+
{{- include "mds.selectorLabels" . | nindent 6 }}
14+
template:
15+
metadata:
16+
annotations:
17+
checksum/config: {{ include (print $.Template.BasePath "/mds/configmap.yaml") . | sha256sum }}
18+
{{- with .Values.mds.podAnnotations }}
19+
{{- toYaml . | nindent 8 }}
20+
{{- end }}
21+
labels:
22+
{{- include "mds.selectorLabels" . | nindent 8 }}
23+
spec:
24+
{{- if .Values.image.privateRegistry.enabled }}
25+
imagePullSecrets:
26+
{{- if (.Values.image.privateRegistry).secretToken }}
27+
- name: "docker-registry"
28+
{{- else }}
29+
- name: {{ .Values.image.privateRegistry.secretName }}
30+
{{- end }}
31+
{{- end }}
32+
serviceAccountName: {{ include "lakefs.serviceAccountName" . }}
33+
{{- with .Values.mds.securityContext }}
34+
securityContext:
35+
{{- toYaml . | nindent 8 }}
36+
{{- end }}
37+
containers:
38+
- name: mds
39+
args:
40+
- --config
41+
- /app/config.yaml
42+
image: "{{ .Values.mds.image.repository }}:{{ .Values.mds.image.tag }}"
43+
imagePullPolicy: {{ .Values.mds.image.pullPolicy }}
44+
ports:
45+
- name: http
46+
containerPort: 8080
47+
protocol: TCP
48+
{{- with .Values.mds.readinessProbe }}
49+
readinessProbe:
50+
{{- toYaml . | nindent 12 }}
51+
{{- end }}
52+
{{- with .Values.mds.livenessProbe }}
53+
livenessProbe:
54+
{{- toYaml . | nindent 12 }}
55+
{{- end }}
56+
{{- with .Values.mds.extraEnvVars }}
57+
env:
58+
{{- toYaml . | nindent 12 }}
59+
{{- end }}
60+
resources:
61+
{{- toYaml .Values.mds.resources | nindent 12 }}
62+
volumeMounts:
63+
{{- include "mds.volumeMounts" . | nindent 12 }}
64+
volumes:
65+
{{- include "mds.volumes" . | nindent 8 }}
66+
{{- with .Values.nodeSelector }}
67+
nodeSelector:
68+
{{- toYaml . | nindent 8 }}
69+
{{- end }}
70+
{{- with .Values.affinity }}
71+
affinity:
72+
{{- toYaml . | nindent 8 }}
73+
{{- end }}
74+
{{- with .Values.tolerations }}
75+
tolerations:
76+
{{- toYaml . | nindent 8 }}
77+
{{- end }}
78+
{{- with .Values.topologySpreadConstraints }}
79+
topologySpreadConstraints:
80+
{{- toYaml . | nindent 8 }}
81+
{{- end }}
82+
{{- end }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{- if .Values.mds.enabled }}
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: {{ include "mds.fullname" . }}
6+
labels:
7+
{{- include "mds.labels" . | nindent 4 }}
8+
spec:
9+
type: ClusterIP
10+
ports:
11+
- port: 8000
12+
targetPort: http
13+
protocol: TCP
14+
name: http
15+
selector:
16+
{{- include "mds.selectorLabels" . | nindent 4 }}
17+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.serviceAccount.create }}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
labels:
6+
{{- include "lakefs.labels" . | nindent 4 }}
7+
{{- with .Values.serviceAccount.annotations }}
8+
annotations:
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
11+
name: {{ default (include "lakefs.fullname" .) .Values.serviceAccount.name }}
12+
{{- end }}

charts/lakefs/values.yaml

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ingress:
1818
enabled: false
1919
annotations: {}
2020
# kubernetes.io/ingress.class: nginx
21-
# kubernetes.io/tls-acme: "true"
21+
# kubernetes.io/tls-acme: "true"
2222
ingressClassName: ""
2323
defaultBackend: {}
2424
hosts:
@@ -34,7 +34,6 @@ ingress:
3434
# hosts:
3535
# - chart-example.local
3636

37-
3837
podAnnotations: {}
3938
jobPodAnnotations:
4039
sidecar.istio.io/inject: "false"
@@ -109,6 +108,56 @@ extraEnvVars:
109108
# timeoutSeconds: 1
110109
# initialDelaySeconds: 5
111110

111+
# https://docs.lakefs.io/latest/datamanagment/metadata-search/#configuration-reference
112+
mds:
113+
enabled: false
114+
image:
115+
pullPolicy: IfNotPresent
116+
repository: treeverse/mds
117+
tag: "0.1.0"
118+
extraEnvVars: {}
119+
resources:
120+
# limits:
121+
# cpu: 500m
122+
# memory: 256Mi
123+
# requests:
124+
# cpu: 250m
125+
# memory: 128Mi
126+
readinessProbe:
127+
httpGet:
128+
path: /health
129+
port: http
130+
# failureThreshold: 10
131+
# periodSeconds: 5
132+
# successThreshold: 4
133+
# timeoutSeconds: 1
134+
# initialDelaySeconds: 5
135+
livenessProbe:
136+
httpGet:
137+
path: /health
138+
port: http
139+
# failureThreshold: 10
140+
# periodSeconds: 5
141+
# successThreshold: 4
142+
# timeoutSeconds: 1
143+
# initialDelaySeconds: 5
144+
config:
145+
lakefs:
146+
endpoint: "https://example.lakefs.io"
147+
access_key_id: "AKIAIOSFOLEXAMPLE"
148+
secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
149+
metadata_settings:
150+
since: "1970-01-01T00:00:00+00"
151+
max_commits: 100
152+
repositories:
153+
# example-repo-1:
154+
# branches:
155+
# - main
156+
# - dev
157+
# example-repo-2:
158+
# branches:
159+
# - main
160+
# - feature-*
112161

113162
# Start local postgres pod for quick start, not for production
114163
useDevPostgres: false
@@ -132,7 +181,7 @@ secretKeys:
132181
enterprise:
133182
enabled: false
134183

135-
# Enterprise auth configuration
184+
# Enterprise auth configuration
136185
auth:
137186
rbac:
138187
enabled: true

0 commit comments

Comments
 (0)