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

[apisix-ingress-controller] branch master updated: feat: refactoring helm chart (#213)

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

kvn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new b51bd46  feat: refactoring helm chart (#213)
b51bd46 is described below

commit b51bd46e17235be589979f503ab56dd927cf5d07
Author: Jun <Ju...@users.noreply.github.com>
AuthorDate: Wed Feb 3 09:31:18 2021 +0800

    feat: refactoring helm chart (#213)
    
    * refactoring helm chart
    
    * upgrade to 0.2.0 for default
---
 .gitignore                                         |  2 +-
 .../.helmignore                                    |  0
 .../Chart.yaml                                     |  5 +-
 .../README.md}                                     | 41 +++++++-----
 .../crds/customresourcedefinitions.yaml            |  0
 .../templates/NOTES.txt                            |  2 +-
 .../templates/_helpers.tpl                         | 26 ++++----
 .../templates/configmap.yaml                       | 22 +++----
 .../templates/deployment.yaml                      | 32 +++++-----
 .../templates/hpa.yaml                             | 20 +++---
 .../templates/rbac.yaml                            |  9 +--
 .../templates/service-account.yaml}                | 17 ++---
 .../templates/service.yaml                         | 10 +--
 charts/apisix-ingress-controller/values.yaml       | 72 ++++++++++++++++++++++
 charts/base/.helmignore                            | 23 -------
 charts/base/templates/NOTES.txt                    |  1 -
 charts/base/templates/_helpers.tpl                 | 68 --------------------
 charts/ingress-apisix/values.yaml                  | 61 ------------------
 docs/deployments/ack.md                            | 12 ++--
 docs/deployments/aws.md                            | 12 ++--
 docs/deployments/azure.md                          | 11 ++--
 docs/deployments/gke.md                            | 12 ++--
 docs/deployments/k3s-rke.md                        | 12 ++--
 docs/deployments/kubesphere.md                     | 12 ++--
 docs/deployments/minikube.md                       | 11 ++--
 docs/deployments/tke.md                            | 12 ++--
 26 files changed, 207 insertions(+), 298 deletions(-)

diff --git a/.gitignore b/.gitignore
index 61ba3f1..eb37d61 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,5 +16,5 @@ release
 .DS_Store
 coverage.txt
 test/e2e/coverage.txt
-apisix-ingress-controller
+./apisix-ingress-controller
 .actions/openwhisk-utilities
diff --git a/charts/ingress-apisix/.helmignore b/charts/apisix-ingress-controller/.helmignore
similarity index 100%
rename from charts/ingress-apisix/.helmignore
rename to charts/apisix-ingress-controller/.helmignore
diff --git a/charts/ingress-apisix/Chart.yaml b/charts/apisix-ingress-controller/Chart.yaml
similarity index 94%
rename from charts/ingress-apisix/Chart.yaml
rename to charts/apisix-ingress-controller/Chart.yaml
index 991c077..80fa853 100644
--- a/charts/ingress-apisix/Chart.yaml
+++ b/charts/apisix-ingress-controller/Chart.yaml
@@ -15,13 +15,14 @@
 # limitations under the License.
 #
 apiVersion: v2
-name: ingress-apisix
+name: apisix-ingress-controller
 description: Apache APISIX Ingress Controller for Kubernetes
 icon: https://apache.org/logos/res/apisix/apisix.png
 keywords:
   - ingress
   - apisix
   - nginx
+  - crd
 type: application
 version: 0.1.0
-appVersion: 0.1.0
+appVersion: 0.2.0
diff --git a/charts/ingress-apisix/templates/service.yaml b/charts/apisix-ingress-controller/README.md
similarity index 58%
copy from charts/ingress-apisix/templates/service.yaml
copy to charts/apisix-ingress-controller/README.md
index a4de583..741e625 100644
--- a/charts/ingress-apisix/templates/service.yaml
+++ b/charts/apisix-ingress-controller/README.md
@@ -1,3 +1,4 @@
+<!--
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -14,18 +15,28 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "ingress-apisix.fullname" . }}
-  labels:
-    {{- include "ingress-apisix.labels" . | nindent 4 }}
-spec:
-  type: ClusterIP
-  ports:
-    - port: {{ .Values.ingressController.service.port }}
-      targetPort: {{ (.Values.ingressController.config.httpListen | split ":")._1 }}
-      protocol: TCP
-      name: http
-  selector:
-    {{- include "ingress-apisix.selectorLabels" . | nindent 4 }}
+-->
+
+# Apache APISIX Ingress Controller Helm Chart
+
+## Prerequisites
+
+- Kubernetes 1.12+
+- [Apache APISIX](https://github.com/apache/apisix#configure-and-installation)
+- [Helm v3.0+](https://helm.sh/docs/intro/quickstart/#install-helm)
+
+## Install
+
+To install the chart with release name `apisix-ingress-controller`:
+
+```bash
+helm install apisix-ingress-controller --namespace ingress-apisix .
+```
+
+## Uninstall
+
+To uninstall/delete the `apisix-ingress-controller` release:
+
+```bash
+helm uninstall apisix-ingress-controller --namespace ingress-apisix
+```
diff --git a/charts/base/crds/customresourcedefinitions.yaml b/charts/apisix-ingress-controller/crds/customresourcedefinitions.yaml
similarity index 100%
rename from charts/base/crds/customresourcedefinitions.yaml
rename to charts/apisix-ingress-controller/crds/customresourcedefinitions.yaml
diff --git a/charts/ingress-apisix/templates/NOTES.txt b/charts/apisix-ingress-controller/templates/NOTES.txt
similarity index 70%
rename from charts/ingress-apisix/templates/NOTES.txt
rename to charts/apisix-ingress-controller/templates/NOTES.txt
index dda31fd..7cac1e3 100644
--- a/charts/ingress-apisix/templates/NOTES.txt
+++ b/charts/apisix-ingress-controller/templates/NOTES.txt
@@ -1,5 +1,5 @@
 Get the application URL by running these commands:
-export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "ingress-apisix.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "apisix-ingress-controller.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
diff --git a/charts/ingress-apisix/templates/_helpers.tpl b/charts/apisix-ingress-controller/templates/_helpers.tpl
similarity index 72%
rename from charts/ingress-apisix/templates/_helpers.tpl
rename to charts/apisix-ingress-controller/templates/_helpers.tpl
index b52627c..b2a98f2 100644
--- a/charts/ingress-apisix/templates/_helpers.tpl
+++ b/charts/apisix-ingress-controller/templates/_helpers.tpl
@@ -18,7 +18,7 @@
 {{/*
 Expand the name of the chart.
 */}}
-{{- define "ingress-apisix.name" -}}
+{{- define "apisix-ingress-controller.name" -}}
 {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
 {{- end }}
 
@@ -27,7 +27,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 "ingress-apisix.fullname" -}}
+{{- define "apisix-ingress-controller.fullname" -}}
 {{- if .Values.fullnameOverride }}
 {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
 {{- else }}
@@ -43,16 +43,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 "ingress-apisix.chart" -}}
+{{- define "apisix-ingress-controller.chart" -}}
 {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
 {{- end }}
 
 {{/*
 Common labels
 */}}
-{{- define "ingress-apisix.labels" -}}
-helm.sh/chart: {{ include "ingress-apisix.chart" . }}
-{{ include "ingress-apisix.selectorLabels" . }}
+{{- define "apisix-ingress-controller.labels" -}}
+helm.sh/chart: {{ include "apisix-ingress-controller.chart" . }}
+{{ include "apisix-ingress-controller.selectorLabels" . }}
 {{- if .Chart.AppVersion }}
 app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
 {{- end }}
@@ -62,19 +62,19 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
 {{/*
 Selector labels
 */}}
-{{- define "ingress-apisix.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "ingress-apisix.name" . }}
+{{- define "apisix-ingress-controller.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "apisix-ingress-controller.name" . }}
 app.kubernetes.io/instance: {{ .Release.Name }}
 
 {{- end }}
 
 {{/*
-Create the name of the clusterrole to use
+Create the name of the service account to use
 */}}
-{{- define "ingress-apisix.clusterRole" -}}
-{{- if .Values.rbac.enable }}
-{{- default (include "ingress-apisix.fullname" .) .Values.rbac.clusterRole }}
+{{- define "apisix-ingress-controller.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "apisix-ingress-controller.fullname" .) .Values.serviceAccount.name }}
 {{- else }}
-{{- default "default" .Values.rbac.clusterRole }}
+{{- default "default" .Values.serviceAccount.name }}
 {{- end }}
 {{- end }}
diff --git a/charts/ingress-apisix/templates/configmap.yaml b/charts/apisix-ingress-controller/templates/configmap.yaml
similarity index 54%
rename from charts/ingress-apisix/templates/configmap.yaml
rename to charts/apisix-ingress-controller/templates/configmap.yaml
index bd1ebc6..f80988d 100644
--- a/charts/ingress-apisix/templates/configmap.yaml
+++ b/charts/apisix-ingress-controller/templates/configmap.yaml
@@ -18,24 +18,24 @@ apiVersion: v1
 data:
   config.yaml: |
     # log options
-    log_level: {{ .Values.ingressController.config.logLevel | quote }}
-    log_output: {{ .Values.ingressController.config.logOutput | quote }}
-    http_listen: {{ .Values.ingressController.config.httpListen | quote }}
-    enable_profiling: {{ .Values.ingressController.config.enableProfiling }}
+    log_level: {{ .Values.config.logLevel | quote }}
+    log_output: {{ .Values.config.logOutput | quote }}
+    http_listen: {{ .Values.config.httpListen | quote }}
+    enable_profiling: {{ .Values.config.enableProfiling }}
     kubernetes:
-      kubeconfig: {{ .Values.ingressController.config.kubernetes.kubeconfig | quote }}
-      resync_interval: {{ .Values.ingressController.config.kubernetes.resyncInterval | quote }}
-      {{- if gt (len .Values.ingressController.config.kubernetes.appNamespaces) 0 }}
+      kubeconfig: {{ .Values.config.kubernetes.kubeconfig | quote }}
+      resync_interval: {{ .Values.config.kubernetes.resyncInterval | quote }}
+      {{- if gt (len .Values.config.kubernetes.appNamespaces) 0 }}
       app_namespaces:
-      {{- range .Values.ingressController.config.kubernetes.appNamespaces }}
+      {{- range .Values.config.kubernetes.appNamespaces }}
       - {{ . | quote }}
       {{- end }}
       {{- end }}
     apisix:
-      base_url: {{ .Values.ingressController.config.apisix.baseURL | quote }}
-      admin_key: {{ .Values.ingressController.config.apisix.adminKey | quote }}
+      base_url: {{ .Values.config.apisix.baseURL | quote }}
+      admin_key: {{ .Values.config.apisix.adminKey | quote }}
 kind: ConfigMap
 metadata:
   name: {{ .Release.Name }}-configmap
   labels:
-    {{- include "ingress-apisix.labels" . | nindent 4 }}
+    {{- include "apisix-ingress-controller.labels" . | nindent 4 }}
diff --git a/charts/ingress-apisix/templates/deployment.yaml b/charts/apisix-ingress-controller/templates/deployment.yaml
similarity index 65%
rename from charts/ingress-apisix/templates/deployment.yaml
rename to charts/apisix-ingress-controller/templates/deployment.yaml
index b103ebd..c71761b 100644
--- a/charts/ingress-apisix/templates/deployment.yaml
+++ b/charts/apisix-ingress-controller/templates/deployment.yaml
@@ -17,26 +17,26 @@
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: {{ include "ingress-apisix.fullname" . }}
+  name: {{ include "apisix-ingress-controller.fullname" . }}
   labels:
-    {{- include "ingress-apisix.labels" . | nindent 4 }}
+    {{- include "apisix-ingress-controller.labels" . | nindent 4 }}
 spec:
-  {{- if not .Values.ingressController.autoscaling.enabled }}
-  replicas: {{ .Values.ingressController.replicaCount }}
+  {{- if not .Values.autoscaling.enabled }}
+  replicas: {{ .Values.replicaCount }}
   {{- end }}
   selector:
     matchLabels:
-      {{- include "ingress-apisix.selectorLabels" . | nindent 6 }}
+      {{- include "apisix-ingress-controller.selectorLabels" . | nindent 6 }}
   template:
     metadata:
       labels:
-        {{- include "ingress-apisix.selectorLabels" . | nindent 8 }}
+        {{- include "apisix-ingress-controller.selectorLabels" . | nindent 8 }}
     spec:
-      {{- with .Values.ingressController.imagePullSecrets }}
+      {{- with .Values.imagePullSecrets }}
       imagePullSecrets:
         {{- toYaml . | nindent 8 }}
       {{- end }}
-      serviceAccountName: {{ .Values.ingressController.serviceAccount }}
+      serviceAccountName: {{ include "apisix-ingress-controller.serviceAccountName" . }}
       volumes:
         - name: configuration
           configMap:
@@ -51,22 +51,22 @@ spec:
             - ingress
             - --config-path
             - /ingress-apisix/conf/config.yaml
-          image: "{{ .Values.ingressController.image.repository }}:{{ .Values.ingressController.image.tag | default .Chart.AppVersion }}"
-          imagePullPolicy: {{ .Values.ingressController.image.pullPolicy }}
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
           ports:
             - name: http
-              containerPort: {{ (.Values.ingressController.config.httpListen | split ":")._1 }}
+              containerPort: {{ (.Values.config.httpListen | split ":")._1 }}
               protocol: TCP
           livenessProbe:
             httpGet:
               path: /healthz
-              port: {{ (.Values.ingressController.config.httpListen | split ":")._1 }}
+              port: {{ (.Values.config.httpListen | split ":")._1 }}
           readinessProbe:
             httpGet:
               path: /healthz
-              port: {{ (.Values.ingressController.config.httpListen | split ":")._1 }}
+              port: {{ (.Values.config.httpListen | split ":")._1 }}
           resources:
-            {{- toYaml .Values.ingressController.resources | nindent 12 }}
+            {{- toYaml .Values.resources | nindent 12 }}
           volumeMounts:
             - mountPath: /ingress-apisix/conf
               name: configuration
@@ -79,11 +79,11 @@ spec:
             valueFrom:
               fieldRef:
                 fieldPath: metadata.name
-      {{- with .Values.ingressController.nodeSelector }}
+      {{- with .Values.nodeSelector }}
       nodeSelector:
         {{- toYaml . | nindent 8 }}
       {{- end }}
-      {{- with .Values.ingressController.tolerations }}
+      {{- with .Values.tolerations }}
       tolerations:
         {{- toYaml . | nindent 8 }}
       {{- end }}
diff --git a/charts/ingress-apisix/templates/hpa.yaml b/charts/apisix-ingress-controller/templates/hpa.yaml
similarity index 59%
rename from charts/ingress-apisix/templates/hpa.yaml
rename to charts/apisix-ingress-controller/templates/hpa.yaml
index 9edabf3..b959386 100644
--- a/charts/ingress-apisix/templates/hpa.yaml
+++ b/charts/apisix-ingress-controller/templates/hpa.yaml
@@ -14,31 +14,31 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-  {{- if .Values.ingressController.autoscaling.enabled }}
+  {{- if .Values.autoscaling.enabled }}
 apiVersion: autoscaling/v2beta1
 kind: HorizontalPodAutoscaler
 metadata:
-  name: {{ include "ingress-apisix.fullname" . }}
+  name: {{ include "apisix-ingress-controller.fullname" . }}
   labels:
-    {{- include "ingress-apisix.labels" . | nindent 4 }}
+    {{- include "apisix-ingress-controller.labels" . | nindent 4 }}
 spec:
   scaleTargetRef:
     apiVersion: apps/v1
     kind: Deployment
-    name: {{ include "ingress-apisix.fullname" . }}
-  minReplicas: {{ .Values.ingressController.autoscaling.minReplicas }}
-  maxReplicas: {{ .Values.ingressController.autoscaling.maxReplicas }}
+    name: {{ include "apisix-ingress-controller.fullname" . }}
+  minReplicas: {{ .Values.autoscaling.minReplicas }}
+  maxReplicas: {{ .Values.autoscaling.maxReplicas }}
   metrics:
-    {{- if .Values.ingressController.autoscaling.targetCPUUtilizationPercentage }}
+    {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
     - type: Resource
       resource:
         name: cpu
-        targetAverageUtilization: {{ .Values.ingressController.autoscaling.targetCPUUtilizationPercentage }}
+        targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
     {{- end }}
-    {{- if .Values.ingressController.autoscaling.targetMemoryUtilizationPercentage }}
+    {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
     - type: Resource
       resource:
         name: memory
-        targetAverageUtilization: {{ .Values.ingressController.autoscaling.targetMemoryUtilizationPercentage }}
+        targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
     {{- end }}
 {{- end }}
diff --git a/charts/base/templates/rbac.yaml b/charts/apisix-ingress-controller/templates/rbac.yaml
similarity index 95%
rename from charts/base/templates/rbac.yaml
rename to charts/apisix-ingress-controller/templates/rbac.yaml
index 22fd2a9..e6133e0 100644
--- a/charts/base/templates/rbac.yaml
+++ b/charts/apisix-ingress-controller/templates/rbac.yaml
@@ -14,11 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: {{ .Release.Name }}-serviceaccount
----
+{{- if .Values.rbac.create }}
 apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRole
 metadata:
@@ -157,5 +153,6 @@ roleRef:
   name: {{ .Release.Name }}-clusterrole
 subjects:
   - kind: ServiceAccount
-    name: {{ .Release.Name }}-serviceaccount
+    name: {{ include "apisix-ingress-controller.serviceAccountName" . }}
     namespace: {{ .Release.Namespace }}
+{{- end }}
diff --git a/charts/base/Chart.yaml b/charts/apisix-ingress-controller/templates/service-account.yaml
similarity index 76%
rename from charts/base/Chart.yaml
rename to charts/apisix-ingress-controller/templates/service-account.yaml
index cad9b06..f749221 100644
--- a/charts/base/Chart.yaml
+++ b/charts/apisix-ingress-controller/templates/service-account.yaml
@@ -14,14 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-apiVersion: v2
-name: base
-description: Helm chart for deploying ingress-apisix cluster resources and CRDs
-icon: https://apache.org/logos/res/apisix/apisix.png
-keywords:
-  - ingress
-  - apisix
-  - nginx
-  - crd
-type: application
-version: 0.1.0
+{{- if .Values.serviceAccount.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ include "apisix-ingress-controller.serviceAccountName" . }}
+{{- end }}
diff --git a/charts/ingress-apisix/templates/service.yaml b/charts/apisix-ingress-controller/templates/service.yaml
similarity index 74%
rename from charts/ingress-apisix/templates/service.yaml
rename to charts/apisix-ingress-controller/templates/service.yaml
index a4de583..00d94e3 100644
--- a/charts/ingress-apisix/templates/service.yaml
+++ b/charts/apisix-ingress-controller/templates/service.yaml
@@ -17,15 +17,15 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "ingress-apisix.fullname" . }}
+  name: {{ include "apisix-ingress-controller.fullname" . }}
   labels:
-    {{- include "ingress-apisix.labels" . | nindent 4 }}
+    {{- include "apisix-ingress-controller.labels" . | nindent 4 }}
 spec:
   type: ClusterIP
   ports:
-    - port: {{ .Values.ingressController.service.port }}
-      targetPort: {{ (.Values.ingressController.config.httpListen | split ":")._1 }}
+    - port: {{ .Values.service.port }}
+      targetPort: {{ (.Values.config.httpListen | split ":")._1 }}
       protocol: TCP
       name: http
   selector:
-    {{- include "ingress-apisix.selectorLabels" . | nindent 4 }}
+    {{- include "apisix-ingress-controller.selectorLabels" . | nindent 4 }}
diff --git a/charts/apisix-ingress-controller/values.yaml b/charts/apisix-ingress-controller/values.yaml
new file mode 100644
index 0000000..465f0ec
--- /dev/null
+++ b/charts/apisix-ingress-controller/values.yaml
@@ -0,0 +1,72 @@
+#
+# 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-ingress-controller.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+#
+nameOverride: ""
+
+fullnameOverride: ""
+
+rbac:
+  # Specifies whether RBAC resources should be created
+  create: true
+
+serviceAccount:
+  # Specifies whether a ServiceAccount should be created
+  create: true
+  # The name of the ServiceAccount to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: ~
+
+replicaCount: 1
+
+image:
+  repository: apache/apisix-ingress-controller
+  pullPolicy: IfNotPresent
+  tag: "0.2.0"
+
+imagePullSecrets: []
+
+service:
+  port: 80
+
+config:
+  logLevel: "info"
+  logOutput: "stderr"
+  httpListen: ":8080"
+  enableProfiling: true
+  kubernetes:
+    kubeconfig: ""
+    resyncInterval: "60s"
+    appNamespaces: ["*"]
+  apisix:
+    baseURL: "http://127.0.0.1:9080/apisix/admin"
+    adminKey: "edd1c9f034335f136f87ad84b625c8f1"
+
+resources: {}
+
+autoscaling:
+  enabled: false
+  minReplicas: 1
+  maxReplicas: 100
+  targetCPUUtilizationPercentage: 80
+  # targetMemoryUtilizationPercentage: 80
+
+nodeSelector: {}
+tolerations: []
diff --git a/charts/base/.helmignore b/charts/base/.helmignore
deleted file mode 100644
index 0e8a0eb..0000000
--- a/charts/base/.helmignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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/
-.gitignore
-.bzr/
-.bzrignore
-.hg/
-.hgignore
-.svn/
-# Common backup files
-*.swp
-*.bak
-*.tmp
-*.orig
-*~
-# Various IDEs
-.project
-.idea/
-*.tmproj
-.vscode/
diff --git a/charts/base/templates/NOTES.txt b/charts/base/templates/NOTES.txt
deleted file mode 100644
index 44dc576..0000000
--- a/charts/base/templates/NOTES.txt
+++ /dev/null
@@ -1 +0,0 @@
-Installs ingress-apisix cluster resources: CRDs, cluster bindings and associated service accounts.
diff --git a/charts/base/templates/_helpers.tpl b/charts/base/templates/_helpers.tpl
deleted file mode 100644
index 6131f0d..0000000
--- a/charts/base/templates/_helpers.tpl
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# 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 "base.name" -}}
-{{- default .Chart.Name .Values.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 "base.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 }}
-{{- end }}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "base.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
-{{- end }}
-
-{{/*
-Common labels
-*/}}
-{{- define "base.labels" -}}
-helm.sh/chart: {{ include "base.chart" . }}
-{{ include "base.selectorLabels" . }}
-{{- if .Chart.AppVersion }}
-app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
-{{- end }}
-app.kubernetes.io/managed-by: {{ .Release.Service }}
-{{- end }}
-
-{{/*
-Selector labels
-*/}}
-{{- define "base.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "base.name" . }}
-app.kubernetes.io/instance: {{ .Release.Name }}
-{{- end }}
diff --git a/charts/ingress-apisix/values.yaml b/charts/ingress-apisix/values.yaml
deleted file mode 100644
index 0336392..0000000
--- a/charts/ingress-apisix/values.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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 ingress-apisix.
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
-
-ingressController:
-  replicaCount: 1
-
-  image:
-    repository: apache/apisix-ingress-controller
-    pullPolicy: IfNotPresent
-    tag: "0.1.0"
-
-  imagePullSecrets: []
-  nameOverride: ""
-  fullnameOverride: ""
-  serviceAccount: "ingress-apisix-base-serviceaccount"
-
-  service:
-    port: 80
-
-  config:
-    logLevel: "info"
-    logOutput: "stderr"
-    httpListen: ":8080"
-    enableProfiling: true
-    kubernetes:
-      kubeconfig: ""
-      resyncInterval: "60s"
-      appNamespaces: ["*"]
-    apisix:
-      baseURL: "http://127.0.0.1:9080/apisix/admin"
-      adminKey: "edd1c9f034335f136f87ad84b625c8f1"
-
-  resources: {}
-
-  autoscaling:
-    enabled: false
-    minReplicas: 1
-    maxReplicas: 100
-    targetCPUUtilizationPercentage: 80
-    # targetMemoryUtilizationPercentage: 80
-
-  nodeSelector: {}
-  tolerations: []
diff --git a/docs/deployments/ack.md b/docs/deployments/ack.md
index 4a6fa75..d6435ac 100644
--- a/docs/deployments/ack.md
+++ b/docs/deployments/ack.md
@@ -61,16 +61,14 @@ You can also install apisix-ingress-controller by Helm Charts, it's recommended
 
 ```shell
 cd /path/to/apisix-ingress-controller
-# install base resources, e.g. ServiceAccount.
-helm install ingress-apisix-base -n ingress-apisix ./charts/base
 # install apisix-ingress-controller
-helm install ingress-apisix ./charts/ingress-apisix \
-  --set ingressController.image.tag=dev \
-  --set ingressController.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
-  --set ingressController.config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
+helm install apisix-ingress-controller ./charts/apisix-ingress-controller \
+  --set image.tag=dev \
+  --set config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+  --set config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
   --namespace ingress-apisix
 ```
 
-Change the `ingressController.image.tag` to the Apache APISIX version that you desire. You have to Wait for while until the correspdoning pods are running.
+Change the `image.tag` to the apisix-ingress-controller version that you desire. You have to Wait for while until the correspdoning pods are running.
 
 Try to create some [resources](../CRD-specification.md) to verify the running status. As a minimalist example, see [proxy-the-httpbin-service](../samples/proxy-the-httpbin-service.md) to learn how to apply resources to drive the apisix-ingress-controller.
diff --git a/docs/deployments/aws.md b/docs/deployments/aws.md
index f6666e7..8130f41 100644
--- a/docs/deployments/aws.md
+++ b/docs/deployments/aws.md
@@ -61,17 +61,15 @@ You can also install apisix-ingress-controller by Helm Charts, it's recommended
 
 ```shell
 cd /path/to/apisix-ingress-controller
-# install base resources, e.g. ServiceAccount.
-helm install ingress-apisix-base -n ingress-apisix ./charts/base
 # install apisix-ingress-controller
-helm install ingress-apisix ./charts/ingress-apisix \
-  --set ingressController.image.tag=dev \
-  --set ingressController.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
-  --set ingressController.config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
+helm install apisix-ingress-controller ./charts/apisix-ingress-controller \
+  --set image.tag=dev \
+  --set config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+  --set config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
   --namespace ingress-apisix
 ```
 
-Change the `ingressController.image.tag` to the Apache APISIX version that you desire. You have to wait for while until the correspdoning pods are running.
+Change the `image.tag` to the apisix-ingress-controller version that you desire. You have to wait for while until the correspdoning pods are running.
 
 Now open your [EKS console](https://console.aws.amazon.com/eks/home), choosing your cluster and clicking the Workloads tag, you'll see all pods of Apache APISIX, etcd and apisix-ingress-controller are ready.
 
diff --git a/docs/deployments/azure.md b/docs/deployments/azure.md
index da531f9..1845750 100644
--- a/docs/deployments/azure.md
+++ b/docs/deployments/azure.md
@@ -61,15 +61,14 @@ You can also install apisix-ingress-controller by Helm Charts, it's recommended
 
 ```shell
 cd /path/to/apisix-ingress-controller
-# install base resources, e.g. ServiceAccount.
-helm install ingress-apisix-base -n ingress-apisix ./charts/base
 # install apisix-ingress-controller
-helm install ingress-apisix ./charts/ingress-apisix \
-  --set ingressController.image.tag=dev \
-  --set ingressController.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+helm install apisix-ingress-controller ./charts/apisix-ingress-controller \
+  --set image.tag=dev \
+  --set config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+  --set config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
   --namespace ingress-apisix
 ```
 
-Change the `ingressController.image.tag` to the Apache APISIX version that you desire. You have to wait for while until the correspdoning pods are running.
+Change the `image.tag` to the apisix-ingress-controller version that you desire. You have to wait for while until the correspdoning pods are running.
 
 Now try to create some [resources](../CRD-specification.md) to verify the running status. As a minimalist example, see [proxy-the-httpbin-service](../samples/proxy-the-httpbin-service.md) to learn how to apply resources to drive the apisix-ingress-controller.
diff --git a/docs/deployments/gke.md b/docs/deployments/gke.md
index 67d9827..5c1ec07 100644
--- a/docs/deployments/gke.md
+++ b/docs/deployments/gke.md
@@ -61,16 +61,14 @@ You can also install apisix-ingress-controller by Helm Charts, it's recommended
 
 ```shell
 cd /path/to/apisix-ingress-controller
-# install base resources, e.g. ServiceAccount.
-helm install ingress-apisix-base -n ingress-apisix ./charts/base
 # install apisix-ingress-controller
-helm install ingress-apisix ./charts/ingress-apisix \
-  --set ingressController.image.tag=dev \
-  --set ingressController.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
-  --set ingressController.config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
+helm install apisix-ingress-controller ./charts/apisix-ingress-controller \
+  --set image.tag=dev \
+  --set config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+  --set config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
   --namespace ingress-apisix
 ```
 
-Change the `ingressController.image.tag` to the Apache APISIX version that you desire. You have to wait for while until the correspdoning pods are running.
+Change the `image.tag` to the apisix-ingress-controller version that you desire. You have to wait for while until the correspdoning pods are running.
 
 Now try to create some [resources](../CRD-specification.md) to verify the running status. As a minimalist example, see [proxy-the-httpbin-service](../samples/proxy-the-httpbin-service.md) to learn how to apply resources to drive the apisix-ingress-controller.
diff --git a/docs/deployments/k3s-rke.md b/docs/deployments/k3s-rke.md
index 183b8c0..9d582e1 100644
--- a/docs/deployments/k3s-rke.md
+++ b/docs/deployments/k3s-rke.md
@@ -63,13 +63,11 @@ You can also install apisix-ingress-controller by Helm Charts, it's recommended
 
 ```shell
 cd /path/to/apisix-ingress-controller
-# install base resources, e.g. ServiceAccount.
-helm install ingress-apisix-base -n ingress-apisix ./charts/base --kubeconfig /etc/rancher/k3s/k3s.yaml
 # install apisix-ingress-controller
-helm install ingress-apisix ./charts/ingress-apisix \
-  --set ingressController.image.tag=dev \
-  --set ingressController.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
-  --set ingressController.config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
+helm install apisix-ingress-controller ./charts/apisix-ingress-controller \
+  --set image.tag=dev \
+  --set config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+  --set config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
   --namespace ingress-apisix \
   --kubeconfig /etc/rancher/k3s/k3s.yaml
 ```
@@ -78,6 +76,6 @@ helm install ingress-apisix ./charts/ingress-apisix \
 
 The admin key used in abovementioned commands is the default one, if you change the admin key configuration when you deployed APISIX, please remember to change it here.
 
-Change the `ingressController.image.tag` to the Apache APISIX version that you desire. You have to wait for while until the correspdoning pods are running.
+Change the `image.tag` to the apisix-ingress-controller version that you desire. You have to wait for while until the correspdoning pods are running.
 
 Now try to create some [resources](../CRD-specification.md) to verify the running status. As a minimalist example, see [proxy-the-httpbin-service](../samples/proxy-the-httpbin-service.md) to learn how to apply resources to drive the apisix-ingress-controller.
diff --git a/docs/deployments/kubesphere.md b/docs/deployments/kubesphere.md
index 42cc6ce..a9f7fd7 100644
--- a/docs/deployments/kubesphere.md
+++ b/docs/deployments/kubesphere.md
@@ -59,18 +59,16 @@ You can also install apisix-ingress-controller by Helm Charts. It's recommended
 
 ```shell
 cd /path/to/apisix-ingress-controller
-# install base resources, e.g. ServiceAccount.
-helm install ingress-apisix-base -n ingress-apisix ./charts/base
 # install apisix-ingress-controller
-helm install ingress-apisix ./charts/ingress-apisix \
-  --set ingressController.image.tag=dev \
-  --set ingressController.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
-  --set ingressController.config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
+helm install apisix-ingress-controller ./charts/apisix-ingress-controller \
+  --set image.tag=dev \
+  --set config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+  --set config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
   --namespace ingress-apisix
 ```
 
 The admin key used above is the default one. If you change the admin key configuration when you deployed APISIX, please remember to change it here.
 
-Change the `ingressController.image.tag` to the Apache APISIX version that you desire. Wait for the correspdoning pods are running.
+Change the `image.tag` to the apisix-ingress-controller version that you desire. Wait for the correspdoning pods are running.
 
 Now try to create some [resources](../CRD-specification.md) to verify the running status. As a minimalist example, see [proxy-the-httpbin-service](../samples/proxy-the-httpbin-service.md) to learn how to apply resources to drive the apisix-ingress-controller.
diff --git a/docs/deployments/minikube.md b/docs/deployments/minikube.md
index 21e06cb..362abb4 100644
--- a/docs/deployments/minikube.md
+++ b/docs/deployments/minikube.md
@@ -53,15 +53,14 @@ You can also install apisix-ingress-controller by Helm Charts, it's recommended
 
 ```shell
 cd /path/to/apisix-ingress-controller
-# install base resources, e.g. ServiceAccount.
-helm install ingress-apisix-base -n ingress-apisix ./charts/base
 # install apisix-ingress-controller
-helm install ingress-apisix ./charts/ingress-apisix \
-  --set ingressController.image.tag=dev \
-  --set ingressController.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+helm install apisix-ingress-controller ./charts/apisix-ingress-controller \
+  --set image.tag=dev \
+  --set config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+  --set config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
   --namespace ingress-apisix
 ```
 
-Change the `ingressController.image.tag` to the Apache APISIX version that you desire. You have to wait for while until the correspdoning pods are running.
+Change the `image.tag` to the apisix-ingress-controller version that you desire. You have to wait for while until the correspdoning pods are running.
 
 Now try to create some [resources](../CRD-specification.md) to verify the running of Ingress APISIX. As a minimalist example, see [proxy-the-httpbin-service](../samples/proxy-the-httpbin-service.md) to learn how to apply resources to drive the apisix-ingress-controller.
diff --git a/docs/deployments/tke.md b/docs/deployments/tke.md
index c818daa..96b9db3 100644
--- a/docs/deployments/tke.md
+++ b/docs/deployments/tke.md
@@ -64,17 +64,15 @@ You can also install apisix-ingress-controller by Helm Charts, it's recommended
 
 ```shell
 cd /path/to/apisix-ingress-controller
-# install base resources, e.g. ServiceAccount.
-helm install ingress-apisix-base -n ingress-apisix ./charts/base
 # install apisix-ingress-controller
-helm install ingress-apisix ./charts/ingress-apisix \
-  --set ingressController.image.tag=dev \
-  --set ingressController.config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
-  --set ingressController.config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
+helm install apisix-ingress-controller ./charts/apisix-ingress-controller \
+  --set image.tag=dev \
+  --set config.apisix.baseURL=http://apisix-admin:9180/apisix/admin \
+  --set config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1 \
   --namespace ingress-apisix
 ```
 
-Change the `ingressController.image.tag` to the Apache APISIX version that you desire. You have to wait for while until the correspdoning pods are running.
+Change the `image.tag` to the apisix-ingress-controller version that you desire. You have to wait for while until the correspdoning pods are running.
 
 Now open your [TKE console](https://console.cloud.tencent.com/tke2/overview), choosing your cluster and clicking the Workloads tag, you'll see all pods of Apache APISIX, etcd and apisix-ingress-controller are ready.