This is an automated email from the ASF dual-hosted git repository. kvn pushed a commit to branch kv/2.1 in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git
commit 3bae680d97d6490f3fd4ed848009691a92bc2f96 Author: kv <gxt...@163.com> AuthorDate: Sat Nov 28 23:38:52 2020 +0800 WIP: adjustments for APISIX 2.1 release --- chart/apisix/Chart.yaml | 4 +- chart/apisix/templates/configmap.yaml | 15 ++++-- chart/apisix/templates/deployment.yaml | 8 +--- chart/apisix/templates/hpa.yaml | 1 + chart/apisix/templates/ingress.yaml | 1 + chart/apisix/templates/service-gateway.yaml | 1 + chart/apisix/templates/tests/test-connection.yaml | 1 + chart/apisix/values.yaml | 58 +++++++++++++++-------- 8 files changed, 56 insertions(+), 33 deletions(-) diff --git a/chart/apisix/Chart.yaml b/chart/apisix/Chart.yaml index fa435a3..71980b9 100644 --- a/chart/apisix/Chart.yaml +++ b/chart/apisix/Chart.yaml @@ -31,9 +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.0 +version: 2.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: 1.16.0 +appVersion: 2.1.0 diff --git a/chart/apisix/templates/configmap.yaml b/chart/apisix/templates/configmap.yaml index 5e69fa0..788ad97 100644 --- a/chart/apisix/templates/configmap.yaml +++ b/chart/apisix/templates/configmap.yaml @@ -18,6 +18,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "apisix.fullname" . }} + namespace: {{ .Release.Namespace }} data: config.yaml: |- # @@ -72,9 +73,14 @@ data: # disk_path: "/tmp/disk_cache_two" # cache_levels: "1:2" - # allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow - # - 127.0.0.0/24 # If we don't set any IP list, then any IP access is allowed by default. - # - 172.17.0.0/24 + allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow + {{- if .Values.allow.ipList }} + {{- range $ips := .Values.allow.ipList }} + - {{ $ips }} + {{- end }} + {{- else }} + - 0.0.0.0/0 + {{- end}} # - "::/64" # port_admin: 9180 # use a separate port @@ -141,8 +147,9 @@ data: - {{ .Values.etcd.host | quote }} # multiple etcd address prefix: {{ .Values.etcd.prefix | quote }} # apisix configurations prefix timeout: {{ .Values.etcd.timeout }} # 3 seconds - + {{- if .Values.plugins }} plugins: # plugin list + {{- end }} {{- range $plugin := .Values.plugins }} - {{ $plugin }} {{- end }} diff --git a/chart/apisix/templates/deployment.yaml b/chart/apisix/templates/deployment.yaml index 7aeef3c..d134de2 100644 --- a/chart/apisix/templates/deployment.yaml +++ b/chart/apisix/templates/deployment.yaml @@ -18,6 +18,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "apisix.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "apisix.labels" . | nindent 4 }} spec: @@ -77,13 +78,6 @@ spec: subPath: config.yaml resources: {{- toYaml .Values.resources | nindent 12 }} - # - name: dnsmasq - # image: "janeczku/go-dnsmasq:release-1.0.7" - # args: - # - --listen - # - "127.0.0.1:53" - # - --default-resolver - # - --append-search-domains volumes: - configMap: name: {{ include "apisix.fullname" . }} diff --git a/chart/apisix/templates/hpa.yaml b/chart/apisix/templates/hpa.yaml index fe478be..63347f0 100644 --- a/chart/apisix/templates/hpa.yaml +++ b/chart/apisix/templates/hpa.yaml @@ -19,6 +19,7 @@ apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: name: {{ include "apisix.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "apisix.labels" . | nindent 4 }} spec: diff --git a/chart/apisix/templates/ingress.yaml b/chart/apisix/templates/ingress.yaml index e6dcdb7..3929484 100644 --- a/chart/apisix/templates/ingress.yaml +++ b/chart/apisix/templates/ingress.yaml @@ -25,6 +25,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }} + namespace: {{ .Release.Namespace }} labels: {{- include "apisix.labels" . | nindent 4 }} {{- with .Values.gateway.ingress.annotations }} diff --git a/chart/apisix/templates/service-gateway.yaml b/chart/apisix/templates/service-gateway.yaml index 59f9d58..5866fe2 100644 --- a/chart/apisix/templates/service-gateway.yaml +++ b/chart/apisix/templates/service-gateway.yaml @@ -18,6 +18,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "apisix.fullname" . }}-gateway + namespace: {{ .Release.Namespace }} annotations: {{- range $key, $value := .Values.gateway.annotations }} {{ $key }}: {{ $value | quote }} diff --git a/chart/apisix/templates/tests/test-connection.yaml b/chart/apisix/templates/tests/test-connection.yaml index d5bf0ea..a6d6bae 100644 --- a/chart/apisix/templates/tests/test-connection.yaml +++ b/chart/apisix/templates/tests/test-connection.yaml @@ -18,6 +18,7 @@ apiVersion: v1 kind: Pod metadata: name: "{{ include "apisix.fullname" . }}-test-connection" + namespace: {{ .Release.Namespace }} labels: {{- include "apisix.labels" . | nindent 4 }} annotations: diff --git a/chart/apisix/values.yaml b/chart/apisix/values.yaml index 217d9ea..7982b21 100644 --- a/chart/apisix/values.yaml +++ b/chart/apisix/values.yaml @@ -19,7 +19,8 @@ image: repository: apache/apisix pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: 1.3-alpine + tag: 2.1-centos + imagePullSecrets: [] nameOverride: "" @@ -70,7 +71,7 @@ gateway: # etcd configuration # use the FQDN address or the IP of the etcd etcd: - host: http://etcd-apisix.local:2379 # http://172.20.128.89:2379 + host: http://etcd:2379 # http://172.20.128.89:2379 prefix: "/apisix" timeout: 3 @@ -95,34 +96,51 @@ admin: admin: edd1c9f034335f136f87ad84b625c8f1 viewer: 4054f7cf07e344346cd3f287985e76a2 +allow: + # The ip range for allowing access to Apache APISIX + ipList: + - 127.0.0.1/24 + # APISIX plugins to be enabled plugins: - - example-plugin - - limit-req - - limit-count - - limit-conn - - key-auth + - api-breaker + - authz-keycloak - basic-auth - - prometheus - - node-status - - jwt-auth - - zipkin - - ip-restriction + - batch-requests + - consumer-restriction + - cors + - echo + - fault-injection - grpc-transcode - - serverless-pre-function - - serverless-post-function + - hmac-auth + - http-logger + - ip-restriction + - jwt-auth + - kafka-logger + - key-auth + - limit-conn + - limit-count + - limit-req + - node-status - openid-connect + - prometheus + - proxy-cache + - proxy-mirror - proxy-rewrite - redirect + - referer-restriction + - request-id + - request-validation - response-rewrite - - fault-injection + - serverless-post-function + - serverless-pre-function + - sls-logger + - syslog + - tcp-logger - udp-logger + - uri-blocker - wolf-rbac - - proxy-cache - - tcp-logger - - proxy-mirror - - kafka-logger - - cors + - zipkin stream_plugins: - mqtt-proxy