You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/01 06:15:48 UTC
[GitHub] [apisix-helm-chart] GhangZh opened a new issue #260: helm upgrade interdependency error
GhangZh opened a new issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260
Now using apisix1.11+apisix-ingress-controller
When I upgraded apisix1.12 with the community helm I found that go-plugin-runner would not work
When I upgraded apisix1.13 with the community helm, I found that apisix-ingress-controller reported an error
```bash
error apisix/stream_route.go:117 failed to list stream_routes: unexpected status code 400; error message: {"error_msg":"stream mode is disabled, can not add stream routes"}
```
This will make the ingress-controller service unavailable, so I need to manually change the apisix configuration to enable it. However, after fixing this issue, I found that all apisix proxy-rewrite plugins were not working, and the plugin and rewrite rules were available in both dashboard and etcd. All requests for the plugin report a 404 error
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh commented on issue #260: helm upgrade interdependency error
Posted by GitBox <gi...@apache.org>.
GhangZh commented on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1085484735
```yaml
NAME: apisix-ingress-controller
LAST DEPLOYED: Fri Apr 1 11:53:10 2022
NAMESPACE: ingress-apisix
STATUS: pending-install
REVISION: 1
TEST SUITE: None
HOOKS:
MANIFEST:
---
# Source: apisix-ingress-controller/templates/service-account.yaml
#
# 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: ServiceAccount
metadata:
name: apisix-ingress-controller
automountServiceAccountToken: true
---
# Source: apisix-ingress-controller/templates/configmap.yaml
#
# 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: "warn"
log_output: "stderr"
cert_file: "/etc/webhook/certs/cert.pem"
key_file: "/etc/webhook/certs/key.pem"
http_listen: ":8080"
https_listen: ":8443"
ingress_publish_service:
enable_profiling: true
kubernetes:
kubeconfig: ""
resync_interval: "6h"
app_namespaces:
- "*"
namespace_selector:
- ""
election_id: "ingress-apisix-leader"
ingress_class: "apisix"
ingress_version: "networking/v1beta1"
watch_endpointslices: false
apisix_route_version: "apisix.apache.org/v2beta3"
enable_gateway_api: false
apisix:
default_cluster_base_url: http://apisix-admin.ingress-apisix.svc.cluster.local:9180/apisix/admin
default_cluster_admin_key: "edd1c9f034335f136f87ad84b625c8f1"
default_cluster_name: "default"
kind: ConfigMap
metadata:
name: apisix-ingress-controller-configmap
labels:
helm.sh/chart: apisix-ingress-controller-0.9.0
app.kubernetes.io/name: apisix-ingress-controller
app.kubernetes.io/instance: apisix-ingress-controller
app.kubernetes.io/version: "1.4.0"
app.kubernetes.io/managed-by: Helm
---
# Source: apisix-ingress-controller/templates/rbac.yaml
#
# 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: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: apisix-ingress-controller-clusterrole
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- persistentvolumeclaims
- pods
- replicationcontrollers
- replicationcontrollers/scale
- serviceaccounts
- services
- secrets
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- bindings
- 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:
- '*'
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- get
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingresses
- ingresses/status
- networkpolicies
verbs:
- '*'
- apiGroups:
- metrics.k8s.io
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- apisix.apache.org
resources:
- apisixroutes
- apisixroutes/status
- apisixupstreams
- apisixupstreams/status
- apisixtlses
- apisixtlses/status
- apisixclusterconfigs
- apisixclusterconfigs/status
- apisixconsumers
- apisixconsumers/status
- apisixpluginconfigs
- apisixpluginconfigs/status
verbs:
- '*'
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- '*'
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- get
- list
- watch
---
# Source: apisix-ingress-controller/templates/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: apisix-ingress-controller-clusterrolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: apisix-ingress-controller-clusterrole
subjects:
- kind: ServiceAccount
name: apisix-ingress-controller
namespace: ingress-apisix
---
# Source: apisix-ingress-controller/templates/service.yaml
#
# 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: apisix-ingress-controller
labels:
helm.sh/chart: apisix-ingress-controller-0.9.0
app.kubernetes.io/name: apisix-ingress-controller
app.kubernetes.io/instance: apisix-ingress-controller
app.kubernetes.io/version: "1.4.0"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8080
protocol: TCP
name: http
selector:
app.kubernetes.io/name: apisix-ingress-controller
app.kubernetes.io/instance: apisix-ingress-controller
---
# Source: apisix-ingress-controller/templates/deployment.yaml
#
# 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: apisix-ingress-controller
labels:
helm.sh/chart: apisix-ingress-controller-0.9.0
app.kubernetes.io/name: apisix-ingress-controller
app.kubernetes.io/instance: apisix-ingress-controller
app.kubernetes.io/version: "1.4.0"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: apisix-ingress-controller
app.kubernetes.io/instance: apisix-ingress-controller
template:
metadata:
annotations:
checksum/config: ccbab9d33178c40cdb83927e5c9206533af7b996cfdac989cbb080dc1148ae6f
labels:
app.kubernetes.io/name: apisix-ingress-controller
app.kubernetes.io/instance: apisix-ingress-controller
spec:
serviceAccountName: apisix-ingress-controller
volumes:
- name: configuration
configMap:
name: apisix-ingress-controller-configmap
items:
- key: config.yaml
path: config.yaml
initContainers:
- name: wait-apisix-admin
image: hub.hobot.cc/dlp/busybox:1.28
command: ['sh', '-c', "until nc -z apisix-admin.ingress-apisix.svc.cluster.local 9180 ; do echo waiting for apisix-admin; sleep 2; done;"]
containers:
- name: apisix-ingress-controller
command:
- /ingress-apisix/apisix-ingress-controller
- ingress
- --config-path
- /ingress-apisix/conf/config.yaml
image: "docker.hobot.cc/dlp/apisix-ingress-controller:1.4.0-centos"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: 8080
readinessProbe:
httpGet:
path: /healthz
port: 8080
resources:
limits:
cpu: 4000m
memory: 9192Mi
requests:
cpu: 1000m
memory: 1024Mi
volumeMounts:
- mountPath: /ingress-apisix/conf
name: configuration
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
---
# Source: apisix-ingress-controller/templates/hpa.yaml
#
# 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.
#
---
# Source: apisix-ingress-controller/templates/servicemonitor.yaml
#
# 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.
#
NOTES:
Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace ingress-apisix -l "app.kubernetes.io/name=apisix-ingress-controller,app.kubernetes.io/instance=apisix-ingress-controller" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace ingress-apisix $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace ingress-apisix port-forward $POD_NAME 8080:$CONTAINER_PORT
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh commented on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
GhangZh commented on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1085684234
>
apiVersion: apisix.apache.org/v2beta1
kind: ApisixRoute
metadata:
name: test
namespace: test
spec:
http:
- backends:
- serviceName: test-service
servicePort: 8080
match:
hosts:
- test.com
paths:
- /api/cluster/v1/usercenter*
name: test
plugins:
- name: proxy-rewrite
enable: true
config:
regex_uri: ["^/api/cluster/v1/usercenter(.*)", "/v1/usercenter$1"]
- name: ext-plugin-pre-req
enable: true
config:
conf:
- name: forward-auth
value: "{\"url\":\"http://oauth.test.com/api/oauth_login\"}"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] tao12345666333 commented on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1085878921
What is your upgrade command?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh commented on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
GhangZh commented on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1086552705
> What is your upgrade command?
After downloading the latest apisix helm chart, go into the directory and change the configuration of daemonset。
```bash
cd apisix-1.13
helm upgrade -n ingress-apisix apisix .
```
apisix-ingress-controller 1.13->1.14
```bash
helmuninstall-ningress-apisixapisix-ingress-controller
kubectl delete -f customresourcedefinitions.yaml
cd apisix-ingress-controller-1.14
helm install -n ingress-apisix apisix-ingress-controller .
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh edited a comment on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
GhangZh edited a comment on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1086552705
> What is your upgrade command?
After downloading the latest apisix helm chart, go into the directory and change the configuration of daemonset。
```bash
cd apisix-1.13
helm upgrade -n ingress-apisix apisix .
```
apisix-ingress-controller 1.3.0->1.4.0
```bash
helm uninstall -n ingress-apisix apisix-ingress-controller
kubectl delete -f customresourcedefinitions.yaml
cd apisix-ingress-controller-1.4.0
helm install -n ingress-apisix apisix-ingress-controller .
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] tao12345666333 commented on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1086618546
Sadly this is not a recommended way.
When you use Helm to install APISIX and set ingress-controller enabled this issue will be resolved
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh edited a comment on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
GhangZh edited a comment on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1086552705
> What is your upgrade command?
After downloading the latest apisix helm chart, go into the directory and change the configuration of daemonset。
```bash
cd apisix-1.13
helm upgrade -n ingress-apisix apisix .
```
apisix-ingress-controller 1.13->1.14
```bash
helm uninstall -n ingress-apisix apisix-ingress-controller
kubectl delete -f customresourcedefinitions.yaml
cd apisix-ingress-controller-1.14
helm install -n ingress-apisix apisix-ingress-controller .
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh commented on issue #260: helm upgrade interdependency error
Posted by GitBox <gi...@apache.org>.
GhangZh commented on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1085482746
```yaml
NAME: apisix
LAST DEPLOYED: Fri Apr 1 11:50:46 2022
NAMESPACE: ingress-apisix
STATUS: pending-install
REVISION: 1
TEST SUITE: None
HOOKS:
MANIFEST:
---
# Source: apisix/templates/configmap.yaml
#
# 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: apisix
namespace: ingress-apisix
data:
config.yaml: |-
#
# 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.
#
apisix:
node_listen: 80 # APISIX listening port
enable_heartbeat: true
enable_admin: true
enable_admin_cors: true
enable_debug: false
enable_dev_mode: true # Sets nginx worker_processes to 1 if set to true
enable_reuseport: true # Enable nginx SO_REUSEPORT switch if set to true.
enable_ipv6: true # Enable nginx IPv6 resolver
config_center: etcd # etcd: use etcd to store the config value
# yaml: fetch the config value from local yaml file `/your_path/conf/apisix.yaml`
#proxy_protocol: # Proxy Protocol configuration
# listen_http_port: 9181 # The port with proxy protocol for http, it differs from node_listen and port_admin.
# This port can only receive http request with proxy protocol, but node_listen & port_admin
# can only receive http request. If you enable proxy protocol, you must use this port to
# receive http request with proxy protocol
# listen_https_port: 9182 # The port with proxy protocol for https
# enable_tcp_pp: true # Enable the proxy protocol for tcp proxy, it works for stream_proxy.tcp option
# enable_tcp_pp_to_upstream: true # Enables the proxy protocol to the upstream server
proxy_cache: # Proxy Caching configuration
cache_ttl: 10s # The default caching time if the upstream does not specify the cache time
zones: # The parameters of a cache
- name: disk_cache_one # The name of the cache, administrator can be specify
# which cache to use by name in the admin api
memory_size: 50m # The size of shared memory, it's used to store the cache index
disk_size: 1G # The size of disk, it's used to store the cache data
disk_path: "/tmp/disk_cache_one" # The path to store the cache data
cache_levels: "1:2" # The hierarchy levels of a cache
# - name: disk_cache_two
# memory_size: 50m
# disk_size: 1G
# disk_path: "/tmp/disk_cache_two"
# cache_levels: "1:2"
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0
# - "::/64"
port_admin: 9180
# Default token when use API to call for Admin API.
# *NOTE*: Highly recommended to modify this value to protect APISIX's Admin API.
# Disabling this configuration item means that the Admin API does not
# require any authentication.
admin_key:
# admin: can everything for configuration data
- name: "admin"
key: edd1c9f034335f136f87ad84b625c8f1
role: admin
# viewer: only can view configuration data
- name: "viewer"
key: 4054f7cf07e344346cd3f287985e76a2
role: viewer
router:
http: 'radixtree_uri' # radixtree_uri: match route by uri(base on radixtree)
# radixtree_host_uri: match route by host + uri(base on radixtree)
ssl: 'radixtree_sni' # radixtree_sni: match route by SNI(base on radixtree)
stream_proxy:
only: false
tcp:
- 9100
udp:
- 9200
dns_resolver_valid: 30
resolver_timeout: 5
ssl:
enable: false
enable_http2: true
listen_port: 9443
ssl_protocols: "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3"
ssl_ciphers: "xxxx"
nginx_config: # config for render the template to genarate nginx.conf
error_log: "/dev/stderr"
error_log_level: "warn" # warn,error
worker_rlimit_nofile: 60000 # the number of files a worker process can open, should be larger than worker_connections
event:
worker_connections: 60000
http:
enable_access_log: true
access_log: "/dev/stdout"
access_log_format: "{\"@timestamp\": \"$time_iso8601\", \"remote_addr\": \"$remote_addr\", \"costime\": $request_time, \"realtime\": \"$upstream_response_time\", \"status\": $status, \"x_forwarded\": \"$http_x_forwarded_for\", \"vhost\": \"$host\", \"server_addr\":\"$server_addr\", \"referer\": \"$http_referer\", \"method\": \"$request_method\", \"url\": \"$uri\", \"args\": \"$args\", \"request_url\":\"$request_uri\", \"upstream_name\":\"$upstream_name\", \"upstr_addr\": \"$upstream_addr\",\"bytes\": $bytes_sent, \"body_bytes\":$body_bytes_sent, \"http_agent\": \"$http_user_agent\"}"
access_log_format_escape: json
keepalive_timeout: 60s # timeout during which a keep-alive client connection will stay open on the server side.
client_header_timeout: 180s # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client
client_body_timeout: 180s # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client
send_timeout: 600s # timeout for transmitting a response to the client.then the connection is closed
underscores_in_headers: "on" # default enables the use of underscores in client request header fields
real_ip_header: "X-Real-IP" # http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
real_ip_from: # http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
- 127.0.0.1
- 'unix:'
http_configuration_snippet: |
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_header_buffer_size 16m;
large_client_header_buffers 4 16m;
client_body_buffer_size 64m;
proxy_buffering off;
proxy_buffers 4 10m;
proxy_buffer_size 10m;
proxy_busy_buffers_size 10M;
proxy_max_temp_file_size 0;
proxy_connect_timeout 30s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
proxy_cache off;
proxy_request_buffering off;
http_server_configuration_snippet: |
set $router_name -;
set $upstream_name -;
etcd:
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- "xxxx:2379" # multiple etcd address
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds
plugins: # plugin list
- api-breaker
- authz-keycloak
- basic-auth
- batch-requests
- consumer-restriction
- cors
- echo
- fault-injection
- grpc-transcode
- hmac-auth
- http-logger
- ip-restriction
- ua-restriction
- jwt-auth
- kafka-logger
- key-auth
- limit-conn
- limit-count
- limit-req
- node-status
- openid-connect
- authz-casbin
- prometheus
- proxy-cache
- proxy-mirror
- proxy-rewrite
- redirect
- referer-restriction
- request-id
- request-validation
- response-rewrite
- serverless-post-function
- serverless-pre-function
- sls-logger
- syslog
- tcp-logger
- udp-logger
- uri-blocker
- wolf-rbac
- zipkin
- traffic-split
- gzip
- real-ip
- ext-plugin-pre-req
- ext-plugin-post-req
- forward-auth
- proxy-control
stream_plugins:
- mqtt-proxy
- ip-restriction
- limit-conn
ext-plugin:
cmd:
- /usr/local/apisix/go-runner
- run
- -m
- prod
plugin_attr:
prometheus:
export_addr:
ip: 0.0.0.0
port: 9091
export_uri: /apisix/prometheus/metrics
metric_prefix: apisix_
---
# Source: apisix/templates/service-admin.yaml
#
# 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: apisix-admin
namespace: ingress-apisix
annotations:
labels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/service: apisix-admin
spec:
type: ClusterIP
ports:
- name: apisix-admin
port: 9180
targetPort: 9180
protocol: TCP
selector:
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
---
# Source: apisix/templates/service-gateway.yaml
#
# 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: apisix-gateway
namespace: ingress-apisix
annotations:
labels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/service: apisix-gateway
spec:
type: NodePort
externalTrafficPolicy: Cluster
ports:
- name: apisix-gateway
port: 80
targetPort: 80
protocol: TCP
selector:
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
---
# Source: apisix/templates/daemonsets.yaml
#
# 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: DaemonSet
metadata:
name: apisix
namespace: ingress-apisix
labels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
spec:
#
# replicas: 1
#
selector:
matchLabels:
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
template:
metadata:
annotations:
checksum/config: 13b276ed59859fb17292b170992e1e4206a7171ffaced300a547b662daaf7308
labels:
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
spec:
securityContext:
null
containers:
- name: apisix
securityContext:
null
image: "apache/apisix:2.13.0-centos"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
- name: tls
containerPort: 9443
protocol: TCP
- name: admin
containerPort: 9180
protocol: TCP
- name: prometheus
containerPort: 9091
protocol: TCP
readinessProbe:
failureThreshold: 6
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 80
timeoutSeconds: 1
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- "sleep 30"
volumeMounts:
- mountPath: /usr/local/apisix/conf/config.yaml
name: apisix-config
subPath: config.yaml
- mountPath: /usr/local/apisix/go-runner
name: plugin-go-runner
subPath: go-runner
- mountPath: /etc/localtime
name: localtime
readOnly: true
resources:
limits:
cpu: 2
memory: 4Gi
requests:
cpu: 2
memory: 4Gi
volumes:
- configMap:
name: apisix
name: apisix-config
- hostPath:
path: /gpfs-test/plat_aidi/workspace_mount/
name: plugin-go-runner
- hostPath:
path: /etc/localtime
name: localtime
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
ingress-apisix: "yes"
affinity:
---
# Source: apisix/templates/hpa.yaml
#
# 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.
---
# Source: apisix/templates/ingress.yaml
#
# 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.
---
# Source: apisix/templates/pdb.yaml
#
# 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.
---
# Source: apisix/templates/service-monitor.yaml
#
# 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: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: sm-apisix
namespace: cattle-prometheus
labels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
spec:
namespaceSelector:
matchNames:
- cattle-prometheus
selector:
matchLabels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/service: apisix-gateway
endpoints:
- scheme: http
targetPort: prometheus
path: /apisix/prometheus/metrics
interval: 15s
NOTES:
1. Get the application URL by running these commands:
export NODE_PORT=$(kubectl get --namespace ingress-apisix -o jsonpath="{.spec.ports[0].nodePort}" services apisix-gateway)
export NODE_IP=$(kubectl get nodes --namespace ingress-apisix -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh edited a comment on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
GhangZh edited a comment on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1085684234
>
```bash
apiVersion: apisix.apache.org/v2beta1
kind: ApisixRoute
metadata:
name: test
namespace: test
spec:
http:
- backends:
- serviceName: test-service
servicePort: 8080
match:
hosts:
- test.com
paths:
- /api/cluster/v1/usercenter*
name: test
plugins:
- name: proxy-rewrite
enable: true
config:
regex_uri: ["^/api/cluster/v1/usercenter(.*)", "/v1/usercenter$1"]
- name: ext-plugin-pre-req
enable: true
config:
conf:
- name: forward-auth
value: "{\"url\":\"http://oauth.test.com/api/oauth_login\"}"
```
I have tried both v2beta1 and v2beta3
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] tokers commented on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
tokers commented on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1085674725
@GhangZh How did you create an ApisixRoute with the proxy-rewrite plugin?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh edited a comment on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
GhangZh edited a comment on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1085684234
>
```bash
apiVersion: apisix.apache.org/v2beta1
kind: ApisixRoute
metadata:
name: test
namespace: test
spec:
http:
- backends:
- serviceName: test-service
servicePort: 8080
match:
hosts:
- test.com
paths:
- /api/cluster/v1/usercenter*
name: test
plugins:
- name: proxy-rewrite
enable: true
config:
regex_uri: ["^/api/cluster/v1/usercenter(.*)", "/v1/usercenter$1"]
- name: ext-plugin-pre-req
enable: true
config:
conf:
- name: forward-auth
value: "{\"url\":\"http://oauth.test.com/api/oauth_login\"}"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh edited a comment on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
GhangZh edited a comment on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1086552705
> What is your upgrade command?
After downloading the latest apisix helm chart, go into the directory and change the configuration of daemonset。
apisix 1.11->1.13
```bash
cd apisix-chart-0.9.0
helm upgrade -n ingress-apisix apisix .
```
apisix-ingress-controller 1.3.0->1.4.0
```bash
helm uninstall -n ingress-apisix apisix-ingress-controller
kubectl delete -f customresourcedefinitions.yaml
cd apisix-ingress-controller-1.4.0
helm install -n ingress-apisix apisix-ingress-controller .
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-helm-chart] GhangZh edited a comment on issue #260: helm upgrade apisix he apisix-ingress-controller depend on each other error
Posted by GitBox <gi...@apache.org>.
GhangZh edited a comment on issue #260:
URL: https://github.com/apache/apisix-helm-chart/issues/260#issuecomment-1085482746
```yaml
NAME: apisix
LAST DEPLOYED: Fri Apr 1 11:50:46 2022
NAMESPACE: ingress-apisix
STATUS: pending-install
REVISION: 1
TEST SUITE: None
HOOKS:
MANIFEST:
---
# Source: apisix/templates/configmap.yaml
#
# 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: apisix
namespace: ingress-apisix
data:
config.yaml: |-
#
# 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.
#
apisix:
node_listen: 80 # APISIX listening port
enable_heartbeat: true
enable_admin: true
enable_admin_cors: true
enable_debug: false
enable_dev_mode: true # Sets nginx worker_processes to 1 if set to true
enable_reuseport: true # Enable nginx SO_REUSEPORT switch if set to true.
enable_ipv6: true # Enable nginx IPv6 resolver
config_center: etcd # etcd: use etcd to store the config value
# yaml: fetch the config value from local yaml file `/your_path/conf/apisix.yaml`
#proxy_protocol: # Proxy Protocol configuration
# listen_http_port: 9181 # The port with proxy protocol for http, it differs from node_listen and port_admin.
# This port can only receive http request with proxy protocol, but node_listen & port_admin
# can only receive http request. If you enable proxy protocol, you must use this port to
# receive http request with proxy protocol
# listen_https_port: 9182 # The port with proxy protocol for https
# enable_tcp_pp: true # Enable the proxy protocol for tcp proxy, it works for stream_proxy.tcp option
# enable_tcp_pp_to_upstream: true # Enables the proxy protocol to the upstream server
proxy_cache: # Proxy Caching configuration
cache_ttl: 10s # The default caching time if the upstream does not specify the cache time
zones: # The parameters of a cache
- name: disk_cache_one # The name of the cache, administrator can be specify
# which cache to use by name in the admin api
memory_size: 50m # The size of shared memory, it's used to store the cache index
disk_size: 1G # The size of disk, it's used to store the cache data
disk_path: "/tmp/disk_cache_one" # The path to store the cache data
cache_levels: "1:2" # The hierarchy levels of a cache
# - name: disk_cache_two
# memory_size: 50m
# disk_size: 1G
# disk_path: "/tmp/disk_cache_two"
# cache_levels: "1:2"
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0
# - "::/64"
port_admin: 9180
# Default token when use API to call for Admin API.
# *NOTE*: Highly recommended to modify this value to protect APISIX's Admin API.
# Disabling this configuration item means that the Admin API does not
# require any authentication.
admin_key:
# admin: can everything for configuration data
- name: "admin"
key: edd1c9f034335f136f87ad84b625c8f1
role: admin
# viewer: only can view configuration data
- name: "viewer"
key: 4054f7cf07e344346cd3f287985e76a2
role: viewer
router:
http: 'radixtree_uri' # radixtree_uri: match route by uri(base on radixtree)
# radixtree_host_uri: match route by host + uri(base on radixtree)
ssl: 'radixtree_sni' # radixtree_sni: match route by SNI(base on radixtree)
stream_proxy:
only: false
tcp:
- 9100
udp:
- 9200
dns_resolver_valid: 30
resolver_timeout: 5
ssl:
enable: false
enable_http2: true
listen_port: 9443
ssl_protocols: "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3"
ssl_ciphers: "xxxx"
nginx_config: # config for render the template to genarate nginx.conf
error_log: "/dev/stderr"
error_log_level: "warn" # warn,error
worker_rlimit_nofile: 60000 # the number of files a worker process can open, should be larger than worker_connections
event:
worker_connections: 60000
http:
enable_access_log: true
access_log: "/dev/stdout"
access_log_format: "{\"@timestamp\": \"$time_iso8601\", \"remote_addr\": \"$remote_addr\", \"costime\": $request_time, \"realtime\": \"$upstream_response_time\", \"status\": $status, \"x_forwarded\": \"$http_x_forwarded_for\", \"vhost\": \"$host\", \"server_addr\":\"$server_addr\", \"referer\": \"$http_referer\", \"method\": \"$request_method\", \"url\": \"$uri\", \"args\": \"$args\", \"request_url\":\"$request_uri\", \"upstream_name\":\"$upstream_name\", \"upstr_addr\": \"$upstream_addr\",\"bytes\": $bytes_sent, \"body_bytes\":$body_bytes_sent, \"http_agent\": \"$http_user_agent\"}"
access_log_format_escape: json
keepalive_timeout: 60s # timeout during which a keep-alive client connection will stay open on the server side.
client_header_timeout: 180s # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client
client_body_timeout: 180s # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client
send_timeout: 600s # timeout for transmitting a response to the client.then the connection is closed
underscores_in_headers: "on" # default enables the use of underscores in client request header fields
real_ip_header: "X-Real-IP" # http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
real_ip_from: # http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
- 127.0.0.1
- 'unix:'
http_configuration_snippet: |
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_header_buffer_size 16m;
large_client_header_buffers 4 16m;
client_body_buffer_size 64m;
proxy_buffering off;
proxy_buffers 4 10m;
proxy_buffer_size 10m;
proxy_busy_buffers_size 10M;
proxy_max_temp_file_size 0;
proxy_connect_timeout 30s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
proxy_cache off;
proxy_request_buffering off;
http_server_configuration_snippet: |
set $router_name -;
set $upstream_name -;
etcd:
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- "xxxx:2379" # multiple etcd address
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds
plugins: # plugin list
- api-breaker
- authz-keycloak
- basic-auth
- batch-requests
- consumer-restriction
- cors
- echo
- fault-injection
- grpc-transcode
- hmac-auth
- http-logger
- ip-restriction
- ua-restriction
- jwt-auth
- kafka-logger
- key-auth
- limit-conn
- limit-count
- limit-req
- node-status
- openid-connect
- authz-casbin
- prometheus
- proxy-cache
- proxy-mirror
- proxy-rewrite
- redirect
- referer-restriction
- request-id
- request-validation
- response-rewrite
- serverless-post-function
- serverless-pre-function
- sls-logger
- syslog
- tcp-logger
- udp-logger
- uri-blocker
- wolf-rbac
- zipkin
- traffic-split
- gzip
- real-ip
- ext-plugin-pre-req
- ext-plugin-post-req
- forward-auth
- proxy-control
stream_plugins:
- mqtt-proxy
- ip-restriction
- limit-conn
ext-plugin:
cmd:
- /usr/local/apisix/go-runner
- run
- -m
- prod
plugin_attr:
prometheus:
export_addr:
ip: 0.0.0.0
port: 9091
export_uri: /apisix/prometheus/metrics
metric_prefix: apisix_
---
# Source: apisix/templates/service-admin.yaml
#
# 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: apisix-admin
namespace: ingress-apisix
annotations:
labels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/service: apisix-admin
spec:
type: ClusterIP
ports:
- name: apisix-admin
port: 9180
targetPort: 9180
protocol: TCP
selector:
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
---
# Source: apisix/templates/service-gateway.yaml
#
# 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: apisix-gateway
namespace: ingress-apisix
annotations:
labels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/service: apisix-gateway
spec:
type: NodePort
externalTrafficPolicy: Cluster
ports:
- name: apisix-gateway
port: 80
targetPort: 80
protocol: TCP
selector:
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
---
# Source: apisix/templates/daemonsets.yaml
#
# 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: DaemonSet
metadata:
name: apisix
namespace: ingress-apisix
labels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
spec:
#
# replicas: 1
#
selector:
matchLabels:
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
template:
metadata:
annotations:
checksum/config: 13b276ed59859fb17292b170992e1e4206a7171ffaced300a547b662daaf7308
labels:
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
spec:
securityContext:
null
containers:
- name: apisix
securityContext:
null
image: "apache/apisix:2.13.0-centos"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
- name: tls
containerPort: 9443
protocol: TCP
- name: admin
containerPort: 9180
protocol: TCP
- name: prometheus
containerPort: 9091
protocol: TCP
readinessProbe:
failureThreshold: 6
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 80
timeoutSeconds: 1
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- "sleep 30"
volumeMounts:
- mountPath: /usr/local/apisix/conf/config.yaml
name: apisix-config
subPath: config.yaml
- mountPath: /usr/local/apisix/go-runner
name: plugin-go-runner
subPath: go-runner
- mountPath: /etc/localtime
name: localtime
readOnly: true
resources:
limits:
cpu: 2
memory: 4Gi
requests:
cpu: 2
memory: 4Gi
volumes:
- configMap:
name: apisix
name: apisix-config
- hostPath:
path: /gpfs-test/workspace_mount/
name: plugin-go-runner
- hostPath:
path: /etc/localtime
name: localtime
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
ingress-apisix: "yes"
affinity:
---
# Source: apisix/templates/hpa.yaml
#
# 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.
---
# Source: apisix/templates/ingress.yaml
#
# 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.
---
# Source: apisix/templates/pdb.yaml
#
# 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.
---
# Source: apisix/templates/service-monitor.yaml
#
# 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: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: sm-apisix
namespace: cattle-prometheus
labels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
spec:
namespaceSelector:
matchNames:
- cattle-prometheus
selector:
matchLabels:
helm.sh/chart: apisix-0.9.0
app.kubernetes.io/name: apisix
app.kubernetes.io/instance: apisix
app.kubernetes.io/version: "2.13.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/service: apisix-gateway
endpoints:
- scheme: http
targetPort: prometheus
path: /apisix/prometheus/metrics
interval: 15s
NOTES:
1. Get the application URL by running these commands:
export NODE_PORT=$(kubectl get --namespace ingress-apisix -o jsonpath="{.spec.ports[0].nodePort}" services apisix-gateway)
export NODE_IP=$(kubectl get nodes --namespace ingress-apisix -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org