This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch banyandb
in repository https://gitbox.apache.org/repos/asf/skywalking-helm.git

commit 89b95b480a5916f8619ada4f43c40443d63145ab
Author: Gao Hongtao <[email protected]>
AuthorDate: Sun Sep 15 00:53:49 2024 +0000

    Bump up BanyanDB Helm version to 0.3.0
    
    Signed-off-by: Gao Hongtao <[email protected]>
---
 CHANGES.md                              |   5 +
 chart/skywalking/Chart.yaml             |   2 +-
 chart/skywalking/templates/_helpers.tpl |  62 +++++++++++-
 chart/skywalking/values.yaml            | 173 ++++++++++++++++----------------
 4 files changed, 149 insertions(+), 93 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 4d560e2..97ad7c9 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,11 @@ Changes by Version
 ==================
 Release Notes.
 
+4.7.0
+------------------
+
+- Bump up Banyandb Helm version to 0.3.0.
+
 4.6.0
 ------------------
 
diff --git a/chart/skywalking/Chart.yaml b/chart/skywalking/Chart.yaml
index ffb12bc..c0fcdef 100644
--- a/chart/skywalking/Chart.yaml
+++ b/chart/skywalking/Chart.yaml
@@ -40,6 +40,6 @@ dependencies:
     condition: postgresql.enabled
   - name: skywalking-banyandb-helm
     alias: banyandb
-    version: 0.2.0
+    version: 0.3.0-rc0
     repository: oci://registry-1.docker.io/apache
     condition: banyandb.enabled
diff --git a/chart/skywalking/templates/_helpers.tpl 
b/chart/skywalking/templates/_helpers.tpl
index 87631c1..8bc0e79 100644
--- a/chart/skywalking/templates/_helpers.tpl
+++ b/chart/skywalking/templates/_helpers.tpl
@@ -116,14 +116,14 @@ Create the name of the service account to use for the 
satellite cluster
         sleep 3
       done
 {{- else if eq .Values.oap.storageType "banyandb" -}}
-{{- $banyandbHost := "banyandb-http" -}}
-{{- if not .Values.banyandb.enabled -}}
-{{- $banyandbHost = .Values.banyandb.config.httpHost -}}
+{{- $address := .Values.banyandb.config.httpAddress -}}
+{{- if .Values.banyandb.enabled -}}
+{{- $address = printf "%s-http:%s" (include "skywalking.banyandb.fullname" .) 
(include "skywalking.banyandb.httpPort" .) -}}
 {{- end }}
 - name: wait-for-banyandb
   image: curlimages/curl
   imagePullPolicy: IfNotPresent
-  command: ['sh', '-c', 'for i in $(seq 1 60); do curl {{ $banyandbHost }}:{{ 
.Values.banyandb.config.httpPort }}/api/healthz && exit 0 || sleep 5; done; 
exit 1']
+  command: ['sh', '-c', 'for i in $(seq 1 60); do curl -k {{ $address 
}}/api/healthz && exit 0 || sleep 5; done; exit 1']
 {{- end }}
 {{- end -}}
 
@@ -160,7 +160,59 @@ Create the name of the service account to use for the 
satellite cluster
 - name: SW_DATA_SOURCE_PASSWORD
   value: "{{ .Values.postgresql.auth.password }}"
 {{- else if eq .Values.oap.storageType "banyandb" }}
+{{- $targets := .Values.banyandb.config.grpcAddress -}}
+{{- if .Values.banyandb.enabled -}}
+{{- $targets = printf "%s-grpc:%s" (include "skywalking.banyandb.fullname" .) 
(include "skywalking.banyandb.grpcPort" .) -}}
+{{- end }}
 - name: SW_STORAGE_BANYANDB_TARGETS
-  value: "{{ .Values.banyandb.config.targets }}"
+  value: "{{ $targets }}"
 {{- end }}
 {{- end -}}
