You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2024/03/25 23:34:21 UTC
(skywalking-banyandb-helm) branch master updated: Add cluster mode (#7)
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb-helm.git
The following commit(s) were added to refs/heads/master by this push:
new ccf5282 Add cluster mode (#7)
ccf5282 is described below
commit ccf528268e0fe18d06b2566bc8649624f5808150
Author: Huang Youliang <52...@users.noreply.github.com>
AuthorDate: Tue Mar 26 07:34:17 2024 +0800
Add cluster mode (#7)
* Add cluster mode
---
.github/workflows/e2e.ci.yaml | 6 +-
README.md | 28 ++
chart/Chart.lock | 6 +
chart/Chart.yaml | 7 +-
chart/templates/_helpers.tpl | 16 ++
.../{statefulset.yaml => deployment.yaml} | 154 ++++++-----
chart/templates/grpc_service.yaml | 34 ++-
chart/templates/http_service.yaml | 49 +++-
chart/templates/ingress.yaml | 53 +++-
chart/templates/pdb.yaml | 87 ++++++-
chart/templates/statefulset.yaml | 281 ++++++++++++++++++++-
chart/values.yaml | 211 +++++++++++++++-
...e2e-banyandb.yaml => e2e-banyandb-cluster.yaml} | 10 +-
...-banyandb.yaml => e2e-banyandb-standalone.yaml} | 9 +-
test/e2e/values.cluster.yaml | 250 ++++++++++++++++++
.../values.yaml => test/e2e/values.standalone.yaml | 11 +-
16 files changed, 1137 insertions(+), 75 deletions(-)
diff --git a/.github/workflows/e2e.ci.yaml b/.github/workflows/e2e.ci.yaml
index 940b1fd..dd1def5 100644
--- a/.github/workflows/e2e.ci.yaml
+++ b/.github/workflows/e2e.ci.yaml
@@ -35,8 +35,10 @@ jobs:
strategy:
matrix:
test:
- - name: Run Skywalking E2E Test (BanyanDB as database)
- config: test/e2e/e2e-banyandb.yaml
+ - name: Run Skywalking E2E Test (standalone BanyanDB as database)
+ config: test/e2e/e2e-banyandb-standalone.yaml
+ - name: Run Skywalking E2E Test (BanyanDB cluster as database)
+ config: test/e2e/e2e-banyandb-cluster.yaml
name: ${{ matrix.test.name }}
env:
OAP_TAG: 965dea898986ed2ab1343559fb20d6faed11ada9
diff --git a/README.md b/README.md
index a9a237d..28972a9 100644
--- a/README.md
+++ b/README.md
@@ -118,6 +118,34 @@ $ helm install my-release banyandb -f values.yaml
## Use external certificate authorities for TLS
If you'd like to use external certificate authorities, such as Vault, corresponding annotations can be injected into [banyandb](./chart/templates/statefulset.yaml).
+## Setup certificate for etcd TLS
+To establish secure communication for etcd, you can leverage cert-manager to generate the necessary TLS certificates. This tool simplifies the process of creating and managing certificates. You can install cert-manager with the following command.
+```console
+kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.4/cert-manager.yaml
+```
+
+A Certificate can be created with the following configurations. In this setup, each dnsName includes a wildcard that enables resolution of all etcd pods' DNS names within the specified namespace, along with the service name of etcd and its corresponding namespace. Here, 'svc' represents a service, while 'cluster.local' serves as the domain suffix for the Kubernetes cluster.
+```yaml
+apiVersion: cert-manager.io/v1
+kind: Certificate
+metadata:
+ name: etcd-client
+ namespace: banyandb
+spec:
+ secretName: etcd-client-tls
+ duration: 17520h
+ renewBefore: 4320h
+ issuerRef:
+ name: banyandb-issuer
+ kind: Issuer
+ usages:
+ - server auth
+ - client auth
+ dnsNames:
+ - "*.banyandb-etcd.banyandb.svc.cluster.local"
+ - "*.banyandb-etcd-headless.banyandb.svc.cluster.local"
+```
+
# Install the development version of BanyanDB using the master branch
This is needed **only** when you want to install [BanyanDB](https://github.com/apache/skywalking-banyandb/tree/main) from the master branch.
diff --git a/chart/Chart.lock b/chart/Chart.lock
new file mode 100644
index 0000000..7d4afdb
--- /dev/null
+++ b/chart/Chart.lock
@@ -0,0 +1,6 @@
+dependencies:
+- name: etcd
+ repository: oci://registry-1.docker.io/bitnamicharts
+ version: 9.14.3
+digest: sha256:31aacd1ae011febfa82522a1777fd2f36a52529bea2e343bacb0060c51068906
+generated: "2024-03-01T09:44:38.864211193+08:00"
diff --git a/chart/Chart.yaml b/chart/Chart.yaml
index e7e20fd..500860b 100644
--- a/chart/Chart.yaml
+++ b/chart/Chart.yaml
@@ -20,4 +20,9 @@ version: 0.1.0
description: Helm Chart for Apache SkyWalking BanyanDB
icon: https://raw.githubusercontent.com/apache/skywalking-kubernetes/master/logo/sw-logo-for-chart.jpg
sources:
- - https://github.com/apache/skywalking-banyandb-helm
\ No newline at end of file
+ - https://github.com/apache/skywalking-banyandb-helm
+dependencies:
+ - name: etcd
+ version: 9.14.3
+ repository: oci://registry-1.docker.io/bitnamicharts
+ condition: etcd.enabled
\ No newline at end of file
diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl
index f89fba8..e5d3a54 100644
--- a/chart/templates/_helpers.tpl
+++ b/chart/templates/_helpers.tpl
@@ -83,3 +83,19 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
+
+{{/*
+EtcdEndpoints
+*/}}
+{{- define "banyandb.etcdEndpoints" -}}
+{{- $endpoints := list }}
+{{- $replicaCount := int .Values.etcd.replicaCount }}
+{{- $releaseName := .Release.Name }}
+{{- $namespace := .Release.Namespace }}
+{{- range $i := until $replicaCount }}
+ {{- $endpoint := printf "%s-etcd-%d.%s-etcd-headless.%s:2379" $releaseName $i $releaseName $namespace }}
+ {{- $endpoints = append $endpoints $endpoint }}
+{{- end }}
+- name: BYDB_ETCD_ENDPOINTS
+ value: "{{- $endpoints | join "," -}}"
+{{- end }}
\ No newline at end of file
diff --git a/chart/templates/statefulset.yaml b/chart/templates/deployment.yaml
similarity index 51%
copy from chart/templates/statefulset.yaml
copy to chart/templates/deployment.yaml
index 9eb5169..9913163 100644
--- a/chart/templates/statefulset.yaml
+++ b/chart/templates/deployment.yaml
@@ -15,70 +15,94 @@
# specific language governing permissions and limitations
# under the License.
+{{- if and .Values.cluster.enabled .Values.cluster.liaison }}
apiVersion: apps/v1
-kind: StatefulSet
+kind: Deployment
metadata:
labels:
app: {{ template "banyandb.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
- component: "{{ .Values.standalone.name }}"
+ component: "{{ .Values.cluster.liaison.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
+ role: {{ .Values.cluster.liaison.role }}
name: {{ template "banyandb.fullname" . }}
spec:
- serviceName: banyandb
- replicas: 1
+ replicas: {{ .Values.cluster.liaison.replicas }}
selector:
matchLabels:
app: {{ template "banyandb.name" . }}
- component: "{{ .Values.standalone.name }}"
+ component: "{{ .Values.cluster.liaison.name }}"
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "banyandb.name" . }}
- component: "{{ .Values.standalone.name }}"
+ component: "{{ .Values.cluster.liaison.name }}"
release: {{ .Release.Name }}
- {{- if .Values.standalone.podAnnotations }}
+ role: {{ .Values.cluster.liaison.role }}
+ {{- if .Values.cluster.liaison.podAnnotations }}
annotations:
-{{ toYaml .Values.standalone.podAnnotations | indent 8 }}
+{{ toYaml .Values.cluster.liaison.podAnnotations | indent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "banyandb.serviceAccountName" . }}
- {{- with .Values.standalone.securityContext }}
+ {{- with .Values.cluster.liaison.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
- priorityClassName: {{ .Values.standalone.priorityClassName }}
+ priorityClassName: {{ .Values.cluster.liaison.priorityClassName }}
containers:
- - name: {{ .Values.standalone.name }}
- image: {{ .Values.standalone.image.repository }}:{{ required "banyandb.image.tag is required" .Values.standalone.image.tag }}
- imagePullPolicy: {{ .Values.standalone.image.pullPolicy }}
+ - name: {{ .Values.cluster.liaison.name }}
+ image: {{ .Values.cluster.image.repository }}:{{ required "banyandb.image.tag is required" .Values.cluster.image.tag }}
+ imagePullPolicy: {{ .Values.cluster.image.pullPolicy }}
env:
- {{- range $env := .Values.standalone.env }}
+ {{- range $env := .Values.cluster.liaison.env }}
- name: {{ $env.name }}
value: {{ $env.value }}
{{- end }}
- {{- if .Values.standalone.tls.grpcSecretName }}
+ {{- if .Values.cluster.liaison.tls.grpcSecretName }}
- name: BYDB_TLS
value: "true"
- name: BYDB_CERT_FILE
- value: "/etc/tls/{{ .Values.standalone.tls.grpcSecretName }}/tls.crt"
+ value: "/etc/tls/{{ .Values.cluster.liaison.tls.grpcSecretName }}/tls.crt"
- name: BYDB_KEY_FILE
- value: "/etc/tls/{{ .Values.standalone.tls.grpcSecretName }}/tls.key"
+ value: "/etc/tls/{{ .Values.cluster.liaison.tls.grpcSecretName }}/tls.key"
- name: BYDB_HTTP_GRPC_CERT_FILE
- value: "/etc/tls/{{ .Values.standalone.tls.grpcSecretName }}/tls.crt"
+ value: "/etc/tls/{{ .Values.cluster.liaison.tls.grpcSecretName }}/tls.crt"
{{- end }}
- {{- if .Values.standalone.tls.httpSecretName }}
+ {{- if .Values.cluster.liaison.tls.httpSecretName }}
- name: BYDB_HTTP_TLS
value: "true"
- name: BYDB_HTTP_CERT_FILE
- value: "/etc/tls/{{ .Values.standalone.tls.httpSecretName }}/tls.crt"
+ value: "/etc/tls/{{ .Values.cluster.liaison.tls.httpSecretName }}/tls.crt"
- name: BYDB_HTTP_KEY_FILE
- value: "/etc/tls/{{ .Values.standalone.tls.httpSecretName }}/tls.key"
+ value: "/etc/tls/{{ .Values.cluster.liaison.tls.httpSecretName }}/tls.key"
+ {{- end }}
+ {{- if and .Values.etcd.auth.rbac.create (not .Values.etcd.auth.rbac.allowNoneAuthentication) }}
+ - name: BYDB_ETCD_USERNAME
+ value: "root"
+ - name: BYDB_ETCD_PASSWORD
+ value: {{ .Values.etcd.auth.rbac.rootPassword }}
+ {{- end }}
+ {{- if .Values.etcd.auth.client.secureTransport }}
+ - name: BYDB_ETCD_TLS_CA_FILE
+ value: "/etc/tls/{{ .Values.cluster.data.tls.etcdSecretName }}/ca.crt"
+ {{- end }}
+ {{- if .Values.etcd.auth.client.enableAuthentication }}
+ - name: BYDB_ETCD_TLS_CERT_FILE
+ value: "/etc/tls/{{ .Values.cluster.data.tls.etcdSecretName }}/tls.crt"
+ - name: BYDB_ETCD_TLS_KEY_FILE
+ value: "/etc/tls/{{ .Values.cluster.data.tls.etcdSecretName }}/tls.key"
+ {{- end }}
+ {{- if and (not .Values.etcd.enabled) .Values.cluster.etcdEndpoints }}
+ - name: BYDB_ETCD_ENDPOINTS
+ value: "{{- .Values.cluster.etcdEndpoints | join "," -}}"
+ {{- else }}
+ {{- include "banyandb.etcdEndpoints" . | nindent 12 }}
{{- end }}
args:
- - standalone
+ - liaison
ports:
- containerPort: 17912
name: grpc
@@ -89,35 +113,39 @@ spec:
- containerPort: 2121
name: observebility
readinessProbe:
- httpGet:
- path: /api/healthz
- port: 17913
- initialDelaySeconds: 5
- periodSeconds: 10
+ exec:
+ command:
+ - sh
+ - -c
+ - "/bydbctl health"
+ initialDelaySeconds: 20
+ periodSeconds: 60
livenessProbe:
- httpGet:
- path: /api/healthz
- port: 17913
- initialDelaySeconds: 5
- periodSeconds: 10
+ exec:
+ command:
+ - sh
+ - -c
+ - "/bydbctl health"
+ initialDelaySeconds: 20
+ periodSeconds: 60
- {{- if.Values.standalone.resources }}
+ {{- if.Values.cluster.liaison.resources }}
resources:
- {{- if.Values.standalone.resources.requests }}
+ {{- if.Values.cluster.liaison.resources.requests }}
requests:
- {{- range $request := .Values.standalone.resources.requests }}
+ {{- range $request := .Values.cluster.liaison.resources.requests }}
{{ $request.key }}: {{ $request.value }}
{{- end }}
{{- end }}
- {{- if.Values.standalone.resources.limits }}
+ {{- if.Values.cluster.liaison.resources.limits }}
limits:
- {{- range $limit := .Values.standalone.resources.limits }}
+ {{- range $limit := .Values.cluster.liaison.resources.limits }}
{{ $limit.key }}: {{ $limit.value }}
{{- end }}
{{- end }}
{{- end }}
- {{- if or .Values.storage.enabled .Values.standalone.tls }}
+ {{- if or .Values.storage.enabled .Values.cluster.liaison.tls }}
volumeMounts:
{{- if .Values.storage.enabled }}
{{- range $claim := .Values.storage.persistentVolumeClaims }}
@@ -137,17 +165,21 @@ spec:
{{- end }}
{{- end }}
- {{- if .Values.standalone.tls.grpcSecretName }}
- - mountPath: /etc/tls/{{ .Values.standalone.tls.grpcSecretName }}
- name: {{ .Values.standalone.tls.grpcSecretName }}-volume
+ {{- if .Values.cluster.liaison.tls.grpcSecretName }}
+ - mountPath: /etc/tls/{{ .Values.cluster.liaison.tls.grpcSecretName }}
+ name: {{ .Values.cluster.liaison.tls.grpcSecretName }}-volume
{{- end }}
- {{- if and .Values.standalone.tls.httpSecretName (ne .Values.standalone.tls.httpSecretName .Values.standalone.tls.grpcSecretName) }}
- - mountPath: /etc/tls/{{ .Values.standalone.tls.httpSecretName }}
- name: {{ .Values.standalone.tls.httpSecretName }}-volume
+ {{- if .Values.cluster.liaison.tls.etcdSecretName }}
+ - mountPath: /etc/tls/{{ .Values.cluster.liaison.tls.etcdSecretName }}
+ name: {{ .Values.cluster.liaison.tls.etcdSecretName }}-volume
+ {{- end }}
+ {{- if and .Values.cluster.liaison.tls.httpSecretName (ne .Values.cluster.liaison.tls.httpSecretName .Values.cluster.liaison.tls.grpcSecretName) }}
+ - mountPath: /etc/tls/{{ .Values.cluster.liaison.tls.httpSecretName }}
+ name: {{ .Values.cluster.liaison.tls.httpSecretName }}-volume
{{- end }}
{{- end }}
- {{- if or .Values.storage.enabled .Values.standalone.tls }}
+ {{- if or .Values.storage.enabled .Values.cluster.data.tls }}
volumes:
{{- if .Values.storage.enabled }}
{{- range $claim := .Values.storage.persistentVolumeClaims }}
@@ -163,21 +195,26 @@ spec:
{{- end }}
{{- end }}
- {{- if .Values.standalone.tls.grpcSecretName }}
- - name: {{ .Values.standalone.tls.grpcSecretName }}-volume
+ {{- if .Values.cluster.liaison.tls.grpcSecretName }}
+ - name: {{ .Values.cluster.liaison.tls.grpcSecretName }}-volume
+ secret:
+ secretName: {{ .Values.cluster.liaison.tls.grpcSecretName }}
+ {{- end }}
+ {{- if .Values.cluster.liaison.tls.etcdSecretName }}
+ - name: {{ .Values.cluster.liaison.tls.etcdSecretName }}-volume
secret:
- secretName: {{ .Values.standalone.tls.grpcSecretName }}
+ secretName: {{ .Values.cluster.liaison.tls.etcdSecretName }}
{{- end }}
- {{- if and .Values.standalone.tls.httpSecretName (ne .Values.standalone.tls.httpSecretName .Values.standalone.tls.grpcSecretName) }}
- - name: {{ .Values.standalone.tls.httpSecretName }}-volume
+ {{- if and .Values.cluster.liaison.tls.httpSecretName (ne .Values.cluster.liaison.tls.httpSecretName .Values.cluster.liaison.tls.grpcSecretName) }}
+ - name: {{ .Values.cluster.liaison.tls.httpSecretName }}-volume
secret:
- secretName: {{ .Values.standalone.tls.httpSecretName }}
+ secretName: {{ .Values.cluster.liaison.tls.httpSecretName }}
{{- end }}
{{- end }}
- {{- if .Values.standalone.tolerations }}
+ {{- if .Values.cluster.liaison.tolerations }}
tolerations:
- {{- range $toleration := .Values.standalone.tolerations }}
+ {{- range $toleration := .Values.cluster.liaison.tolerations }}
- key: {{ $toleration.key }}
operator: {{ $toleration.operator }}
value: {{ $toleration.value }}
@@ -185,15 +222,15 @@ spec:
{{- end }}
{{- end }}
- {{- if .Values.standalone.nodeSelector }}
+ {{- if .Values.cluster.liaison.nodeSelector }}
nodeSelector:
- {{- range $selector := .Values.standalone.nodeSelector }}
+ {{- range $selector := .Values.cluster.liaison.nodeSelector }}
{{ $selector.key }}: {{ $selector.value }}
{{- end }}
{{- end }}
- {{- if .Values.standalone.affinity }}
- {{- $affinity := .Values.standalone.affinity }}
+ {{- if .Values.cluster.liaison.affinity }}
+ {{- $affinity := .Values.cluster.liaison.affinity }}
affinity:
{{- if $affinity.nodeAffinity }}
nodeAffinity:
@@ -228,4 +265,5 @@ spec:
{{- end }}
{{- end }}
{{- end }}
- {{- end }}
\ No newline at end of file
+ {{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/chart/templates/grpc_service.yaml b/chart/templates/grpc_service.yaml
index 4973bfa..63deb2e 100644
--- a/chart/templates/grpc_service.yaml
+++ b/chart/templates/grpc_service.yaml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-{{- if .Values.standalone.grpcSvc }}
+{{- if and .Values.standalone.enabled .Values.standalone.grpcSvc }}
apiVersion: v1
kind: Service
metadata:
@@ -42,4 +42,34 @@ spec:
app: {{ template "banyandb.name" . }}
component: "{{ .Values.standalone.name }}"
release: {{ .Release.Name }}
-{{- end}}
\ No newline at end of file
+{{- end }}
+
+{{- if and .Values.cluster.enabled .Values.cluster.liaison.grpcSvc }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "banyandb.fullname" . }}-grpc
+ labels:
+ app: {{ template "banyandb.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+ component: "{{ .Values.cluster.liaison.name }}"
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ {{- range $key, $value := .Values.cluster.liaison.grpcSvc.labels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ annotations:
+ {{- range $key, $value := .Values.cluster.liaison.grpcSvc.annotations }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+spec:
+ type: ClusterIP
+ ports:
+ - port: {{ .Values.cluster.liaison.grpcSvc.port }}
+ name: grpc
+ selector:
+ app: {{ template "banyandb.name" . }}
+ component: "{{ .Values.cluster.liaison.name }}"
+ release: {{ .Release.Name }}
+ role: liaison
+{{- end }}
diff --git a/chart/templates/http_service.yaml b/chart/templates/http_service.yaml
index 2e9a4f5..fd92c41 100644
--- a/chart/templates/http_service.yaml
+++ b/chart/templates/http_service.yaml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-{{- if .Values.standalone.httpSvc }}
+{{- if and .Values.standalone.enabled .Values.standalone.httpSvc }}
apiVersion: v1
kind: Service
metadata:
@@ -57,4 +57,49 @@ spec:
- {{ $v }}
{{- end }}
{{- end }}
-{{- end}}
\ No newline at end of file
+{{- end }}
+
+{{- if and .Values.cluster.enabled .Values.cluster.liaison.httpSvc }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "banyandb.fullname" . }}-http
+ labels:
+ app: {{ template "banyandb.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+ component: "{{ .Values.cluster.liaison.name }}"
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ {{- range $key, $value := .Values.cluster.liaison.httpSvc.labels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ annotations:
+ {{- range $key, $value := .Values.cluster.liaison.httpSvc.annotations }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+spec:
+ type: {{ .Values.cluster.liaison.httpSvc.type }}
+ ports:
+ - port: {{ .Values.cluster.liaison.httpSvc.port }}
+ name: http
+ selector:
+ app: {{ template "banyandb.name" . }}
+ component: "{{ .Values.cluster.liaison.name }}"
+ release: {{ .Release.Name }}
+ role: liaison
+ {{- if .Values.cluster.liaison.httpSvc.externalIPs }}
+ externalIPs:
+ {{- range $v := .Values.cluster.liaison.httpSvc.externalIPs }}
+ - {{ $v }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.cluster.liaison.httpSvc.loadBalancerIP }}
+ loadBalancerIP: {{ .Values.cluster.liaison.httpSvc.loadBalancerIP }}
+ {{- end }}
+ {{- if .Values.cluster.liaison.httpSvc.loadBalancerSourceRanges }}
+ loadBalancerSourceRanges:
+ {{- range $v := .Values.cluster.liaison.httpSvc.loadBalancerSourceRanges }}
+ - {{ $v }}
+ {{- end }}
+ {{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/chart/templates/ingress.yaml b/chart/templates/ingress.yaml
index ba9153f..6bcd570 100644
--- a/chart/templates/ingress.yaml
+++ b/chart/templates/ingress.yaml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-{{- if .Values.standalone.ingress.enabled }}
+{{- if and .Values.standalone.enabled .Values.standalone.ingress.enabled }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }}
@@ -64,4 +64,55 @@ spec:
tls:
{{ toYaml .Values.standalone.ingress.tls | indent 4 }}
{{- end -}}
+{{- end }}
+
+{{- if and .Values.cluster.enabled .Values.cluster.liaison.ingress.enabled }}
+{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
+apiVersion: networking.k8s.io/v1
+{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }}
+apiVersion: networking.k8s.io/v1beta1
+{{- else }}
+apiVersion: extensions/v1beta1
+{{- end }}
+kind: Ingress
+metadata:
+ labels:
+ app: {{ template "banyandb.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+ component: "{{ .Values.cluster.liaison.ingress.name }}"
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ {{- range $key, $value := .Values.cluster.liaison.ingress.labels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ name: {{ template "banyandb.fullname" . }}
+ annotations:
+ {{- range $key, $value := .Values.cluster.liaison.ingress.annotations }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+spec:
+ rules:
+ {{- range .Values.cluster.liaison.ingress.rules }}
+ - host: {{ .host }}
+ http:
+ paths:
+ {{- range .paths }}
+ - path: {{ .path }}
+ pathType: Prefix
+ backend:
+ {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
+ service:
+ name: {{ .serviceName }}
+ port:
+ number: {{ .port }}
+ {{- else }}
+ serviceName: {{ .serviceName }}
+ servicePort: {{ .port }}
+ {{- end }}
+ {{- end }}
+ {{- end -}}
+ {{- if .Values.cluster.liaison.ingress.tls }}
+ tls:
+{{ toYaml .Values.cluster.liaison.ingress.tls | indent 4 }}
+ {{- end -}}
{{- end }}
\ No newline at end of file
diff --git a/chart/templates/pdb.yaml b/chart/templates/pdb.yaml
index 7dcf7d3..73b16fd 100644
--- a/chart/templates/pdb.yaml
+++ b/chart/templates/pdb.yaml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-{{- if .Values.standalone.podDisruptionBudget }}
+{{- if and .Values.standalone.enabled .Values.standalone.podDisruptionBudget }}
{{- if .Capabilities.APIVersions.Has "policy/v1" }}
apiVersion: policy/v1
{{- else }}
@@ -56,3 +56,88 @@ spec:
paused: {{ $budget.paused }}
{{- end }}
{{- end }}
+
+{{- if .Values.cluster.enabled }}
+{{- if .Values.cluster.liaison.podDisruptionBudget }}
+{{- if .Capabilities.APIVersions.Has "policy/v1" }}
+apiVersion: policy/v1
+{{- else }}
+apiVersion: policy/v1beta1
+{{- end }}
+kind: PodDisruptionBudget
+metadata:
+ name: {{ template "banyandb.fullname" . }}
+ labels:
+ app: {{ template "banyandb.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+ component: "{{ .Values.cluster.liaison.name }}"
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+spec:
+ {{- $budget := .Values.cluster.liaison.podDisruptionBudget }}
+ {{- if $budget.maxUnavailable }}
+ maxUnavailable: {{ $budget.maxUnavailable }}
+ {{- end }}
+ {{- if $budget.minAvailable }}
+ minAvailable: {{ $budget.minAvailable }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- range $label := $budget.matchLabels }}
+ {{ $label.key }}: {{ $label.value }}
+ {{- end }}
+ matchExpressions:
+ {{- range $expression := $budget.matchExpressions }}
+ - key: {{ $expression.key }}
+ operator: {{ $expression.operator }}
+ values:
+ {{- range $v := $expression.values }}
+ - {{ $v }}
+ {{- end}}
+ {{- end }}
+ {{- if $budget.paused }}
+ paused: {{ $budget.paused }}
+ {{- end }}
+{{- end }}
+{{- if .Values.cluster.data.podDisruptionBudget }}
+{{- if .Capabilities.APIVersions.Has "policy/v1" }}
+apiVersion: policy/v1
+{{- else }}
+apiVersion: policy/v1beta1
+{{- end }}
+kind: PodDisruptionBudget
+metadata:
+ name: {{ template "banyandb.fullname" . }}
+ labels:
+ app: {{ template "banyandb.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+ component: "{{ .Values.data.name }}"
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+spec:
+ {{- $budget := .Values.data.podDisruptionBudget }}
+ {{- if $budget.maxUnavailable }}
+ maxUnavailable: {{ $budget.maxUnavailable }}
+ {{- end }}
+ {{- if $budget.minAvailable }}
+ minAvailable: {{ $budget.minAvailable }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- range $label := $budget.matchLabels }}
+ {{ $label.key }}: {{ $label.value }}
+ {{- end }}
+ matchExpressions:
+ {{- range $expression := $budget.matchExpressions }}
+ - key: {{ $expression.key }}
+ operator: {{ $expression.operator }}
+ values:
+ {{- range $v := $expression.values }}
+ - {{ $v }}
+ {{- end}}
+ {{- end }}
+ {{- if $budget.paused }}
+ paused: {{ $budget.paused }}
+ {{- end }}
+{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/chart/templates/statefulset.yaml b/chart/templates/statefulset.yaml
index 9eb5169..324e230 100644
--- a/chart/templates/statefulset.yaml
+++ b/chart/templates/statefulset.yaml
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+{{- if and .Values.standalone.enabled }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
@@ -228,4 +229,282 @@ spec:
{{- end }}
{{- end }}
{{- end }}
- {{- end }}
\ No newline at end of file
+ {{- end }}
+{{- end }}
+
+{{- if and .Values.cluster.enabled .Values.cluster.data }}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ labels:
+ app: {{ template "banyandb.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+ component: "{{ .Values.cluster.data.name }}"
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ name: {{ template "banyandb.fullname" . }}
+spec:
+ serviceName: banyandb
+ replicas: {{ .Values.cluster.data.replicas }}
+ selector:
+ matchLabels:
+ app: {{ template "banyandb.name" . }}
+ component: "{{ .Values.cluster.data.name }}"
+ release: {{ .Release.Name }}
+ role: {{ .Values.cluster.data.role }}
+ template:
+ metadata:
+ labels:
+ app: {{ template "banyandb.name" . }}
+ component: "{{ .Values.cluster.data.name }}"
+ release: {{ .Release.Name }}
+ role: {{ .Values.cluster.data.role }}
+ {{- if .Values.cluster.data.podAnnotations }}
+ annotations:
+{{ toYaml .Values.cluster.data.podAnnotations | indent 8 }}
+ {{- end }}
+ spec:
+ serviceAccountName: {{ template "banyandb.serviceAccountName" . }}
+ {{- with .Values.cluster.data.securityContext }}
+ securityContext:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ priorityClassName: {{ .Values.cluster.data.priorityClassName }}
+ containers:
+ - name: {{ .Values.cluster.data.name }}
+ image: {{ .Values.cluster.image.repository }}:{{ required "banyandb.image.tag is required" .Values.cluster.image.tag }}
+ imagePullPolicy: {{ .Values.cluster.image.pullPolicy }}
+ env:
+ {{- range $env := .Values.cluster.data.env }}
+ - name: {{ $env.name }}
+ value: {{ $env.value }}
+ {{- end }}
+ {{- if .Values.cluster.data.tls.grpcSecretName }}
+ - name: BYDB_TLS
+ value: "true"
+ - name: BYDB_CERT_FILE
+ value: "/etc/tls/{{ .Values.cluster.data.tls.grpcSecretName }}/tls.crt"
+ - name: BYDB_KEY_FILE
+ value: "/etc/tls/{{ .Values.cluster.data.tls.grpcSecretName }}/tls.key"
+ - name: BYDB_HTTP_GRPC_CERT_FILE
+ value: "/etc/tls/{{ .Values.cluster.data.tls.grpcSecretName }}/tls.crt"
+ {{- end }}
+ {{- if and .Values.etcd.auth.rbac.create (not .Values.etcd.auth.rbac.allowNoneAuthentication) }}
+ - name: BYDB_ETCD_USERNAME
+ value: "root"
+ - name: BYDB_ETCD_PASSWORD
+ value: {{ .Values.etcd.auth.rbac.rootPassword }}
+ {{- end }}
+ {{- if .Values.etcd.auth.client.secureTransport }}
+ - name: BYDB_ETCD_TLS_CA_FILE
+ value: "/etc/tls/{{ .Values.cluster.data.tls.etcdSecretName }}/ca.crt"
+ {{- end }}
+ {{- if .Values.etcd.auth.client.enableAuthentication }}
+ - name: BYDB_ETCD_TLS_CERT_FILE
+ value: "/etc/tls/{{ .Values.cluster.data.tls.etcdSecretName }}/tls.crt"
+ - name: BYDB_ETCD_TLS_KEY_FILE
+ value: "/etc/tls/{{ .Values.cluster.data.tls.etcdSecretName }}/tls.key"
+ {{- end }}
+ {{- if and (not .Values.etcd.enabled) .Values.cluster.etcdEndpoints }}
+ - name: BYDB_ETCD_ENDPOINTS
+ value: "{{- .Values.cluster.etcdEndpoints | join "," -}}"
+ {{- else }}
+ {{- include "banyandb.etcdEndpoints" . | nindent 12 }}
+ {{- end }}
+ - name: BYDB_NODE_HOST_PROVIDER
+ value: "ip"
+ - name: BYDB_NODE_HOST
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ args:
+ - data
+ ports:
+ - containerPort: 17912
+ name: grpc
+ - containerPort: 17913
+ name: http
+ - containerPort: 6060
+ name: pprof
+ - containerPort: 2121
+ name: observebility
+ readinessProbe:
+ exec:
+ command:
+ - sh
+ - -c
+ - "/bydbctl health --grpc-addr=localhost:17912 --insecure"
+ initialDelaySeconds: 20
+ periodSeconds: 60
+ livenessProbe:
+ exec:
+ command:
+ - sh
+ - -c
+ - "/bydbctl health --grpc-addr=localhost:17912 --insecure"
+ initialDelaySeconds: 20
+ periodSeconds: 60
+
+ {{- if.Values.cluster.data.resources }}
+ resources:
+ {{- if.Values.cluster.data.resources.requests }}
+ requests:
+ {{- range $request := .Values.cluster.data.resources.requests }}
+ {{ $request.key }}: {{ $request.value }}
+ {{- end }}
+ {{- end }}
+ {{- if.Values.cluster.data.resources.limits }}
+ limits:
+ {{- range $limit := .Values.cluster.data.resources.limits }}
+ {{ $limit.key }}: {{ $limit.value }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+
+ {{- if or .Values.storage.enabled .Values.cluster.data.tls }}
+ volumeMounts:
+ {{- if .Values.storage.enabled }}
+ {{- range $claim := .Values.storage.persistentVolumeClaims }}
+ {{- if $claim.existingClaimName }}
+ {{- range $claim.mountTargets }}
+ - mountPath: /tmp/{{ . }}
+ name: {{ $claim.existingClaimName }}-volume
+ subPath: {{ . }}
+ {{- end }}
+ {{- else }}
+ {{- range $claim.mountTargets }}
+ - mountPath: /tmp/{{ . }}
+ name: {{ $claim.claimName }}-volume
+ subPath: {{ . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+
+ {{- if .Values.cluster.data.tls.grpcSecretName }}
+ - mountPath: /etc/tls/{{ .Values.cluster.data.tls.grpcSecretName }}
+ name: {{ .Values.cluster.data.tls.grpcSecretName }}-volume
+ {{- end }}
+ {{- if .Values.cluster.data.tls.etcdSecretName }}
+ - mountPath: /etc/tls/{{ .Values.cluster.data.tls.etcdSecretName }}
+ name: {{ .Values.cluster.data.tls.etcdSecretName }}-volume
+ {{- end }}
+ {{- end }}
+ {{- range $sidecar := .Values.cluster.data.sidecar }}
+ - name: {{ $sidecar.name }}
+ image: {{ $sidecar.image }}
+ imagePullPolicy: {{ $sidecar.imagePullPolicy }}
+ command:
+ {{- range $sidecar.commands.normal }}
+ - {{ . | quote }}
+ {{- end }}
+ lifecycle:
+ preStop:
+ exec:
+ command:
+ {{- range $sidecar.commands.preStop }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- if $.Values.storage.enabled }}
+ volumeMounts:
+ {{- range $claim := $.Values.storage.persistentVolumeClaims }}
+ {{- if $claim.existingClaimName }}
+ {{- range $claim.mountTargets }}
+ - mountPath: /tmp/{{ . }}
+ name: {{ $claim.existingClaimName }}-volume
+ subPath: {{ . }}
+ {{- end }}
+ {{- else }}
+ {{- range $claim.mountTargets }}
+ - mountPath: /tmp/{{ . }}
+ name: {{ $claim.claimName }}-volume
+ subPath: {{ . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+
+ {{- if or .Values.storage.enabled .Values.cluster.data.tls }}
+ volumes:
+ {{- if .Values.storage.enabled }}
+ {{- range $claim := .Values.storage.persistentVolumeClaims }}
+ {{- if $claim.existingClaimName }}
+ - name: {{ $claim.existingClaimName }}-volume
+ persistentVolumeClaim:
+ claimName: {{ $claim.existingClaimName }}
+ {{ else }}
+ - name: {{ $claim.claimName }}-volume
+ persistentVolumeClaim:
+ claimName: {{ $claim.claimName }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+
+ {{- if .Values.cluster.data.tls.grpcSecretName }}
+ - name: {{ .Values.cluster.data.tls.grpcSecretName }}-volume
+ secret:
+ secretName: {{ .Values.cluster.data.tls.grpcSecretName }}
+ {{- end }}
+ {{- if .Values.cluster.data.tls.etcdSecretName }}
+ - name: {{ .Values.cluster.data.tls.etcdSecretName }}-volume
+ secret:
+ secretName: {{ .Values.cluster.data.tls.etcdSecretName }}
+ {{- end }}
+ {{- end }}
+
+ {{- if .Values.cluster.data.tolerations }}
+ tolerations:
+ {{- range $toleration := .Values.cluster.data.tolerations }}
+ - key: {{ $toleration.key }}
+ operator: {{ $toleration.operator }}
+ value: {{ $toleration.value }}
+ effect: {{ $toleration.effect }}
+ {{- end }}
+ {{- end }}
+
+ {{- if .Values.cluster.data.nodeSelector }}
+ nodeSelector:
+ {{- range $selector := .Values.cluster.data.nodeSelector }}
+ {{ $selector.key }}: {{ $selector.value }}
+ {{- end }}
+ {{- end }}
+
+ {{- if .Values.cluster.data.affinity }}
+ {{- $affinity := .Values.cluster.data.affinity }}
+ affinity:
+ {{- if $affinity.nodeAffinity }}
+ nodeAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ nodeSelectorTerms:
+ {{- range $requirement := $affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
+ {{- range $matchExpression := $requirement.matchExpressions }}
+ - matchExpressions:
+ - key: {{ $matchExpression.key }}
+ operator: {{ $matchExpression.operator }}
+ values:
+ {{- range $v := $matchExpression.values }}
+ - {{ $v }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+
+ {{- if $affinity.podAffinity }}
+ podAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ {{- range $term := $affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution }}
+ - topologyKey: {{ $term.topologyKey }}
+ namespaces:
+ {{- range $ns := $term.namespaces }}
+ - {{ $ns }}
+ {{- end }}
+ labelSelector:
+ matchLabels:
+ {{- range $label := $term.labelSelector.matchLabels }}
+ {{ $label.key }}: {{ $label.value }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/chart/values.yaml b/chart/values.yaml
index d7357a6..0a650b0 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -18,6 +18,7 @@
# Declare variables to be passed into your templates.
standalone:
+ enabled: false
name: banyandb
podAnnotations:
example: banyandb-foo
@@ -27,7 +28,7 @@ standalone:
# fsGroup: 1000
image:
repository: ghcr.io/apache/skywalking-banyandb
- tag: 84f32b3969cdcc676aaee428383b34b3b67dbdf5
+ tag: dc88130e8d0516c7989734bdeb505e2d92c1ab71
pullPolicy: IfNotPresent
env: []
# - name: BANYANDB_FOO
@@ -113,7 +114,196 @@ standalone:
# - hosts:
# - localhost
# secretName: tls-secret
+
+ sidecar: []
+ # - name: cleanup-sidecar
+ # image: busybox:latest
+ # imagePullPolicy: IfNotPresent
+ # commands:
+ # preStop: ["sh", "-c", "rm -rf /path/to/cleanup"]
+
+cluster:
+ enabled: true
+ image:
+ repository: ghcr.io/apache/skywalking-banyandb
+ tag: dc88130e8d0516c7989734bdeb505e2d92c1ab71
+ pullPolicy: IfNotPresent
+ etcdEndpoints: []
+ liaison:
+ name: banyandb
+ role: liaison
+ replicas: 2
+ podAnnotations:
+ example: banyandb-foo
+ securityContext: {}
+ # runAsUser: 1000
+ # runAsGroup: 1000
+ # fsGroup: 1000
+ env: []
+ # - name: BANYANDB_FOO
+ # value: "bar"
+ priorityClassName: ""
+ podDisruptionBudget: {}
+ # minAvailable: 1
+ # maxUnavailable: 2
+ # matchLabels:
+ # - key: foo
+ # value: bar
+ # matchExpressions:
+ # - key: foo
+ # operator: In
+ # values: [bar, baz]
+ # paused: false
+ tolerations: []
+ # - key: foo
+ # value: bar
+ # operator: Equal
+ # effect: NoSchedule
+ nodeSelector: []
+ # - key: foo
+ # value: bar
+ affinity: {}
+ # nodeAffinity:
+ # requiredDuringSchedulingIgnoredDuringExecution:
+ # nodeSelectorTerms:
+ # - matchExpressions:
+ # - key: foo
+ # operator: In
+ # values:
+ # - bar
+ # - baz
+ # podAffinity:
+ # requiredDuringSchedulingIgnoredDuringExecution:
+ # - labelSelector:
+ # matchLabels:
+ # - key: app
+ # value: banyandb
+ # topologyKey: "kubernetes.io/hostname"
+ # namespaces: []
+ resources:
+ requests: []
+ # - key: cpu
+ # value: "100m"
+ # - key: memory
+ # value: "256Mi"
+ limits: []
+ # - key: cpu
+ # value: "500m"
+ # - key: memory
+ # value: "512Mi"
+ tls:
+ grpcSecretName: ""
+ httpSecretName: ""
+ etcdSecretName: ""
+
+ grpcSvc:
+ labels: {}
+ annotations: {}
+ port: 17912
+ httpSvc:
+ labels: {}
+ annotations: {}
+ port: 17913
+ type: LoadBalancer
+ externalIPs: []
+ loadBalancerIP: null
+ loadBalancerSourceRanges: []
+
+ ingress:
+ enabled: false
+ labels: {}
+ annotations: {}
+ rules: []
+ # - host: localhost
+ # paths:
+ # - path: /
+ # port: 17913
+ # serviceName: banyandb-http
+ tls: []
+ # - hosts:
+ # - localhost
+ # secretName: tls-secret
+
+ data:
+ name: banyandb
+ role: data
+ replicas: 3
+ podAnnotations:
+ example: banyandb-foo
+ securityContext: {}
+ # runAsUser: 1000
+ # runAsGroup: 1000
+ # fsGroup: 1000
+ env: []
+ # - name: BANYANDB_FOO
+ # value: "bar"
+ priorityClassName: ""
+ podDisruptionBudget: {}
+ # minAvailable: 1
+ # maxUnavailable: 2
+ # matchLabels:
+ # - key: foo
+ # value: bar
+ # matchExpressions:
+ # - key: foo
+ # operator: In
+ # values: [bar, baz]
+ # paused: false
+ tolerations: []
+ # - key: foo
+ # value: bar
+ # operator: Equal
+ # effect: NoSchedule
+ nodeSelector: []
+ # - key: foo
+ # value: bar
+ affinity: {}
+ # nodeAffinity:
+ # requiredDuringSchedulingIgnoredDuringExecution:
+ # nodeSelectorTerms:
+ # - matchExpressions:
+ # - key: foo
+ # operator: In
+ # values:
+ # - bar
+ # - baz
+ # podAffinity:
+ # requiredDuringSchedulingIgnoredDuringExecution:
+ # - labelSelector:
+ # matchLabels:
+ # - key: app
+ # value: banyandb
+ # topologyKey: "kubernetes.io/hostname"
+ # namespaces: []
+ resources:
+ requests: []
+ # - key: cpu
+ # value: "100m"
+ # - key: memory
+ # value: "256Mi"
+ limits: []
+ # - key: cpu
+ # value: "500m"
+ # - key: memory
+ # value: "512Mi"
+ tls:
+ grpcSecretName: ""
+ etcdSecretName: ""
+
+ grpcSvc:
+ labels: {}
+ annotations: {}
+ port: 17912
+
+ sidecar: []
+ # - name: cleanup-sidecar
+ # image: busybox:latest
+ # imagePullPolicy: IfNotPresent
+ # commands:
+ # normal: ["sh", "-c", "while true; do echo 'sidecar task'; sleep 60; done"]
+ # preStop: ["sh", "-c", "echo cleanup"]
+
storage:
enabled: false
persistentVolumeClaims:
@@ -143,4 +333,23 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""
+etcd:
+ enabled: true
+ replicaCount: 1
+ auth:
+ rbac:
+ create: true
+ allowNoneAuthentication: false
+ rootPassword: banyandb
+ client:
+ secureTransport: false
+ existingSecret: ""
+ enableAuthentication: false
+ certFilename: tls.crt
+ certKeyFilename: tls.key
+ caFilename: ""
+ # extraEnvVars:
+ # - name: ETCDCTL_CACERT
+ # value: /opt/bitnami/etcd/certs/client/ca.crt
+
fullnameOverride: "banyandb"
diff --git a/test/e2e/e2e-banyandb.yaml b/test/e2e/e2e-banyandb-cluster.yaml
similarity index 97%
copy from test/e2e/e2e-banyandb.yaml
copy to test/e2e/e2e-banyandb-cluster.yaml
index 65d42b9..24e35c2 100644
--- a/test/e2e/e2e-banyandb.yaml
+++ b/test/e2e/e2e-banyandb-cluster.yaml
@@ -40,11 +40,16 @@ setup:
kubectl label namespace default istio-injection=enabled
- name: Install helm
command: bash test/e2e/setup-e2e-shell/install.sh helm
+ - name: Install dependency
+ command: |
+ helm repo add bitnami https://charts.bitnami.com/bitnami
+ cd chart
+ helm dependency update
- name: Install BanyanDB
- command: helm -n istio-system install banyandb chart/
+ command: helm -n istio-system install banyandb chart/ -f test/e2e/values.cluster.yaml
- name: Install SkyWalking
command: |
- helm -n istio-system install skywalking oci://ghcr.io/apache/skywalking-helm/skywalking-helm \
+ helm -n istio-system install --timeout 10m skywalking oci://ghcr.io/apache/skywalking-helm/skywalking-helm \
--version "$SW_HELM_VERSION" \
--set fullnameOverride=skywalking \
--set oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS=k8s-mesh \
@@ -205,3 +210,4 @@ verify:
swctl --display yaml --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql instance list --service-name=e2e::reviews | yq e '.[0].name' - ) \
|yq e 'to_entries' -
expected: expected/metrics-has-value.yml
+
diff --git a/test/e2e/e2e-banyandb.yaml b/test/e2e/e2e-banyandb-standalone.yaml
similarity index 97%
rename from test/e2e/e2e-banyandb.yaml
rename to test/e2e/e2e-banyandb-standalone.yaml
index 65d42b9..feb5349 100644
--- a/test/e2e/e2e-banyandb.yaml
+++ b/test/e2e/e2e-banyandb-standalone.yaml
@@ -40,11 +40,16 @@ setup:
kubectl label namespace default istio-injection=enabled
- name: Install helm
command: bash test/e2e/setup-e2e-shell/install.sh helm
+ - name: Install dependency
+ command: |
+ helm repo add bitnami https://charts.bitnami.com/bitnami
+ cd chart
+ helm dependency update
- name: Install BanyanDB
- command: helm -n istio-system install banyandb chart/
+ command: helm -n istio-system install banyandb chart/ -f test/e2e/values.standalone.yaml
- name: Install SkyWalking
command: |
- helm -n istio-system install skywalking oci://ghcr.io/apache/skywalking-helm/skywalking-helm \
+ helm -n istio-system install --timeout 10m skywalking oci://ghcr.io/apache/skywalking-helm/skywalking-helm \
--version "$SW_HELM_VERSION" \
--set fullnameOverride=skywalking \
--set oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS=k8s-mesh \
diff --git a/test/e2e/values.cluster.yaml b/test/e2e/values.cluster.yaml
new file mode 100644
index 0000000..10d1ecd
--- /dev/null
+++ b/test/e2e/values.cluster.yaml
@@ -0,0 +1,250 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Default values for banyandb.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+cluster:
+ enabled: true
+ image:
+ repository: ghcr.io/apache/skywalking-banyandb
+ tag: dc88130e8d0516c7989734bdeb505e2d92c1ab71
+ pullPolicy: IfNotPresent
+ etcdEndpoints: []
+ liaison:
+ name: banyandb
+ role: liaison
+ replicas: 1
+ podAnnotations:
+ example: banyandb-foo
+ securityContext: {}
+ # runAsUser: 1000
+ # runAsGroup: 1000
+ # fsGroup: 1000
+ env: []
+ # - name: BANYANDB_FOO
+ # value: "bar"
+ priorityClassName: ""
+ podDisruptionBudget: {}
+ # minAvailable: 1
+ # maxUnavailable: 2
+ # matchLabels:
+ # - key: foo
+ # value: bar
+ # matchExpressions:
+ # - key: foo
+ # operator: In
+ # values: [bar, baz]
+ # paused: false
+ tolerations: []
+ # - key: foo
+ # value: bar
+ # operator: Equal
+ # effect: NoSchedule
+ nodeSelector: []
+ # - key: foo
+ # value: bar
+ affinity: {}
+ # nodeAffinity:
+ # requiredDuringSchedulingIgnoredDuringExecution:
+ # nodeSelectorTerms:
+ # - matchExpressions:
+ # - key: foo
+ # operator: In
+ # values:
+ # - bar
+ # - baz
+ # podAffinity:
+ # requiredDuringSchedulingIgnoredDuringExecution:
+ # - labelSelector:
+ # matchLabels:
+ # - key: app
+ # value: banyandb
+ # topologyKey: "kubernetes.io/hostname"
+ # namespaces: []
+ resources:
+ requests: []
+ # - key: cpu
+ # value: "100m"
+ # - key: memory
+ # value: "256Mi"
+ limits: []
+ # - key: cpu
+ # value: "500m"
+ # - key: memory
+ # value: "512Mi"
+ tls:
+ grpcSecretName: ""
+ httpSecretName: ""
+ etcdSecretName: ""
+
+ grpcSvc:
+ labels: {}
+ annotations: {}
+ port: 17912
+
+ httpSvc:
+ labels: {}
+ annotations: {}
+ port: 17913
+ type: LoadBalancer
+ externalIPs: []
+ loadBalancerIP: null
+ loadBalancerSourceRanges: []
+
+ ingress:
+ enabled: false
+ labels: {}
+ annotations: {}
+ rules: []
+ # - host: localhost
+ # paths:
+ # - path: /
+ # port: 17913
+ # serviceName: banyandb-http
+ tls: []
+ # - hosts:
+ # - localhost
+ # secretName: tls-secret
+
+ data:
+ name: banyandb
+ role: data
+ replicas: 1
+ podAnnotations:
+ example: banyandb-foo
+ securityContext: {}
+ # runAsUser: 1000
+ # runAsGroup: 1000
+ # fsGroup: 1000
+ env: []
+ # - name: BANYANDB_FOO
+ # value: "bar"
+ priorityClassName: ""
+ podDisruptionBudget: {}
+ # minAvailable: 1
+ # maxUnavailable: 2
+ # matchLabels:
+ # - key: foo
+ # value: bar
+ # matchExpressions:
+ # - key: foo
+ # operator: In
+ # values: [bar, baz]
+ # paused: false
+ tolerations: []
+ # - key: foo
+ # value: bar
+ # operator: Equal
+ # effect: NoSchedule
+ nodeSelector: []
+ # - key: foo
+ # value: bar
+ affinity: {}
+ # nodeAffinity:
+ # requiredDuringSchedulingIgnoredDuringExecution:
+ # nodeSelectorTerms:
+ # - matchExpressions:
+ # - key: foo
+ # operator: In
+ # values:
+ # - bar
+ # - baz
+ # podAffinity:
+ # requiredDuringSchedulingIgnoredDuringExecution:
+ # - labelSelector:
+ # matchLabels:
+ # - key: app
+ # value: banyandb
+ # topologyKey: "kubernetes.io/hostname"
+ # namespaces: []
+ resources:
+ requests: []
+ # - key: cpu
+ # value: "100m"
+ # - key: memory
+ # value: "256Mi"
+ limits: []
+ # - key: cpu
+ # value: "500m"
+ # - key: memory
+ # value: "512Mi"
+ tls:
+ grpcSecretName: ""
+ etcdSecretName: ""
+
+ grpcSvc:
+ labels: {}
+ annotations: {}
+ port: 17912
+
+ sidecar: []
+ # - name: cleanup-sidecar
+ # image: busybox:latest
+ # imagePullPolicy: IfNotPresent
+ # commands:
+ # normal: ["sh", "-c", "while true; do echo 'sidecar task'; sleep 60; done"]
+ # preStop: ["sh", "-c", "echo cleanup"]
+
+storage:
+ enabled: false
+ persistentVolumeClaims:
+ - mountTargets: ["measure", "stream"]
+ existingClaimName: null
+ claimName: data
+ size: 200Gi
+ accessModes:
+ - ReadWriteOnce
+ storageClass: null
+ volumeMode: Filesystem
+ - mountTargets: ["metadata"]
+ existingClaimName: null
+ claimName: meta
+ size: 10Gi
+ accessModes:
+ - ReadWriteOnce
+ storageClass: null
+ volumeMode: Filesystem
+
+serviceAccount:
+ # Specifies whether a service account should be created
+ create: true
+ # Annotations to add to the service account
+ annotations: {}
+ # The name of the service account to use.
+ # If not set and create is true, a name is generated using the fullname template
+ name: ""
+
+etcd:
+ enabled: true
+ replicaCount: 1
+ auth:
+ rbac:
+ create: true
+ allowNoneAuthentication: false
+ rootPassword: banyandb
+ client:
+ secureTransport: false
+ existingSecret: ""
+ enableAuthentication: false
+ certFilename: tls.crt
+ certKeyFilename: tls.key
+ caFilename: ""
+ # extraEnvVars:
+ # - name: ETCDCTL_CACERT
+ # value: /opt/bitnami/etcd/certs/client/ca.crt
+
+fullnameOverride: "banyandb"
diff --git a/chart/values.yaml b/test/e2e/values.standalone.yaml
similarity index 96%
copy from chart/values.yaml
copy to test/e2e/values.standalone.yaml
index d7357a6..a3140c6 100644
--- a/chart/values.yaml
+++ b/test/e2e/values.standalone.yaml
@@ -17,7 +17,14 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
+cluster:
+ enabled: false
+
+etcd:
+ enabled: false
+
standalone:
+ enabled: true
name: banyandb
podAnnotations:
example: banyandb-foo
@@ -27,7 +34,7 @@ standalone:
# fsGroup: 1000
image:
repository: ghcr.io/apache/skywalking-banyandb
- tag: 84f32b3969cdcc676aaee428383b34b3b67dbdf5
+ tag: dc88130e8d0516c7989734bdeb505e2d92c1ab71
pullPolicy: IfNotPresent
env: []
# - name: BANYANDB_FOO
@@ -143,4 +150,4 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""
-fullnameOverride: "banyandb"
+fullnameOverride: "banyandb"
\ No newline at end of file