You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by to...@apache.org on 2021/02/03 12:41:03 UTC

[apisix-helm-chart] branch master updated: add apisix-dashboard helm chart (#27)

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

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git


The following commit(s) were added to refs/heads/master by this push:
     new c05e896  add apisix-dashboard helm chart (#27)
c05e896 is described below

commit c05e8963646b7bf9f421123070789f2a26996b34
Author: Jun <Ju...@users.noreply.github.com>
AuthorDate: Wed Feb 3 20:40:58 2021 +0800

    add apisix-dashboard helm chart (#27)
---
 README.md                                          |  62 +----------
 .../apisix => charts/apisix-dashboard}/.helmignore |   3 +
 .../apisix => charts/apisix-dashboard}/Chart.yaml  |  15 +--
 charts/apisix-dashboard/README.md                  |  36 ++++++
 charts/apisix-dashboard/templates/NOTES.txt        |  22 ++++
 .../apisix-dashboard}/templates/_helpers.tpl       |  37 +++++--
 charts/apisix-dashboard/templates/configmap.yaml   |  61 +++++++++++
 charts/apisix-dashboard/templates/deployment.yaml  |  86 +++++++++++++++
 .../apisix-dashboard}/templates/hpa.yaml           |  17 ++-
 charts/apisix-dashboard/templates/ingress.yaml     |  57 ++++++++++
 charts/apisix-dashboard/templates/service.yaml     |  31 ++++++
 .../apisix-dashboard/templates/serviceaccount.yaml |  28 +++++
 .../templates/tests/test-connection.yaml           |  15 +++
 charts/apisix-dashboard/values.yaml                | 121 +++++++++++++++++++++
 {chart => charts}/apisix/.helmignore               |   0
 {chart => charts}/apisix/Chart.yaml                |   0
 README.md => charts/apisix/README.md               |  18 +--
 {chart => charts}/apisix/templates/NOTES.txt       |   0
 {chart => charts}/apisix/templates/_helpers.tpl    |   0
 {chart => charts}/apisix/templates/configmap.yaml  |   0
 {chart => charts}/apisix/templates/deployment.yaml |   0
 {chart => charts}/apisix/templates/hpa.yaml        |   0
 .../apisix/templates/service-admin.yaml            |   0
 .../apisix/templates/service-gateway.yaml          |   0
 {chart => charts}/apisix/values.yaml               |   0
 25 files changed, 512 insertions(+), 97 deletions(-)

diff --git a/README.md b/README.md
index a563159..c6e5057 100644
--- a/README.md
+++ b/README.md
@@ -19,63 +19,7 @@
 
 # Apache APISIX Helm Charts
 