+
+{{/*
+Expand the name of the banyandb chart.
+*/}}
+{{- define "skywalking.banyandb.name" -}}
+{{- default "skywalking-banyandb-helm" .Values.banyandb.nameOverride | trunc 
63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to 
this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "skywalking.banyandb.fullname" -}}
+{{- if .Values.banyandb.fullnameOverride -}}
+{{- .Values.banyandb.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := (include "skywalking.banyandb.name" .) -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Define the banyandb http port
+*/}}
+{{- define "skywalking.banyandb.httpPort" -}}
+{{- if .Values.banyandb.standalone.enabled -}}
+{{- .Values.banyandb.standalone.httpSvc.port -}}
+{{- else if .Values.banyandb.cluster.enabled -}}
+{{- .Values.banyandb.cluster.liaison.httpSvc.port -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Define the banyandb grpc port
+*/}}
+{{- define "skywalking.banyandb.grpcPort" -}}
+{{- if .Values.banyandb.standalone.enabled -}}
+{{- .Values.banyandb.standalone.grpcSvc.port -}}
+{{- else if .Values.banyandb.cluster.enabled -}}
+{{- .Values.banyandb.cluster.liaison.grpcSvc.port -}}
+{{- end -}}
+{{- end -}}
diff --git a/chart/skywalking/values.yaml b/chart/skywalking/values.yaml
index 154b35f..5cab321 100644
--- a/chart/skywalking/values.yaml
+++ b/chart/skywalking/values.yaml
@@ -33,7 +33,7 @@ oap:
   name: oap
   image:
     repository: skywalking.docker.scarf.sh/apache/skywalking-oap-server
-    tag: null  # Must be set explicitly
+    tag: null # Must be set explicitly
     pullPolicy: IfNotPresent
   storageType: null
   ports:
@@ -54,58 +54,58 @@ oap:
   nodeSelector: {}
   tolerations: []
   resources: {}
-    # limits:
-    #   cpu: 8
-    #   memory: 8Gi
-    # requests:
-    #   cpu: 8
-    #   memory: 4Gi
+  # limits:
+  #   cpu: 8
+  #   memory: 8Gi
+  # requests:
+  #   cpu: 8
+  #   memory: 4Gi
   livenessProbe: {}
-    # tcpSocket:
-    #   port: 12800
-    # initialDelaySeconds: 5
-    # periodSeconds: 20
+  # tcpSocket:
+  #   port: 12800
+  # initialDelaySeconds: 5
+  # periodSeconds: 20
   startupProbe: {}
   # Time to boot the application is set to:
   # 9 (failureThreshold) * 10 (periodSeconds) = 90 seconds in this case.
-    # tcpSocket:
-    #   port: 12800
-    # failureThreshold: 9
-    # periodSeconds: 10
+  # tcpSocket:
+  #   port: 12800
+  # failureThreshold: 9
+  # periodSeconds: 10
   readinessProbe: {}
-    # tcpSocket:
-    #   port: 12800
-    # initialDelaySeconds: 5
-    # periodSeconds: 20
+  # tcpSocket:
+  #   port: 12800
+  # initialDelaySeconds: 5
+  # periodSeconds: 20
   # podAnnotations:
   #   example: oap-foo
   securityContext: {}
-    # runAsUser: 1000
-    # runAsGroup: 1000
-    # fsGroup: 1000
+  # runAsUser: 1000
+  # runAsGroup: 1000
+  # fsGroup: 1000
   env:
-    # more env, please refer to 
https://hub.docker.com/r/apache/skywalking-oap-server
-    # or 
https://github.com/apache/skywalking-docker/blob/master/6/6.4/oap/README.md#sw_telemetry
+  # more env, please refer to 
https://hub.docker.com/r/apache/skywalking-oap-server
+  # or 
https://github.com/apache/skywalking-docker/blob/master/6/6.4/oap/README.md#sw_telemetry
 
   # Allows you to add any config files in /skywalking/config
   # such as log4j2.xml, oal/core.oal, etc.
   config: {}
