This is an automated email from the ASF dual-hosted git repository.
zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new 5585c2c4 [charts] Optimize pod names (#673)
5585c2c4 is described below
commit 5585c2c4654af0fd48404b31330af54c3ac0582f
Author: Jian Zhong <[email protected]>
AuthorDate: Sun Apr 6 08:48:50 2025 +0800
[charts] Optimize pod names (#673)
---
.../charts/admin/charts/kube-prometheus/Chart.yaml | 4 +-
.../charts/grafana/templates/_helpers.tpl | 12 +---
.../kube-state-metrics/templates/_helpers.tpl | 12 +---
.../charts/prometheus-node-exporter/Chart.yaml | 2 +-
.../templates/_helpers.tpl | 12 +---
.../charts/kube-prometheus/templates/_helpers.tpl | 15 ++--
.../templates/prometheus/clusterrole.yaml | 2 +-
.../zookeeper/templates/statefulset.yaml | 83 ++++++++++++++++------
8 files changed, 77 insertions(+), 65 deletions(-)
diff --git a/manifests/charts/admin/charts/kube-prometheus/Chart.yaml
b/manifests/charts/admin/charts/kube-prometheus/Chart.yaml
index f5767172..634f1509 100644
--- a/manifests/charts/admin/charts/kube-prometheus/Chart.yaml
+++ b/manifests/charts/admin/charts/kube-prometheus/Chart.yaml
@@ -20,7 +20,7 @@ dependencies:
repository: https://prometheus-community.github.io/helm-charts
version: 5.31.*
- condition: nodeExporter.enabled
- name: prometheus-node-exporter
+ name: node-exporter
repository: https://prometheus-community.github.io/helm-charts
version: 4.45.*
- condition: grafana.enabled
@@ -63,7 +63,7 @@ maintainers:
- email: [email protected]
name: QuentinBisson
url: https://github.com/QuentinBisson
-name: kube-prometheus-stack
+name: kube-prometheus
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
diff --git
a/manifests/charts/admin/charts/kube-prometheus/charts/grafana/templates/_helpers.tpl
b/manifests/charts/admin/charts/kube-prometheus/charts/grafana/templates/_helpers.tpl
index be9c1c5c..e6e5b7de 100644
---
a/manifests/charts/admin/charts/kube-prometheus/charts/grafana/templates/_helpers.tpl
+++
b/manifests/charts/admin/charts/kube-prometheus/charts/grafana/templates/_helpers.tpl
@@ -12,16 +12,8 @@ We truncate at 63 chars because some Kubernetes name fields
are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "grafana.fullname" -}}
-{{- if .Values.fullnameOverride }}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
-{{- else }}
-{{- $name := default .Chart.Name .Values.nameOverride }}
-{{- if contains $name .Release.Name }}
-{{- .Release.Name | trunc 63 | trimSuffix "-" }}
-{{- else }}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
-{{- end }}
-{{- end }}
+{{- $name := default .Chart.Name }}
+{{- printf "%s" $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
diff --git
a/manifests/charts/admin/charts/kube-prometheus/charts/kube-state-metrics/templates/_helpers.tpl
b/manifests/charts/admin/charts/kube-prometheus/charts/kube-state-metrics/templates/_helpers.tpl
index 3dd326da..9b2d8c6d 100644
---
a/manifests/charts/admin/charts/kube-prometheus/charts/kube-state-metrics/templates/_helpers.tpl
+++
b/manifests/charts/admin/charts/kube-prometheus/charts/kube-state-metrics/templates/_helpers.tpl
@@ -12,16 +12,8 @@ We truncate at 63 chars because some Kubernetes name fields
are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kube-state-metrics.fullname" -}}
-{{- if .Values.fullnameOverride -}}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- $name := default .Chart.Name .Values.nameOverride -}}
-{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-{{- end -}}
+{{- $name := default .Chart.Name -}}
+{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
diff --git
a/manifests/charts/admin/charts/kube-prometheus/charts/prometheus-node-exporter/Chart.yaml
b/manifests/charts/admin/charts/kube-prometheus/charts/prometheus-node-exporter/Chart.yaml
index 896e5a9e..4820d2a9 100644
---
a/manifests/charts/admin/charts/kube-prometheus/charts/prometheus-node-exporter/Chart.yaml
+++
b/manifests/charts/admin/charts/kube-prometheus/charts/prometheus-node-exporter/Chart.yaml
@@ -21,7 +21,7 @@ maintainers:
- email: [email protected]
name: zeritti
url: https://github.com/zeritti
-name: prometheus-node-exporter
+name: node-exporter
sources:
- https://github.com/prometheus/node_exporter/
type: application
diff --git
a/manifests/charts/admin/charts/kube-prometheus/charts/prometheus-node-exporter/templates/_helpers.tpl
b/manifests/charts/admin/charts/kube-prometheus/charts/prometheus-node-exporter/templates/_helpers.tpl
index 890c487a..7e2b842b 100644
---
a/manifests/charts/admin/charts/kube-prometheus/charts/prometheus-node-exporter/templates/_helpers.tpl
+++
b/manifests/charts/admin/charts/kube-prometheus/charts/prometheus-node-exporter/templates/_helpers.tpl
@@ -12,16 +12,8 @@ We truncate at 63 chars because some Kubernetes name fields
are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "prometheus-node-exporter.fullname" -}}
-{{- if .Values.fullnameOverride }}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
-{{- else }}
-{{- $name := default .Chart.Name .Values.nameOverride }}
-{{- if contains $name .Release.Name }}
-{{- .Release.Name | trunc 63 | trimSuffix "-" }}
-{{- else }}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
-{{- end }}
-{{- end }}
+{{- $name := default .Chart.Name }}
+{{- printf "%s" $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
diff --git
a/manifests/charts/admin/charts/kube-prometheus/templates/_helpers.tpl
b/manifests/charts/admin/charts/kube-prometheus/templates/_helpers.tpl
index b6d2e512..309a2529 100644
--- a/manifests/charts/admin/charts/kube-prometheus/templates/_helpers.tpl
+++ b/manifests/charts/admin/charts/kube-prometheus/templates/_helpers.tpl
@@ -15,11 +15,10 @@ The longest name that gets created adds and extra 37
characters, so truncation s
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}}
{{- else -}}
-{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- $name := default .Chart.Name -}}
{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 26 | trimSuffix "-" -}}
{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 26 | trimSuffix "-" -}}
+{{- printf "%s" $name | trunc 26 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -39,7 +38,7 @@ The longest name that gets created adds and extra 37
characters, so truncation s
{{- if .Values.cleanPrometheusOperatorObjectNames }}
{{- include "kube-prometheus-stack.fullname" . }}
{{- else }}
-{{- print (include "kube-prometheus-stack.fullname" .) "-prometheus" }}
+{{- print (include "kube-prometheus-stack.fullname" .) }}
{{- end }}
{{- end }}
@@ -53,7 +52,7 @@ The longest name that gets created adds and extra 37
characters, so truncation s
{{- if .Values.cleanPrometheusOperatorObjectNames }}
{{- include "kube-prometheus-stack.fullname" . }}
{{- else }}
-{{- print (include "kube-prometheus-stack.fullname" .) "-alertmanager" -}}
+{{- print (include "kube-prometheus-stack.fullname" .) -}}
{{- end }}
{{- end }}
@@ -163,11 +162,7 @@ Use the grafana namespace override for multi-namespace
deployments in combined c
Allow kube-state-metrics job name to be overridden
*/}}
{{- define "kube-prometheus-stack-kube-state-metrics.name" -}}
- {{- if index .Values "kube-state-metrics" "nameOverride" -}}
- {{- index .Values "kube-state-metrics" "nameOverride" -}}
- {{- else -}}
- {{- print "kube-state-metrics" -}}
- {{- end -}}
+{{- print "kube-state-metrics" -}}
{{- end -}}
{{/*
diff --git
a/manifests/charts/admin/charts/kube-prometheus/templates/prometheus/clusterrole.yaml
b/manifests/charts/admin/charts/kube-prometheus/templates/prometheus/clusterrole.yaml
index cee3159c..850be685 100644
---
a/manifests/charts/admin/charts/kube-prometheus/templates/prometheus/clusterrole.yaml
+++
b/manifests/charts/admin/charts/kube-prometheus/templates/prometheus/clusterrole.yaml
@@ -29,7 +29,7 @@ rules:
- nonResourceURLs: ["/metrics", "/metrics/cadvisor"]
verbs: ["get"]
{{/* fix(#3338): add required rules to use node-exporter with the RBAC proxy
*/}}
-{{- if and .Values.nodeExporter.enabled (index .Values
"prometheus-node-exporter").kubeRBACProxy.enabled }}
+{{- if and .Values.nodeExporter.enabled (index .Values
"node-exporter").kubeRBACProxy.enabled }}
- apiGroups: [ "" ]
resources:
- services/{{ include "prometheus-node-exporter.fullname" (index .Subcharts
"prometheus-node-exporter") }}
diff --git
a/manifests/charts/dubbo-control/register-discovery/zookeeper/templates/statefulset.yaml
b/manifests/charts/dubbo-control/register-discovery/zookeeper/templates/statefulset.yaml
index 513542e4..4c163eba 100644
---
a/manifests/charts/dubbo-control/register-discovery/zookeeper/templates/statefulset.yaml
+++
b/manifests/charts/dubbo-control/register-discovery/zookeeper/templates/statefulset.yaml
@@ -36,6 +36,47 @@ spec:
- name: zookeeper
image: zookeeper
imagePullPolicy: {{ $zookeeper.imagePullPolicy }}
+ env:
+ - name: DATA_LOG_DIR
+ value: ''
+ - name: TICK_TIME
+ value: "2000"
+ - name: INIT_LIMIT
+ value: "10"
+ - name: SYNC_LIMIT
+ value: "5"
+ - name: PORT_NUMBER
+ value: "2181"
+ - name: PRE_ALLOC_SIZE
+ value: "65536"
+ - name: SNAPCOUNT
+ value: "100000"
+ - name: MAX_CLIENT_CNXNS
+ value: "60"
+ - name: 4LW_COMMANDS_WHITELIST
+ value: "srvr, mntr, ruok"
+ - name: LISTEN_ALLIPS_ENABLED
+ value: "no"
+ - name: AUTOPURGE_INTERVAL
+ value: "1"
+ - name: AUTOPURGE_RETAIN_COUNT
+ value: "10"
+ - name: MAX_SESSION_TIMEOUT
+ value: "40000"
+ - name: ENABLE_AUTH
+ value: "no"
+ - name: ENABLE_QUORUM_AUTH
+ value: "no"
+ - name: HEAP_SIZE
+ value: "1024"
+ - name: LOG_LEVEL
+ value: "ERROR"
+ - name: ALLOW_ANONYMOUS_LOGIN
+ value: "yes"
+ - name: ADMIN_SERVER_PORT_NUMBER
+ value: "8080"
+ - name: SERVERS
+ value: "zookeeper-0.zookeeper-headless:2888:3888::1"
resources:
{{ toYaml $zookeeper.resources | trim | indent 10 }}
ports:
@@ -55,24 +96,24 @@ spec:
defaultMode: 0755
- name: data
emptyDir: {}
- volumeClaimTemplates:
- - metadata:
- name: data
- spec:
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 5Gi
----
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: zookeeper-pvc
-spec:
- storageClassName: rook-ceph-block
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 20Gi
\ No newline at end of file
+{{/* volumeClaimTemplates:*/}}
+{{/* - metadata:*/}}
+{{/* name: data*/}}
+{{/* spec:*/}}
+{{/* accessModes:*/}}
+{{/* - ReadWriteOnce*/}}
+{{/* resources:*/}}
+{{/* requests:*/}}
+{{/* storage: 5Gi*/}}
+{{/*---*/}}
+{{/*apiVersion: v1*/}}
+{{/*kind: PersistentVolumeClaim*/}}
+{{/*metadata:*/}}
+{{/* name: zookeeper-pvc*/}}
+{{/*spec:*/}}
+{{/* storageClassName: rook-ceph-block*/}}
+{{/* accessModes:*/}}
+{{/* - ReadWriteOnce*/}}
+{{/* resources:*/}}
+{{/* requests:*/}}
+{{/* storage: 20Gi*/}}
\ No newline at end of file