Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions charts/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
13 changes: 13 additions & 0 deletions charts/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
name: databend-operator
description: Helm chart for databend-operator components
version: 0.1.0
keywords:
- kubernetes
- databend
- databend-operator
- statefulset
- deployment
home: https://www.databend.com/
sources:
- https://github.com/databendcloud/databend-operator
Empty file added charts/README.md
Empty file.
327 changes: 327 additions & 0 deletions charts/templates/databendlabs.io_tenants.yaml

Large diffs are not rendered by default.

388 changes: 388 additions & 0 deletions charts/templates/databendlabs.io_warehouses.yaml

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions charts/templates/manager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
app.kubernetes.io/component: manager
name: {{ .Values.installation.namespace }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: databend-operator
namespace: {{ .Values.installation.namespace }}
labels:
app.kubernetes.io/component: manager
app.kubernetes.io/name: databend-operator
spec:
selector:
matchLabels:
app.kubernetes.io/component: manager
app.kubernetes.io/name: databend-operator
replicas: {{ .Values.manager.replicas }}
template:
resources:
requests:
cpu: {{ .Values.manager.resources.requests.cpu }}
memory: {{ .Values.manager.resources.requests.memory }}
limits:
cpu: {{ .Values.manager.resources.limits.cpu }}
memory: {{ .Values.manager.resources.limits.memory }}
metadata:
labels:
app.kubernetes.io/component: manager
app.kubernetes.io/name: databend-operator
spec:
containers:
- command:
- /manager
args:
- --leader-elect
- --health-probe-bind-address=:8081
image: datafuselabs/databend-operator
name: manager
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
serviceAccountName: databend-operator
terminationGracePeriodSeconds: 10
40 changes: 40 additions & 0 deletions charts/templates/rbac/leader_election_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# permissions to do leader election.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app.kubernetes.io/name: databend-operator
app.kubernetes.io/managed-by: kustomize
name: leader-election-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
14 changes: 14 additions & 0 deletions charts/templates/rbac/leader_election_role_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app.kubernetes.io/name: databend-operator
app.kubernetes.io/managed-by: kustomize
name: leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: leader-election-role
subjects:
- kind: ServiceAccount
name: databend-operator
82 changes: 82 additions & 0 deletions charts/templates/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: databend-operator-controller-manager
rules:
- apiGroups:
- ""
resources:
- configmaps
- persistentvolumeclaims
- serviceaccounts
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- databendlabs.io
resources:
- tenants
- warehouses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- databendlabs.io
resources:
- tenants/finalizers
- warehouses/finalizers
verbs:
- update
- apiGroups:
- databendlabs.io
resources:
- tenants/status
- warehouses/status
verbs:
- get
- patch
- update
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
15 changes: 15 additions & 0 deletions charts/templates/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: databend-operator
app.kubernetes.io/managed-by: kustomize
name: databend-operator-controller-manager
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: databend-operator-controller-manager
subjects:
- kind: ServiceAccount
namespace: {{ .Values.namespace }}
name: databend-operator
8 changes: 8 additions & 0 deletions charts/templates/rbac/service_account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/name: databend-operator
app.kubernetes.io/managed-by: kustomize
name: databend-operator
namespace: {{ .Values.namespace }}
23 changes: 23 additions & 0 deletions charts/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
installation:
namespace: databend-system

manager:
replicas: 2
image:
repository: datafuselabs/databend-operator
tag: v0.1.0
healthProbe:
port: 8081

# resources of databend-operator-manager container
resources:
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi

nodeAffinity: {}
nodeSelector: {}
tolerations: []
4 changes: 2 additions & 2 deletions examples/get-started/warehouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ spec:
name: test
resourcesPerNode:
limits:
cpu: 100m
memory: 100Mi
cpu: 500m
memory: 1Gi
Loading