-    # metadata-service-mapping.yaml: |
-    #   serviceName: e2e::${LABELS."service.istio.io/canonical-name"}
-    #   serviceInstanceName: ${NAME}
-    # oal:
-    #   core.oal: |
-    #     service_resp_time = from(Service.latency).longAvg();
-    #     service_sla = from(Service.*).percent(status == true);
-    #     service_cpm = from(Service.*).cpm();
-    # log4j2.xml: |
-    #   <Configuration status="DEBUG">
-    #     <!-- ... -->
-    #   </Configuration>
-    # ui-initialized-templates:
-    #   general:
-    #     general-service.json: |
-    #       [{"id":"General-Service" ... }]
+  # metadata-service-mapping.yaml: |
+  #   serviceName: e2e::${LABELS."service.istio.io/canonical-name"}
+  #   serviceInstanceName: ${NAME}
+  # oal:
+  #   core.oal: |
+  #     service_resp_time = from(Service.latency).longAvg();
+  #     service_sla = from(Service.*).percent(status == true);
+  #     service_cpm = from(Service.*).cpm();
+  # log4j2.xml: |
+  #   <Configuration status="DEBUG">
+  #     <!-- ... -->
+  #   </Configuration>
+  # ui-initialized-templates:
+  #   general:
+  #     general-service.json: |
+  #       [{"id":"General-Service" ... }]
   # When 'dynamicConfig.enabled' set to true, enable oap dynamic configuration 
through k8s configmap,
   # Note: The default configmap data is empty, please refer to the detailed 
documentation 
(https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/dynamic-config.md)
   # Sync period in seconds. Defaults to 60 seconds.
@@ -137,7 +137,7 @@ ui:
   replicas: 1
   image:
     repository: skywalking.docker.scarf.sh/apache/skywalking-ui
-    tag: null  # Must be set explicitly
+    tag: null # Must be set explicitly
     pullPolicy: IfNotPresent
   # podAnnotations:
   #   example: oap-foo
@@ -147,8 +147,8 @@ ui:
   ingress:
     enabled: false
     annotations: {}
-      # kubernetes.io/ingress.class: nginx
-      # kubernetes.io/tls-acme: "true"
+    # kubernetes.io/ingress.class: nginx
+    # kubernetes.io/tls-acme: "true"
     path: /
     hosts: []
     # - skywalking.local
@@ -181,9 +181,9 @@ ui:
     ## Limit load balancer source ips to list of CIDRs (where available)
     # loadBalancerSourceRanges: []
   securityContext: {}
-    # runAsUser: 1000
-    # runAsGroup: 1000
-    # fsGroup: 1000
+  # runAsUser: 1000
+  # runAsGroup: 1000
+  # fsGroup: 1000
   env:
 
 oapInit:
@@ -195,12 +195,12 @@ oapInit:
 
 elasticsearch:
   enabled: true
-  config:               # For users of an existing elasticsearch cluster,takes 
effect when `elasticsearch.enabled` is false
+  config: # For users of an existing elasticsearch cluster,takes effect when 
`elasticsearch.enabled` is false
     port:
       http: 9200
     host: elasticsearch # es service on kubernetes or host
-    user: "xxx"         # [optional]
-    password: "xxx"     # [optional]
+    user: "xxx" # [optional]
+    password: "xxx" # [optional]
   clusterName: "elasticsearch"
   nodeGroup: "master"
 
@@ -261,25 +261,25 @@ elasticsearch:
       memory: "2Gi"
 
   initResources: {}
-    # limits:
-    #   cpu: "25m"
-    #   # memory: "128Mi"
-    # requests:
-    #   cpu: "25m"
+  # limits:
+  #   cpu: "25m"
+  #   # memory: "128Mi"
+  # requests:
+  #   cpu: "25m"
   #   memory: "128Mi"
 
   sidecarResources: {}