-## Dependencies
+Apache APISIX Helm Charts provide the installation of [Apache APISIX](https://github.com/apache/apisix#apache-apisix) components for kubernetes.
 
-Update the dependency chart 
-
-```shell
-$ helm repo add bitnami https://charts.bitnami.com/bitnami
-$ helm dependency update ./chart/apisix
-```
-
-## Install
-
-```shell
-$ helm install apisix ./chart/apisix -n default
-```
-
-## Uninstall
-
-```shell
-helm uninstall apisix ./chart/apisix -n default
-```
-
-## FAQ
-
-1. How to install APISIX only?
-
-The Charts will install etcd 3.4.14 by default. If you want to install Apache APISIX only, please set `etcd.enabled=false` and set `etcd.host={http://your_etcd_address:2379}`.
-
-Please use the FQDN address or the IP of the etcd.
-
-```shell
-# if etcd export by kubernetes service need spell fully qualified name
-$ helm install apisix ./chart/apisix -n default \
-    --set etcd.enabled=false \
-    --set etcd.host={http://etcd_node_1:2379\,http://etcd_node_2:2379}
-```
-
-2. Why get 403 when I access Apache APISIX admin api?
-
-We can define `allow.ipList` in CIDR.
-
-```shell
-$ helm install apisix ./chart/apisix -n default \
-    --set allow.ipList="10.22.100.12/8" \
-    --set allow.ipList="172.0.0.0/24"
-```
-
-If you want to allow all IPs for a quick test, just set `allow.ipList=""`
-
-```shell
-$ helm install apisix ./chart/apisix -n default \
-    --set allow.ipList=""
-```
-
-## Seeking help
-
-- Mailing List: Mail to dev-subscribe@apisix.apache.org, follow the reply to subscribe the mailing list.
-- QQ Group - 578997126, 552030619
-- [Slack Workspace](http://s.apache.org/slack-invite) - join `#apisix` on our Slack to meet the team and ask questions
-- ![Twitter Follow](https://img.shields.io/twitter/follow/ApacheAPISIX?style=social) - follow and interact with us using hashtag `#ApacheAPISIX`
-- [bilibili video](https://space.bilibili.com/551921247)
+- [Apache APISIX Helm Chart](https://github.com/apache/apisix-helm-chart/tree/master/charts/apisix)
+- [Apache APISIX Dashboard Helm Chart](https://github.com/apache/apisix-helm-chart/tree/master/charts/apisix-dashboard)
diff --git a/chart/apisix/.helmignore b/charts/apisix-dashboard/.helmignore
similarity index 52%
copy from chart/apisix/.helmignore
copy to charts/apisix-dashboard/.helmignore
index 351b35f..0e8a0eb 100644
--- a/chart/apisix/.helmignore
+++ b/charts/apisix-dashboard/.helmignore
@@ -1,3 +1,6 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
 .DS_Store
 # Common VCS dirs
 .git/
diff --git a/chart/apisix/Chart.yaml b/charts/apisix-dashboard/Chart.yaml
similarity index 89%
copy from chart/apisix/Chart.yaml
copy to charts/apisix-dashboard/Chart.yaml
index 9cf6a14..aab2eab 100644
--- a/chart/apisix/Chart.yaml
+++ b/charts/apisix-dashboard/Chart.yaml
@@ -15,8 +15,8 @@
 # limitations under the License.
 #
 apiVersion: v2
-name: apisix
-description: A Helm chart for Apache APISIX
+name: apisix-dashboard
+description: A Helm chart for Apache APISIX Dashboard
 
 # A chart can be either an 'application' or a 'library' chart.
 #
@@ -31,16 +31,9 @@ type: application
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
 # Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 0.1.1
+version: 0.1.0
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application. Versions are not expected to
 # follow Semantic Versioning. They should reflect the version the application is using.
-appVersion: 2.1.0
-
-dependencies:
-  - name: etcd
-    version: 5.2.1
-    repository: https://charts.bitnami.com/bitnami
-    condition: etcd.enabled
-
+appVersion: 2.3.0
diff --git a/charts/apisix-dashboard/README.md b/charts/apisix-dashboard/README.md
new file mode 100644
index 0000000..fd746cf
--- /dev/null
+++ b/charts/apisix-dashboard/README.md
@@ -0,0 +1,36 @@
+<!--
+#
+# 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.
+#
+-->
+
+# Apache APISIX Dashboard Helm Chart
+
+## Install
+
+To install the chart with release name `apisix-dashboard`:
+
+```shell
+$ helm install apisix-dashboard . -n default
+```
+
+## Uninstall
+
+To uninstall/delete the `apisix-dashboard` release:
+
+```shell
+$ helm uninstall apisix-dashboard . -n default
+```
diff --git a/charts/apisix-dashboard/templates/NOTES.txt b/charts/apisix-dashboard/templates/NOTES.txt
new file mode 100644
index 0000000..25b3521
--- /dev/null
+++ b/charts/apisix-dashboard/templates/NOTES.txt
@@ -0,0 +1,22 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range $host := .Values.ingress.hosts }}
+  {{- range .paths }}
+  http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
+  {{- end }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "apisix-dashboard.fullname" . }})
+  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 }}
+     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 "apisix-dashboard.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "apisix-dashboard.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "apisix-dashboard.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 }}
diff --git a/chart/apisix/templates/_helpers.tpl b/charts/apisix-dashboard/templates/_helpers.tpl
similarity index 50%
copy from chart/apisix/templates/_helpers.tpl
copy to charts/apisix-dashboard/templates/_helpers.tpl
index 27252c0..1bdd9c3 100644
--- a/chart/apisix/templates/_helpers.tpl
+++ b/charts/apisix-dashboard/templates/_helpers.tpl
@@ -1,8 +1,23 @@
-{{/* vim: set filetype=mustache: */}}
+#
+# 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.
+#
 {{/*
 Expand the name of the chart.
 */}}
