refactor: second edition (#1271)
diff --git a/charts/README.md b/charts/README.md
index 9b5505e..0719ef6 100644
--- a/charts/README.md
+++ b/charts/README.md
@@ -1,20 +1,17 @@
-# Apache Dubbo Admin
+# Apache Dubbo Admin for Kubernetes
-A Helm chart for Dubbo Admin The ops and reference implementation for Apache Dubbo.
+Apache Dubbo Admin is an Distributed application monitoring and management platform.
+
+![license](https://img.shields.io/badge/license-Apache--2.0-green.svg)
+![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm)
## Prerequisites
* Kubernetes v1.14+
* Helm v3+
-### Install
+## Usage
```bash
-helm install [RELEASE_NAME] dubbo-admin --namespace dubbo-system --create-namespace
-```
-
-### Uninstall
-
-```bash
-helm delete [RELEASE_NAME] --namespace dubbo-system
+helm install dubbo-admin charts/dubbo-admin
```
\ No newline at end of file
diff --git a/charts/dubbo-admin/.helmignore b/charts/dubbo-admin/.helmignore
index 8cade13..0e8a0eb 100644
--- a/charts/dubbo-admin/.helmignore
+++ b/charts/dubbo-admin/.helmignore
@@ -14,10 +14,10 @@
*.swp
*.bak
*.tmp
+*.orig
*~
# Various IDEs
-.vscode
.project
.idea/
*.tmproj
-OWNERS
+.vscode/
diff --git a/charts/dubbo-admin/Chart.yaml b/charts/dubbo-admin/Chart.yaml
index 0e35911..cf65b0f 100644
--- a/charts/dubbo-admin/Chart.yaml
+++ b/charts/dubbo-admin/Chart.yaml
@@ -1,13 +1,11 @@
apiVersion: v2
-appVersion: ""
+appVersion: 3.2.11
name: dubbo-admin
-description: The ops and reference implementation for Apache Dubbo
-home: https://cn.dubbo.apache.org
-kubeVersion: '>=1.20.0-0'
+description: Distributed application monitoring and management platform.
+home: https://dubbo.apache.org
+kubeVersion: '>=1.28.0-0'
maintainers:
- - email: dev@dubbo.apache.org
- name: dubbo
-sources:
- - https://github.com/apache/dubbo
+ - name: dubbo
+ email: dev@dubbo.apache.org
type: application
version: 0.5.0
\ No newline at end of file
diff --git a/charts/dubbo-admin/README.md b/charts/dubbo-admin/README.md
index 070f9b3..6082ad8 100644
--- a/charts/dubbo-admin/README.md
+++ b/charts/dubbo-admin/README.md
@@ -1,14 +1,2 @@
-## 1. Project download to local
-```
-git clone https://github.com/apache/dubbo-admin.git
-```
+We no longer provide specific `values.yaml` configuration information. For more detailed content, please refer to the official website.
-## 2. Switch project directory
-```
-cd dubbo-admin/deploy/charts/dubbo-admin
-```
-
-## 3. Install dubbo-admin
-```
-helm install dubbo-admin -f values.yaml .
-```
diff --git a/charts/dubbo-admin/templates/NOTES.txt b/charts/dubbo-admin/templates/NOTES.txt
new file mode 100644
index 0000000..dc30687
--- /dev/null
+++ b/charts/dubbo-admin/templates/NOTES.txt
@@ -0,0 +1,41 @@
+CHART NAME: {{ .Chart.Name }}
+CHART VERSION: {{ .Chart.Version }}
+APP VERSION: {{ .Chart.AppVersion }}
+=====================================
+{{- if contains "NodePort" .Values.service.type }}
+You can execute the following command:
+
+export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "dubbo-admin.name" . }})
+export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+
+ echo http://$NODE_IP:$NODE_PORT
+
+{{- else if contains "LoadBalancer" .Values.service.type }}
+You can execute the following command:
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "dubbo-admin.name" . }}'
+
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "dubbo-admin.name" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+
+ echo http://$SERVICE_IP:{{ .Values.service.port }}
+
+{{- else if contains "ClusterIP" .Values.service.type }}
+You can execute the following command:
+
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "dubbo-admin.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
+
+ echo "Visit http://127.0.0.1:8080 to use your application"
+
+ kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
+{{- end }}
+
+{{- if not .Values.persistence.enabled }}
+
+====================================================
+ Not enabled for persistent storage.
+ If you have important data, please enable it.
+====================================================
+{{- end }}
+
+For more details, please visit https://dubbo.apache.org.
diff --git a/charts/dubbo-admin/templates/deploy.yaml b/charts/dubbo-admin/templates/deploy.yaml
index ffa0157..9ca7b3c 100644
--- a/charts/dubbo-admin/templates/deploy.yaml
+++ b/charts/dubbo-admin/templates/deploy.yaml
@@ -62,7 +62,7 @@
successThreshold: {{ .Values.startupProbe.successThreshold }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
resources:
- {{- toYaml .Values.resources | nindent 12 }}
+ {{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: application-properties
configMap:
diff --git a/charts/dubbo-admin/templates/pdb.yaml b/charts/dubbo-admin/templates/pdb.yaml
index 14efdd1..7a3fdd5 100644
--- a/charts/dubbo-admin/templates/pdb.yaml
+++ b/charts/dubbo-admin/templates/pdb.yaml
@@ -13,5 +13,5 @@
{{- end }}
selector:
matchLabels:
- {{- include "dubbo-admin.matchLabels" . | nindent 6 }}
+ {{- include "dubbo-admin.matchLabels" . | nindent 6 }}
{{- end -}}
diff --git a/charts/dubbo-admin/templates/rbac.yaml b/charts/dubbo-admin/templates/rbac.yaml
index 65f1ff3..d6c4a1b 100644
--- a/charts/dubbo-admin/templates/rbac.yaml
+++ b/charts/dubbo-admin/templates/rbac.yaml
@@ -13,15 +13,15 @@
name: {{ include "dubbo-admin.name" . }}
namespace: {{ include "dubbo-admin.namespace" . }}
rules:
- - apiGroups:
- - ""
- resources:
- - pods
- - deployments
- verbs:
- - get
- - watch
- - list
+- apiGroups:
+ - ""
+ resources:
+ - pods
+ - deployments
+ verbs:
+ - get
+ - watch
+ - list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
@@ -42,24 +42,24 @@
metadata:
name: {{ include "dubbo-admin.name" . }}-clusterrole
rules:
- - apiGroups:
- - ""
- resources:
- - pods
- - deployments
- verbs:
- - get
- - watch
- - list
+- apiGroups:
+ - ""
+ resources:
+ - pods
+ - deployments
+ verbs:
+ - get
+ - watch
+ - list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "dubbo-admin.name" . }}-clusterrolebinding
subjects:
- - kind: ServiceAccount
- name: dubbo-admin
- namespace: default
+- kind: ServiceAccount
+ name: dubbo-admin
+ namespace: default
roleRef:
kind: ClusterRole
name: {{ include "dubbo-admin.name" . }}-clusterrole
diff --git a/charts/dubbo-admin/values.yaml b/charts/dubbo-admin/values.yaml
index c229a46..7396f21 100644
--- a/charts/dubbo-admin/values.yaml
+++ b/charts/dubbo-admin/values.yaml
@@ -1,76 +1,120 @@
+# Used to override the default deployment name.
nameOverride: ~
-
+# Used to override the default namespace.
namespaceOverride: ~
-
+# Used to specify node labels for pod scheduling.
nodeSelector: ~
-
+# Used to define affinity rules for pods.
affinity: ~
-
+# Used to define toleration rules for pods.
tolerations: ~
-
+# Defines the number of replicas for pods.
replicas: 1
-
+# Used to specify secrets needed for pulling images.
imagePullSecrets: ~
image:
+ # Docker registry where the image is located.
registry: docker.io
+ # Repository containing the image.
repository: apache/dubbo-admin
+ # Tag of the image
tag: 0.5.0
+ # Pull policy for the image: IfNotPresent, Always, Never.
pullPolicy: IfNotPresent
serviceAccount:
+ # Enable or disable the creation of a service account.
enabled: false
+ # Labels to be applied to the service account.
labels: {}
+ # Annotations to be applied to the service account.
annotations: {}
rbac:
+ # Enable or disable Role-Based Access Control.
enabled: false
psp:
+ # Enable or disable the use of Pod Security Policies.
enabled: false
+ # Labels to be applied to Pod Security Policies.
labels: {}
+ # Annotations to be applied to Pod Security Policies.
annotations: {}
pdb:
+ # Enable or disable Pod Disruption Budget.
enabled: false
+ # Labels to be applied to the Pod Disruption Budget.
labels: {}
+ # Annotations to be applied to the Pod Disruption Budget.
annotations: {}
+ # Minimum number of pods that must remain available.
minAvailable: 1
+ # Maximum number of unavailable pods during disruptions.
maxUnavailable: 1
networkPolicy:
+ # Enable or disable the use of Network Policies.
enabled: false
readinessProbe:
+ # Configuration for HTTP GET probe.
httpGet:
+ # Path to perform HTTP GET request.
path: /
+ # Port on which to perform the HTTP GET request.
port: 8080
+ # Number of seconds after the container has started before readiness probes are initiated.
initialDelaySeconds: 60
+ # Number of seconds after which the probe times out.
timeoutSeconds: 30
+ # How often (in seconds) to perform the probe.
periodSeconds: 10
+ # Minimum consecutive successes for the probe to be considered successful after it has succeeded at least once.
successThreshold: 1
+ # Minimum consecutive failures for the probe to be considered failed after it has failed at least once.
failureThreshold: 3
+ # Timeout for executing the probe command.
probeCommandTimeout: 1
livenessProbe:
+ # Configuration for HTTP GET probe.
httpGet:
+ # Path to perform HTTP GET request.
path: /
+ # Port on which to perform the HTTP GET request.
port: 8080
+ # Number of seconds after the container has started before liveness probes are initiated.
initialDelaySeconds: 60
+ # Number of seconds after which the probe times out.
timeoutSeconds: 30
+ # How often (in seconds) to perform the probe.
periodSeconds: 10
+ # Minimum consecutive successes for the probe to be considered successful after it has succeeded at least once.
successThreshold: 1
+ # Minimum consecutive failures for the probe to be considered failed after it has failed at least once.
failureThreshold: 3
+ # Timeout for executing the probe command.
probeCommandTimeout: 1
startupProbe:
+ # Configuration for HTTP GET probe.
httpGet:
+ # Path to perform HTTP GET request.
path: /
+ # Port on which to perform the HTTP GET request.
port: 8080
+ # Number of seconds after the container has started before startup probes are initiated.
initialDelaySeconds: 60
+ # Number of seconds after which the probe times out.
timeoutSeconds: 30
+ # How often (in seconds) to perform the probe.
periodSeconds: 10
+ # Minimum consecutive successes for the probe to be considered successful after it has succeeded at least once.
successThreshold: 1
+ # Minimum consecutive failures for the probe to be considered failed after it has failed at least once.
failureThreshold: 3
resources: {}
@@ -82,87 +126,149 @@
# memory: 128Mi
service:
+ # Labels to be applied to the service.
labels: {}
+ # Annotations to be applied to the service.
annotations: {}
+ # Type of service (ClusterIP, NodePort, LoadBalancer, ExternalName).
type: ClusterIP
+ # Cluster IP address assigned to the service.
clusterIP: ""
+ # External IP addresses for the service.
externalIPs: ""
+ # LoadBalancer IP address for the service.
loadBalancerIP: ""
+ # IP ranges allowed to access the load balancer.
loadBalancerSourceRanges: ""
+ # Node port number for the service (if type is NodePort).
nodePort: ""
+ # Port on which the service is exposed.
port: 38080
+ # Target port to forward traffic to inside the pod.
targetPort: http
+ # Port that the container listens on.
containerPort: 8080
+ # Protocol used for the service (TCP, UDP, SCTP).
protocol: TCP
+ # Application protocol name.
appProtocol: ""
persistence:
+ # Enable or disable persistence
enabled: false
+ # Labels to be applied to the persistence volume claim
labels: {}
+ # Annotations to be applied to the persistence volume claim
annotations: {}
+ # Storage class to use for the persistent volume claim
storageClass: ""
+ # Access modes for the persistent volume claim (e.g., ReadWriteOnce, ReadOnlyMany, ReadWriteMany)
accessModes: ReadWriteOnce
+ # Size of the persistent volume claim
size: 10Gi
+ # Name of an existing PersistentVolumeClaim to use
ClaimName: {}
+ # Configuration for emptyDir volume if used
emptyDir: {}
user:
+ # Default username for the application
name: root
+ # Default password for the application
password: root
dubbo:
+ # Name of the Dubbo instance
name: dubbo-admin
+ # Logger configuration for Dubbo
logger: slf4j
check:
+ # Session timeout in milliseconds
sessionTimeoutMilli: 3600000
+ # Token timeout in milliseconds
tokenTimeoutMilli: 3600000
+ # Secret used for signing (leave as ~ for no value)
signSecret: ~
serverCompression:
+ # Enable or disable server compression
enabled: true
+ # Mime types to be compressed
mimeTypes: text/css,text/javascript,application/javascript
+ # Minimum response size (in bytes) to trigger compression
minResponseSize: 10240
zookeeper:
+ # Enable or disable Zookeeper
enabled: true
+ # Address of the Zookeeper instance
address: zookeeper://zookeeper:2181
nacos:
+ # Enable or disable Nacos
enabled: false
+ # Address of the Nacos instance
address: nacos://nacos:8848
+ # Nacos group
group: DEFAULT_GROUP
+ # Nacos namespace
namespace: public
apollo:
+ # Enable or disable Apollo
enabled: false
+ # Address of the Apollo instance
address: apollo://apollo:8070
+ # Token for authentication with Apollo (leave as ~ for no value)
token: ~
+ # Application ID registered in Apollo
appId: test
+ # Environment in Apollo
env: dev
+ # Cluster in Apollo
cluster: default
+ # Namespace in Apollo
namespace: dubbo
mysql:
+ # Enable or disable MySQL
enabled: false
+ # MySQL driver class name
driverClassName: com.mysql.jdbc.Driver
+ # Address of the MySQL instance
address: mysql://mysql:3306/dubbo-admin
+ # Encoding used by MySQL
encode: utf8
+ # Connection timeout in milliseconds
connectTimeout: 1000
+ # Socket timeout in milliseconds
socketTimeout: 10000
+ # Whether to automatically reconnect to MySQL on failure
autoReconnect: true
+ # MySQL username
username: sa
+ # MySQL password (leave as ~ for no value)
password: ~
h2:
+ # Enable or disable H2 database
enabled: true
+ # Mode of the H2 database (e.g., MYSQL, ORACLE)
mode: MYSQL
+ # Location of H2 memory database
mem: ~/dubbo-admin
+ # H2 username
username: sa
+ # H2 password (leave empty if not needed)
password:
mybatisPlus:
+ # Global configuration for MyBatis Plus
global:
db:
+ # ID type configuration for MyBatis Plus (e.g., auto, input, none)
idType: none
+
+