-    # limits:
-    #   cpu: "25m"
-    #   # memory: "128Mi"
-    # requests:
-    #   cpu: "25m"
+  # limits:
+  #   cpu: "25m"
+  #   # memory: "128Mi"
+  # requests:
+  #   cpu: "25m"
   #   memory: "128Mi"
 
   networkHost: "0.0.0.0"
 
   volumeClaimTemplate:
-    accessModes: [ "ReadWriteOnce" ]
+    accessModes: ["ReadWriteOnce"]
     resources:
       requests:
         storage: 30Gi
@@ -311,17 +311,17 @@ elasticsearch:
     annotations: {}
 
   extraVolumes: ""
-    # - name: extras
+  # - name: extras
   #   emptyDir: {}
 
   extraVolumeMounts: ""
-    # - name: extras
-    #   mountPath: /usr/share/extras
+  # - name: extras
+  #   mountPath: /usr/share/extras
   #   readOnly: true
 
   extraInitContainers: ""
-    # - name: do-something
-    #   image: busybox
+  # - name: do-something
+  #   image: busybox
   #   command: ['do', 'something']
 
   # This is the PriorityClass settings as defined in
@@ -409,7 +409,7 @@ elasticsearch:
   ingress:
     enabled: false
     annotations: {}
-      # kubernetes.io/ingress.class: nginx
+    # kubernetes.io/ingress.class: nginx
     # kubernetes.io/tls-acme: "true"
     path: /
     hosts:
@@ -426,11 +426,11 @@ elasticsearch:
   masterTerminationFix: false
 
   lifecycle: {}
-    # preStop:
-    #   exec:
-    #     command: ["/bin/sh", "-c", "echo Hello from the postStart handler > 
/usr/share/message"]
-    # postStart:
-    #   exec:
+  # preStop:
+  #   exec:
+  #     command: ["/bin/sh", "-c", "echo Hello from the postStart handler > 
/usr/share/message"]
+  # postStart:
+  #   exec:
   #     command: ["/bin/sh", "-c", "echo Hello from the postStart handler > 
/usr/share/message"]
 
   sysctlInitContainer:
@@ -460,9 +460,8 @@ postgresql:
 banyandb:
   enabled: false
   config:
-    httpHost: banyandb-http
-    httpPort: 17913
-    targets: "banyandb-grpc:17912"
+    grpcAddress: "banyandb-grpc:17912"
+    httpAddress: "banyandb-http:17913"
   standalone:
     enabled: true
   cluster:
@@ -495,24 +494,24 @@ satellite:
   nodeSelector: {}
   tolerations: []
   resources: {}
-    # limits:
-    #   cpu: 4
-    #   memory: 8Gi
-    # requests:
-    #   cpu: 4
-    #   memory: 4Gi
+  # limits:
+  #   cpu: 4
+  #   memory: 8Gi
+  # requests:
+  #   cpu: 4
+  #   memory: 4Gi
   podAnnotations:
-    # example: oap-foo
+  # example: oap-foo
   env:
-    # more env, please refer to 
https://skywalking.apache.org/docs/skywalking-satellite/latest/en/setup/readme/#satellite_configyaml
+  # more env, please refer to 
https://skywalking.apache.org/docs/skywalking-satellite/latest/en/setup/readme/#satellite_configyaml
   # Allows you to add any config files in /skywalking/config.
   config: {}
-    # satellite_config.yaml: |
-    #   key: val
+  # satellite_config.yaml: |
+  #   key: val
   securityContext: {}
-    # runAsUser: 1000
-    # runAsGroup: 1000
-    # fsGroup: 1000
+  # runAsUser: 1000
+  # runAsGroup: 1000
+  # fsGroup: 1000
 
 nameOverride: ""
 fullnameOverride: ""

Reply via email to