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/26 05:22:45 UTC
[apisix-helm-chart] branch master updated: feat: add ingress
controller helm chart (#31)
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-helm-chart.git
The following commit(s) were added to refs/heads/master by this push:
new a6e9ee2 feat: add ingress controller helm chart (#31)
a6e9ee2 is described below
commit a6e9ee2630835113738a20ef1a25b978f83565c1
Author: Jun <Ju...@users.noreply.github.com>
AuthorDate: Fri Feb 26 13:22:36 2021 +0800
feat: add ingress controller helm chart (#31)
---
README.md | 1 +
charts/apisix-ingress-controller/.helmignore | 23 +++
.../apisix-ingress-controller/Chart.yaml | 21 +--
.../apisix-ingress-controller/README.md | 25 +++-
.../crds/customresourcedefinitions.yaml | 70 +++++++++
.../apisix-ingress-controller/templates/NOTES.txt | 5 +
.../templates/_helpers.tpl | 80 ++++++++++
.../templates/configmap.yaml | 41 +++++
.../templates/deployment.yaml | 91 ++++++++++++
.../apisix-ingress-controller/templates/hpa.yaml | 44 ++++++
.../apisix-ingress-controller/templates/rbac.yaml | 165 +++++++++++++++++++++
.../templates/service-account.yaml | 15 +-
.../templates/service.yaml | 24 +--
charts/apisix-ingress-controller/values.yaml | 72 +++++++++
14 files changed, 646 insertions(+), 31 deletions(-)
diff --git a/README.md b/README.md
index c6e5057..5a622c9 100644
--- a/README.md
+++ b/README.md
@@ -23,3 +23,4 @@ Apache APISIX Helm Charts provide the installation of [Apache APISIX](https://gi
- [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)
+- [Apache APISIX Ingress Controller Helm Chart](https://github.com/apache/apisix-helm-chart/tree/master/charts/apisix-ingress-controller)
diff --git a/charts/apisix-ingress-controller/.helmignore b/charts/apisix-ingress-controller/.helmignore
new file mode 100644
index 0000000..0e8a0eb
--- /dev/null
+++ b/charts/apisix-ingress-controller/.helmignore
@@ -0,0 +1,23 @@
+# 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/README.md b/charts/apisix-ingress-controller/Chart.yaml
similarity index 65%
copy from README.md
copy to charts/apisix-ingress-controller/Chart.yaml
index c6e5057..80fa853 100644
--- a/README.md
+++ b/charts/apisix-ingress-controller/Chart.yaml
@@ -1,4 +1,3 @@
-<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -15,11 +14,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
--->
-
-# Apache APISIX Helm Charts
-
-Apache APISIX Helm Charts provide the installation of [Apache APISIX](https://github.com/apache/apisix#apache-apisix) components for kubernetes.
-
-- [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)
+apiVersion: v2
+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.2.0
diff --git a/README.md b/charts/apisix-ingress-controller/README.md
similarity index 59%
copy from README.md
copy to charts/apisix-ingress-controller/README.md
index c6e5057..741e625 100644
--- a/README.md
+++ b/charts/apisix-ingress-controller/README.md
@@ -17,9 +17,26 @@
#
-->
-# Apache APISIX Helm Charts
+# Apache APISIX Ingress Controller Helm Chart
-Apache APISIX Helm Charts provide the installation of [Apache APISIX](https://github.com/apache/apisix#apache-apisix) components for kubernetes.
+## Prerequisites
-- [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)
+- 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/apisix-ingress-controller/crds/customresourcedefinitions.yaml b/charts/apisix-ingress-controller/crds/customresourcedefinitions.yaml
new file mode 100644
index 0000000..58544a0
--- /dev/null
+++ b/charts/apisix-ingress-controller/crds/customresourcedefinitions.yaml
@@ -0,0 +1,70 @@
+#
+# 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: apiextensions.k8s.io/v1beta1
+kind: CustomResourceDefinition
+metadata:
+ name: apisixroutes.apisix.apache.org
+spec:
+ group: apisix.apache.org
+ versions:
+ - name: v1
+ served: true
+ storage: true
+ scope: Namespaced
+ names:
+ plural: apisixroutes
+ singular: apisixroute
+ kind: ApisixRoute
+ shortNames:
+ - ar
+---
+apiVersion: apiextensions.k8s.io/v1beta1
+kind: CustomResourceDefinition
+metadata:
+ name: apisixtlses.apisix.apache.org
+spec:
+ group: apisix.apache.org
+ versions:
+ - name: v1
+ served: true
+ storage: true
+ scope: Namespaced
+ names:
+ plural: apisixtlses
+ singular: apisixtls
+ kind: ApisixTls
+ shortNames:
+ - atls
+---
+apiVersion: apiextensions.k8s.io/v1beta1
+kind: CustomResourceDefinition
+metadata:
+ name: apisixupstreams.apisix.apache.org
+spec:
+ group: apisix.apache.org
+ versions:
+ - name: v1
+ served: true
+ storage: true
+ scope: Namespaced
+ names:
+ plural: apisixupstreams
+ singular: apisixupstream
+ kind: ApisixUpstream
+ shortNames:
+ - au
diff --git a/charts/apisix-ingress-controller/templates/NOTES.txt b/charts/apisix-ingress-controller/templates/NOTES.txt
new file mode 100644
index 0000000..7cac1e3
--- /dev/null
+++ b/charts/apisix-ingress-controller/templates/NOTES.txt
@@ -0,0 +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 "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/apisix-ingress-controller/templates/_helpers.tpl b/charts/apisix-ingress-controller/templates/_helpers.tpl
new file mode 100644
index 0000000..b2a98f2
--- /dev/null
+++ b/charts/apisix-ingress-controller/templates/_helpers.tpl
@@ -0,0 +1,80 @@
+#
+# 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-ingress-controller.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 "apisix-ingress-controller.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 "apisix-ingress-controller.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- 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 }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- 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 service account to use
+*/}}
+{{- define "apisix-ingress-controller.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "apisix-ingress-controller.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/charts/apisix-ingress-controller/templates/configmap.yaml b/charts/apisix-ingress-controller/templates/configmap.yaml
new file mode 100644
index 0000000..f80988d
--- /dev/null
+++ b/charts/apisix-ingress-controller/templates/configmap.yaml
@@ -0,0 +1,41 @@
+#
+# 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
+data:
+ config.yaml: |
+ # log options
+ 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.config.kubernetes.kubeconfig | quote }}
+ resync_interval: {{ .Values.config.kubernetes.resyncInterval | quote }}
+ {{- if gt (len .Values.config.kubernetes.appNamespaces) 0 }}
+ app_namespaces:
+ {{- range .Values.config.kubernetes.appNamespaces }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ apisix:
+ base_url: {{ .Values.config.apisix.baseURL | quote }}
+ admin_key: {{ .Values.config.apisix.adminKey | quote }}
+kind: ConfigMap
+metadata:
+ name: {{ .Release.Name }}-configmap
+ labels:
+ {{- include "apisix-ingress-controller.labels" . | nindent 4 }}
diff --git a/charts/apisix-ingress-controller/templates/deployment.yaml b/charts/apisix-ingress-controller/templates/deployment.yaml
new file mode 100644
index 0000000..c87a5ff
--- /dev/null
+++ b/charts/apisix-ingress-controller/templates/deployment.yaml
@@ -0,0 +1,91 @@
+#
+# 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-ingress-controller.fullname" . }}
+ labels:
+ {{- include "apisix-ingress-controller.labels" . | nindent 4 }}
+spec:
+ {{- if not .Values.autoscaling.enabled }}
+ replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- include "apisix-ingress-controller.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ labels:
+ {{- include "apisix-ingress-controller.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include "apisix-ingress-controller.serviceAccountName" . }}
+ volumes:
+ - name: configuration
+ configMap:
+ name: {{ .Release.Name }}-configmap
+ items:
+ - key: config.yaml
+ path: config.yaml
+ containers:
+ - name: {{ .Chart.Name }}
+ command:
+ - /ingress-apisix/apisix-ingress-controller
+ - ingress
+ - --config-path
+ - /ingress-apisix/conf/config.yaml
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - name: http
+ containerPort: {{ (.Values.config.httpListen | split ":")._1 }}
+ protocol: TCP
+ livenessProbe:
+ httpGet:
+ path: /healthz
+ port: {{ (.Values.config.httpListen | split ":")._1 }}
+ readinessProbe:
+ httpGet:
+ path: /healthz
+ port: {{ (.Values.config.httpListen | split ":")._1 }}
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ volumeMounts:
+ - mountPath: /ingress-apisix/conf
+ name: configuration
+ env:
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git a/charts/apisix-ingress-controller/templates/hpa.yaml b/charts/apisix-ingress-controller/templates/hpa.yaml
new file mode 100644
index 0000000..b959386
--- /dev/null
+++ b/charts/apisix-ingress-controller/templates/hpa.yaml
@@ -0,0 +1,44 @@
+#
+# 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.autoscaling.enabled }}
+apiVersion: autoscaling/v2beta1
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "apisix-ingress-controller.fullname" . }}
+ labels:
+ {{- include "apisix-ingress-controller.labels" . | nindent 4 }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "apisix-ingress-controller.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}
diff --git a/charts/apisix-ingress-controller/templates/rbac.yaml b/charts/apisix-ingress-controller/templates/rbac.yaml
new file mode 100644
index 0000000..f36cd0b
--- /dev/null
+++ b/charts/apisix-ingress-controller/templates/rbac.yaml
@@ -0,0 +1,165 @@
+#
+# 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.rbac.create }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: {{ .Release.Name }}-clusterrole
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ - endpoints
+ - persistentvolumeclaims
+ - pods
+ - replicationcontrollers
+ - replicationcontrollers/scale
+ - serviceaccounts
+ - services
+ - secrets
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - ""
+ resources:
+ - bindings
+ - events
+ - limitranges
+ - namespaces/status
+ - pods/log
+ - pods/status
+ - replicationcontrollers/status
+ - resourcequotas
+ - resourcequotas/status
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - ""
+ resources:
+ - namespaces
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - apps
+ resources:
+ - controllerrevisions
+ - daemonsets
+ - deployments
+ - deployments/scale
+ - replicasets
+ - replicasets/scale
+ - statefulsets
+ - statefulsets/scale
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - autoscaling
+ resources:
+ - horizontalpodautoscalers
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - batch
+ resources:
+ - cronjobs
+ - jobs
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - extensions
+ resources:
+ - daemonsets
+ - deployments
+ - deployments/scale
+ - ingresses
+ - networkpolicies
+ - replicasets
+ - replicasets/scale
+ - replicationcontrollers/scale
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - policy
+ resources:
+ - poddisruptionbudgets
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - networking.k8s.io
+ resources:
+ - ingresses
+ - networkpolicies
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - metrics.k8s.io
+ resources:
+ - pods
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - apisix.apache.org
+ resources:
+ - apisixroutes
+ - apisixupstreams
+ - apisixservices
+ - apisixtlses
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - coordination.k8s.io
+ resources:
+ - leases
+ verbs:
+ - '*'
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: {{ .Release.Name }}-clusterrolebinding
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: {{ .Release.Name }}-clusterrole
+subjects:
+ - kind: ServiceAccount
+ name: {{ include "apisix-ingress-controller.serviceAccountName" . }}
+ namespace: {{ .Release.Namespace }}
+{{- end }}
diff --git a/README.md b/charts/apisix-ingress-controller/templates/service-account.yaml
similarity index 65%
copy from README.md
copy to charts/apisix-ingress-controller/templates/service-account.yaml
index c6e5057..f749221 100644
--- a/README.md
+++ b/charts/apisix-ingress-controller/templates/service-account.yaml
@@ -1,4 +1,3 @@
-<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -15,11 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
--->
-
-# Apache APISIX Helm Charts
-
-Apache APISIX Helm Charts provide the installation of [Apache APISIX](https://github.com/apache/apisix#apache-apisix) components for kubernetes.
-
-- [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)
+{{- if .Values.serviceAccount.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "apisix-ingress-controller.serviceAccountName" . }}
+{{- end }}
diff --git a/README.md b/charts/apisix-ingress-controller/templates/service.yaml
similarity index 63%
copy from README.md
copy to charts/apisix-ingress-controller/templates/service.yaml
index c6e5057..00d94e3 100644
--- a/README.md
+++ b/charts/apisix-ingress-controller/templates/service.yaml
@@ -1,4 +1,3 @@
-<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -15,11 +14,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
--->
-
-# Apache APISIX Helm Charts
-
-Apache APISIX Helm Charts provide the installation of [Apache APISIX](https://github.com/apache/apisix#apache-apisix) components for kubernetes.
-
-- [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)
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "apisix-ingress-controller.fullname" . }}
+ labels:
+ {{- include "apisix-ingress-controller.labels" . | nindent 4 }}
+spec:
+ type: ClusterIP
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: {{ (.Values.config.httpListen | split ":")._1 }}
+ protocol: TCP
+ name: http
+ selector:
+ {{- 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..294cd37
--- /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://apisix-admin:9180/apisix/admin"
+ adminKey: "edd1c9f034335f136f87ad84b625c8f1"
+
+resources: {}
+
+autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 100
+ targetCPUUtilizationPercentage: 80
+ # targetMemoryUtilizationPercentage: 80
+
+nodeSelector: {}
+tolerations: []