-{{- define "apisix.name" -}}
+{{- define "apisix-dashboard.name" -}}
 {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
 {{- end }}
 
@@ -11,7 +26,7 @@ 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 "apisix.fullname" -}}
+{{- define "apisix-dashboard.fullname" -}}
 {{- if .Values.fullnameOverride }}
 {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
 {{- else }}
@@ -27,16 +42,16 @@ If release name contains chart name it will be used as a full name.
 {{/*
 Create chart name and version as used by the chart label.
 */}}
-{{- define "apisix.chart" -}}
+{{- define "apisix-dashboard.chart" -}}
 {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
 {{- end }}
 
 {{/*
 Common labels
 */}}
-{{- define "apisix.labels" -}}
-helm.sh/chart: {{ include "apisix.chart" . }}
-{{ include "apisix.selectorLabels" . }}
+{{- define "apisix-dashboard.labels" -}}
+helm.sh/chart: {{ include "apisix-dashboard.chart" . }}
+{{ include "apisix-dashboard.selectorLabels" . }}
 {{- if .Chart.AppVersion }}
 app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
 {{- end }}
@@ -46,17 +61,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
 {{/*
 Selector labels
 */}}
-{{- define "apisix.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "apisix.name" . }}
+{{- define "apisix-dashboard.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "apisix-dashboard.name" . }}
 app.kubernetes.io/instance: {{ .Release.Name }}
 {{- end }}
 
 {{/*
 Create the name of the service account to use
 */}}
-{{- define "apisix.serviceAccountName" -}}
+{{- define "apisix-dashboard.serviceAccountName" -}}
 {{- if .Values.serviceAccount.create }}
-{{- default (include "apisix.fullname" .) .Values.serviceAccount.name }}
+{{- default (include "apisix-dashboard.fullname" .) .Values.serviceAccount.name }}
 {{- else }}
 {{- default "default" .Values.serviceAccount.name }}
 {{- end }}
diff --git a/charts/apisix-dashboard/templates/configmap.yaml b/charts/apisix-dashboard/templates/configmap.yaml
new file mode 100644
index 0000000..484c127
--- /dev/null
+++ b/charts/apisix-dashboard/templates/configmap.yaml
@@ -0,0 +1,61 @@
+#
+# 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.
+#
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "apisix-dashboard.fullname" . }}
+  labels:
+    {{- include "apisix-dashboard.labels" . | nindent 4 }}
+data:
+  conf.yaml: |-
+    {{- with .Values.config.conf }}
+    conf:
+      listen:
+        host: {{ .listen.host }}
+        port: {{ .listen.port }}
+      {{- with .etcd }}
+      etcd:
+        endpoints:
+          {{- range .endpoints }}
+          - {{ . }}
+          {{- end }}
+        {{- if .username }}
+        username: {{ .username }}
+        {{- end }}
+        {{- if .password }}
+        password: {{ .password }}
+        {{- end }}
+      {{- end }}
+      {{- with .log }}
+      log:
+        error_log:
+          level: {{ .errorLog.level }}
+          file_path: {{ .errorLog.filePath }}
+        access_log:
+          file_path: {{ .accessLog.filePath }}
+      {{- end }}
+    {{- end }}
+    {{- with .Values.config.authentication }}
+    authentication:
+      secert: {{ .secert }}
+      expire_time: {{ .expireTime }}
+      users:
+        {{- range .users }}
+        - username: {{ .username }}
+          password: {{ .password }}
+        {{- end }}
+    {{- end }}
diff --git a/charts/apisix-dashboard/templates/deployment.yaml b/charts/apisix-dashboard/templates/deployment.yaml
new file mode 100644
index 0000000..bf633ec
--- /dev/null
+++ b/charts/apisix-dashboard/templates/deployment.yaml
@@ -0,0 +1,86 @@
+#
+# 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.
+#
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "apisix-dashboard.fullname" . }}
+  labels:
+    {{- include "apisix-dashboard.labels" . | nindent 4 }}
+spec:
+  {{- if not .Values.autoscaling.enabled }}
+  replicas: {{ .Values.replicaCount }}
+  {{- end }}
+  selector:
+    matchLabels:
+      {{- include "apisix-dashboard.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+        {{- with .Values.podAnnotations }}
+        {{- toYaml . | nindent 8 }}
+        {{- end }}
+      labels:
+        {{- include "apisix-dashboard.selectorLabels" . | nindent 8 }}
+    spec:
+      {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      serviceAccountName: {{ include "apisix-dashboard.serviceAccountName" . }}
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+      containers:
+        - name: {{ .Chart.Name }}
+          securityContext:
+            {{- toYaml .Values.securityContext | nindent 12 }}
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          ports:
+            - name: http
+              containerPort: {{ .Values.config.conf.listen.port }}
+              protocol: TCP
+          livenessProbe:
+            httpGet:
+              path: /ping
+              port: http
+          readinessProbe:
+            httpGet:
+              path: /ping
+              port: http
+          resources:
+            {{- toYaml .Values.resources | nindent 12 }}
+          volumeMounts:
+            - mountPath: /usr/local/apisix-dashboard/conf/conf.yaml
+              name: apisix-dashboard-config
+              subPath: conf.yaml
+      volumes:
+        - configMap:
+            name: {{ include "apisix-dashboard.fullname" . }}
+          name: apisix-dashboard-config
+      {{- with .Values.nodeSelector }}
+      nodeSelector:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .Values.affinity }}
+      affinity:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .Values.tolerations }}
+      tolerations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
diff --git a/chart/apisix/templates/hpa.yaml b/charts/apisix-dashboard/templates/hpa.yaml
similarity index 80%
copy from chart/apisix/templates/hpa.yaml
copy to charts/apisix-dashboard/templates/hpa.yaml
index 63347f0..cd8b931 100644
--- a/chart/apisix/templates/hpa.yaml
+++ b/charts/apisix-dashboard/templates/hpa.yaml
@@ -13,33 +13,32 @@
 # 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.
-
+#
 {{- if .Values.autoscaling.enabled }}
 apiVersion: autoscaling/v2beta1
 kind: HorizontalPodAutoscaler
 metadata:
-  name: {{ include "apisix.fullname" . }}
-  namespace: {{ .Release.Namespace }}
+  name: {{ include "apisix-dashboard.fullname" . }}
   labels:
-    {{- include "apisix.labels" . | nindent 4 }}
+    {{- include "apisix-dashboard.labels" . | nindent 4 }}
 spec:
   scaleTargetRef:
     apiVersion: apps/v1
     kind: Deployment
-    name: {{ include "apisix.fullname" . }}
+    name: {{ include "apisix-dashboard.fullname" . }}
   minReplicas: {{ .Values.autoscaling.minReplicas }}
   maxReplicas: {{ .Values.autoscaling.maxReplicas }}
   metrics:
-  {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+    {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
     - type: Resource
       resource:
         name: cpu
         targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
-  {{- end }}
-  {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+    {{- end }}
+    {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
     - type: Resource
       resource:
         name: memory
         targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
-  {{- end }}
+    {{- end }}
 {{- end }}
diff --git a/charts/apisix-dashboard/templates/ingress.yaml b/charts/apisix-dashboard/templates/ingress.yaml
new file mode 100644
index 0000000..8f43e91
--- /dev/null
+++ b/charts/apisix-dashboard/templates/ingress.yaml
@@ -0,0 +1,57 @@
+#
+# 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.
+#
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "apisix-dashboard.fullname" . -}}
+{{- $svcPort := .Values.service.port -}}
+{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1beta1
+{{- else -}}
+apiVersion: extensions/v1beta1
+{{- end }}
+kind: Ingress
+metadata:
+  name: {{ $fullName }}
+  labels:
+    {{- include "apisix-dashboard.labels" . | nindent 4 }}
+  {{- with .Values.ingress.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+  {{- if .Values.ingress.tls }}
+  tls:
+    {{- range .Values.ingress.tls }}
+    - hosts:
+        {{- range .hosts }}
+        - {{ . | quote }}
+        {{- end }}
+      secretName: {{ .secretName }}
+    {{- end }}
+  {{- end }}
+  rules:
+    {{- range .Values.ingress.hosts }}
+    - host: {{ .host | quote }}
+      http:
+        paths:
+          {{- range .paths }}
+          - path: {{ . }}
+            backend:
+              serviceName: {{ $fullName }}
+              servicePort: {{ $svcPort }}
+          {{- end }}
+    {{- end }}
+  {{- end }}
diff --git a/charts/apisix-dashboard/templates/service.yaml b/charts/apisix-dashboard/templates/service.yaml
new file mode 100644
index 0000000..2007652
--- /dev/null
+++ b/charts/apisix-dashboard/templates/service.yaml
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "apisix-dashboard.fullname" . }}
+  labels:
+    {{- include "apisix-dashboard.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    - port: {{ .Values.service.port }}
+      targetPort: http
+      protocol: TCP
+      name: http
+  selector:
+    {{- include "apisix-dashboard.selectorLabels" . | nindent 4 }}
diff --git a/charts/apisix-dashboard/templates/serviceaccount.yaml b/charts/apisix-dashboard/templates/serviceaccount.yaml
new file mode 100644
index 0000000..9b0b5b7
--- /dev/null
+++ b/charts/apisix-dashboard/templates/serviceaccount.yaml
@@ -0,0 +1,28 @@
+#
+# 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.
+#
+{{- if .Values.serviceAccount.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ include "apisix-dashboard.serviceAccountName" . }}
+  labels:
+    {{- include "apisix-dashboard.labels" . | nindent 4 }}
+  {{- with .Values.serviceAccount.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+{{- end }}
diff --git a/charts/apisix-dashboard/templates/tests/test-connection.yaml b/charts/apisix-dashboard/templates/tests/test-connection.yaml
new file mode 100644
index 0000000..0270078
--- /dev/null
+++ b/charts/apisix-dashboard/templates/tests/test-connection.yaml
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: Pod
+metadata:
+  name: "{{ include "apisix-dashboard.fullname" . }}-test-connection"
+  labels:
+    {{- include "apisix-dashboard.labels" . | nindent 4 }}
+  annotations:
+    "helm.sh/hook": test
+spec:
+  containers:
+    - name: wget
+      image: busybox
+      command: ['wget']
+      args: ['{{ include "apisix-dashboard.fullname" . }}:{{ .Values.service.port }}']
+  restartPolicy: Never
diff --git a/charts/apisix-dashboard/values.yaml b/charts/apisix-dashboard/values.yaml
new file mode 100644
index 0000000..65f6049
--- /dev/null
+++ b/charts/apisix-dashboard/values.yaml
@@ -0,0 +1,121 @@
+#
+# 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 apisix-dashboard.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+image:
+  repository: apache/apisix-dashboard
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: "2.3"
+
+imagePullSecrets: []
+nameOverride: ""
+fullnameOverride: ""
+
+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: ""
+
+podAnnotations: {}
+
+podSecurityContext: {}
+  # fsGroup: 2000
+
+securityContext: {}
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+config:
+  conf:
+    listen:
+      host: 0.0.0.0
+      port: 9000
+    etcd:
+      # Supports defining multiple etcd host addresses for an etcd cluster
+      endpoints:
+        - apisix-etcd:2379
+      # Etcd basic auth info
+      username: ~
+      password: ~
+    log:
+      errorLog:
+        level: warn
+        filePath: /dev/stderr
+      accessLog:
+        filePath: /dev/stdout
+
+  authentication:
+    secert: secert
+    expireTime: 3600
+    users:
+      - username: admin
+        password: admin
+
+service:
+  type: ClusterIP
+  port: 80
+
+ingress:
+  enabled: false
+  annotations: {}
+    # kubernetes.io/ingress.class: nginx
+    # kubernetes.io/tls-acme: "true"
+  hosts:
+    - host: apisix-dashboard.local
+      paths: []
+  tls: []
+  #  - secretName: chart-example-tls
+  #    hosts:
+  #      - chart-example.local
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+autoscaling:
+  enabled: false
+  minReplicas: 1
+  maxReplicas: 100
+  targetCPUUtilizationPercentage: 80
+  # targetMemoryUtilizationPercentage: 80
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/chart/apisix/.helmignore b/charts/apisix/.helmignore
similarity index 100%
rename from chart/apisix/.helmignore
rename to charts/apisix/.helmignore
diff --git a/chart/apisix/Chart.yaml b/charts/apisix/Chart.yaml
similarity index 100%
rename from chart/apisix/Chart.yaml
rename to charts/apisix/Chart.yaml
diff --git a/README.md b/charts/apisix/README.md
similarity index 87%
copy from README.md
copy to charts/apisix/README.md
index a563159..092b532 100644
--- a/README.md
+++ b/charts/apisix/README.md
@@ -17,7 +17,7 @@
 #
 -->
 
-# Apache APISIX Helm Charts
+# Apache APISIX Helm Chart
 
 ## Dependencies
 
@@ -25,19 +25,23 @@ Update the dependency chart
 
 ```shell
 $ helm repo add bitnami https://charts.bitnami.com/bitnami
-$ helm dependency update ./chart/apisix
+$ helm dependency update .
 ```
 
 ## Install
 
+To install the chart with release name `apisix`:
+
 ```shell
-$ helm install apisix ./chart/apisix -n default
+$ helm install apisix . -n default
 ```
 
 ## Uninstall
 
+To uninstall/delete the `apisix` release:
+
 ```shell
-helm uninstall apisix ./chart/apisix -n default
+helm uninstall apisix . -n default
 ```
 
 ## FAQ
@@ -50,7 +54,7 @@ Please use the FQDN address or the IP of the etcd.
 
 ```shell
 # if etcd export by kubernetes service need spell fully qualified name
-$ helm install apisix ./chart/apisix -n default \
+$ helm install apisix . -n default \
     --set etcd.enabled=false \
     --set etcd.host={http://etcd_node_1:2379\,http://etcd_node_2:2379}
 ```
@@ -60,7 +64,7 @@ $ helm install apisix ./chart/apisix -n default \
 We can define `allow.ipList` in CIDR.
 
 ```shell
-$ helm install apisix ./chart/apisix -n default \
+$ helm install apisix . -n default \
     --set allow.ipList="10.22.100.12/8" \
     --set allow.ipList="172.0.0.0/24"
 ```
@@ -68,7 +72,7 @@ $ helm install apisix ./chart/apisix -n default \
 If you want to allow all IPs for a quick test, just set `allow.ipList=""`
 
 ```shell
-$ helm install apisix ./chart/apisix -n default \
+$ helm install apisix . -n default \
     --set allow.ipList=""
 ```
 
diff --git a/chart/apisix/templates/NOTES.txt b/charts/apisix/templates/NOTES.txt
similarity index 100%
rename from chart/apisix/templates/NOTES.txt
rename to charts/apisix/templates/NOTES.txt
diff --git a/chart/apisix/templates/_helpers.tpl b/charts/apisix/templates/_helpers.tpl
similarity index 100%
rename from chart/apisix/templates/_helpers.tpl
rename to charts/apisix/templates/_helpers.tpl
diff --git a/chart/apisix/templates/configmap.yaml b/charts/apisix/templates/configmap.yaml
similarity index 100%
rename from chart/apisix/templates/configmap.yaml
rename to charts/apisix/templates/configmap.yaml
diff --git a/chart/apisix/templates/deployment.yaml b/charts/apisix/templates/deployment.yaml
similarity index 100%
rename from chart/apisix/templates/deployment.yaml
rename to charts/apisix/templates/deployment.yaml
diff --git a/chart/apisix/templates/hpa.yaml b/charts/apisix/templates/hpa.yaml
similarity index 100%
rename from chart/apisix/templates/hpa.yaml
rename to charts/apisix/templates/hpa.yaml
diff --git a/chart/apisix/templates/service-admin.yaml b/charts/apisix/templates/service-admin.yaml
similarity index 100%
rename from chart/apisix/templates/service-admin.yaml
rename to charts/apisix/templates/service-admin.yaml
diff --git a/chart/apisix/templates/service-gateway.yaml b/charts/apisix/templates/service-gateway.yaml
similarity index 100%
rename from chart/apisix/templates/service-gateway.yaml
rename to charts/apisix/templates/service-gateway.yaml
diff --git a/chart/apisix/values.yaml b/charts/apisix/values.yaml
similarity index 100%
rename from chart/apisix/values.yaml
rename to charts/apisix/values.yaml