Skip to content

Commit 3569c8a

Browse files
committed
feat: add databend-operator helm chart
1 parent 0747745 commit 3569c8a

12 files changed

+985
-0
lines changed

charts/.helmignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj

charts/Chart.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
name: databend-operator
3+
description: Helm chart for databend-operator components
4+
version: 0.1.0
5+
keywords:
6+
- kubernetes
7+
- databend
8+
- databend-operator
9+
- statefulset
10+
- deployment
11+
home: https://www.databend.com/
12+
sources:
13+
- https://github.com/databendcloud/databend-operator

charts/README.md

Whitespace-only changes.

charts/templates/databendlabs.io_tenants.yaml

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

charts/templates/databendlabs.io_warehouses.yaml

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

charts/templates/manager.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
labels:
5+
app.kubernetes.io/component: manager
6+
name: {{ .Values.installation.namespace }}
7+
---
8+
apiVersion: apps/v1
9+
kind: Deployment
10+
metadata:
11+
name: databend-operator
12+
namespace: {{ .Values.installation.namespace }}
13+
labels:
14+
app.kubernetes.io/component: manager
15+
app.kubernetes.io/name: databend-operator
16+
spec:
17+
selector:
18+
matchLabels:
19+
app.kubernetes.io/component: manager
20+
app.kubernetes.io/name: databend-operator
21+
replicas: {{ .Values.manager.replicas }}
22+
template:
23+
resources:
24+
requests:
25+
cpu: {{ .Values.manager.resources.requests.cpu }}
26+
memory: {{ .Values.manager.resources.requests.memory }}
27+
limits:
28+
cpu: {{ .Values.manager.resources.limits.cpu }}
29+
memory: {{ .Values.manager.resources.limits.memory }}
30+
metadata:
31+
labels:
32+
app.kubernetes.io/component: manager
33+
app.kubernetes.io/name: databend-operator
34+
spec:
35+
containers:
36+
- command:
37+
- /manager
38+
args:
39+
- --leader-elect
40+
- --health-probe-bind-address=:8081
41+
image: datafuselabs/databend-operator
42+
name: manager
43+
livenessProbe:
44+
httpGet:
45+
path: /healthz
46+
port: 8081
47+
initialDelaySeconds: 15
48+
periodSeconds: 20
49+
readinessProbe:
50+
httpGet:
51+
path: /readyz
52+
port: 8081
53+
initialDelaySeconds: 5
54+
periodSeconds: 10
55+
serviceAccountName: databend-operator
56+
terminationGracePeriodSeconds: 10
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# permissions to do leader election.
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: Role
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: databend-operator
7+
app.kubernetes.io/managed-by: kustomize
8+
name: leader-election-role
9+
rules:
10+
- apiGroups:
11+
- ""
12+
resources:
13+
- configmaps
14+
verbs:
15+
- get
16+
- list
17+
- watch
18+
- create
19+
- update
20+
- patch
21+
- delete
22+
- apiGroups:
23+
- coordination.k8s.io
24+
resources:
25+
- leases
26+
verbs:
27+
- get
28+
- list
29+
- watch
30+
- create
31+
- update
32+
- patch
33+
- delete
34+
- apiGroups:
35+
- ""
36+
resources:
37+
- events
38+
verbs:
39+
- create
40+
- patch
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: RoleBinding
3+
metadata:
4+
labels:
5+
app.kubernetes.io/name: databend-operator
6+
app.kubernetes.io/managed-by: kustomize
7+
name: leader-election-rolebinding
8+
roleRef:
9+
apiGroup: rbac.authorization.k8s.io
10+
kind: Role
11+
name: leader-election-role
12+
subjects:
13+
- kind: ServiceAccount
14+
name: databend-operator

charts/templates/rbac/role.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: databend-operator-controller-manager
6+
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- configmaps
11+
- persistentvolumeclaims
12+
- serviceaccounts
13+
- services
14+
verbs:
15+
- create
16+
- delete
17+
- get
18+
- list
19+
- patch
20+
- update
21+
- watch
22+
- apiGroups:
23+
- ""
24+
resources:
25+
- secrets
26+
verbs:
27+
- get
28+
- list
29+
- watch
30+
- apiGroups:
31+
- apps
32+
resources:
33+
- statefulsets
34+
verbs:
35+
- create
36+
- delete
37+
- get
38+
- list
39+
- patch
40+
- update
41+
- watch
42+
- apiGroups:
43+
- databendlabs.io
44+
resources:
45+
- tenants
46+
- warehouses
47+
verbs:
48+
- create
49+
- delete
50+
- get
51+
- list
52+
- patch
53+
- update
54+
- watch
55+
- apiGroups:
56+
- databendlabs.io
57+
resources:
58+
- tenants/finalizers
59+
- warehouses/finalizers
60+
verbs:
61+
- update
62+
- apiGroups:
63+
- databendlabs.io
64+
resources:
65+
- tenants/status
66+
- warehouses/status
67+
verbs:
68+
- get
69+
- patch
70+
- update
71+
- apiGroups:
72+
- networking.k8s.io
73+
resources:
74+
- ingresses
75+
verbs:
76+
- create
77+
- delete
78+
- get
79+
- list
80+
- patch
81+
- update
82+
- watch
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
labels:
5+
app.kubernetes.io/name: databend-operator
6+
app.kubernetes.io/managed-by: kustomize
7+
name: databend-operator-controller-manager
8+
roleRef:
9+
apiGroup: rbac.authorization.k8s.io
10+
kind: ClusterRole
11+
name: databend-operator-controller-manager
12+
subjects:
13+
- kind: ServiceAccount
14+
name: databend-operator

0 commit comments

Comments
 (0)