Skip to content

Commit

Permalink
refactor: second edition (#1271)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfordjody authored Apr 6, 2024
1 parent 42fa95f commit 92cc134
Show file tree
Hide file tree
Showing 9 changed files with 192 additions and 62 deletions.
17 changes: 7 additions & 10 deletions charts/README.md
Original file line number Diff line number Diff line change
@@ -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

```bash
helm install [RELEASE_NAME] dubbo-admin --namespace dubbo-system --create-namespace
```

### Uninstall
## Usage

```bash
helm delete [RELEASE_NAME] --namespace dubbo-system
helm install dubbo-admin charts/dubbo-admin
```
4 changes: 2 additions & 2 deletions charts/dubbo-admin/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.vscode
.project
.idea/
*.tmproj
OWNERS
.vscode/
14 changes: 6 additions & 8 deletions charts/dubbo-admin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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: [email protected]
name: dubbo
sources:
- https://github.com/apache/dubbo
- name: dubbo
email: [email protected]
type: application
version: 0.5.0
14 changes: 1 addition & 13 deletions charts/dubbo-admin/README.md
Original file line number Diff line number Diff line change
@@ -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 .
```
41 changes: 41 additions & 0 deletions charts/dubbo-admin/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion charts/dubbo-admin/templates/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
successThreshold: {{ .Values.startupProbe.successThreshold }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: application-properties
configMap:
Expand Down
2 changes: 1 addition & 1 deletion charts/dubbo-admin/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ spec:
{{- end }}
selector:
matchLabels:
{{- include "dubbo-admin.matchLabels" . | nindent 6 }}
{{- include "dubbo-admin.matchLabels" . | nindent 6 }}
{{- end -}}
42 changes: 21 additions & 21 deletions charts/dubbo-admin/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ metadata:
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
Expand All @@ -42,24 +42,24 @@ kind: ClusterRole
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
Expand Down
Loading

0 comments on commit 92cc134

Please sign in to comment.