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/10/10 01:47:50 UTC
[GitHub] [apisix] cyrpg520 opened a new issue, #8057: help request: unsupported resource record
cyrpg520 opened a new issue, #8057:
URL: https://github.com/apache/apisix/issues/8057
### Description
I want to use the features of ApisixPluginConfig, customize 2 plugins, and configure annotations in ingress, but The apisix controller reported the following error:
```
2022-10-10T09:40:38+08:00 error ingress/status.go:336 unsupported resource record: &{{ApisixPluginConfig apisix.apache.org/v2} {bop-gzip bop 56913a46-ba04-4a0a-aa70-9baacd5081e5 149709200 %!s(int64=1) 2022-10-10 08:53:18 +0800 HKT <nil> %!s(*int64=<nil>) map[] map[kubectl.kubernetes.io/last-applied-configuration:{"apiVersion":"apisix.apache.org/v2","kind":"ApisixPluginConfig","metadata":{"annotations":{},"name":"bop-gzip","namespace":"bop"},"spec":{"plugins":[{"config":{"buffers":{"number":32,"size":4096},"comp_level":9,"min_length":1024,"types":["text/plain","application/javascript","application/x-javascript","text/css","application/xml","text/javascript","application/x-httpd-php","image/jpeg","image/gif","image/png"],"vary":true},"enable":true,"name":"gzip"}]}}
--
Mon, Oct 10 2022 9:40:38 am | ] [] [] [{kubectl-client-side-apply Update apisix.apache.org/v2 2022-10-10 08:53:18 +0800 HKT FieldsV1 {"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}}},"f:spec":{".":{},"f:plugins":{}}} }]} {[{gzip %!s(bool=true) map[buffers:map[number:%!s(float64=32) size:%!s(float64=4096)] comp_level:%!s(float64=9) min_length:%!s(float64=1024) types:[text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png] vary:%!s(bool=true)]}]} {[]}}
```
ApisixPluginConfig is configured as follows:
```
apiVersion: apisix.apache.org/v2
kind: ApisixPluginConfig
metadata:
name: bop-cors
spec:
plugins:
- name: cors
enable: true
---
apiVersion: apisix.apache.org/v2
kind: ApisixPluginConfig
metadata:
name: bop-gzip
spec:
plugins:
- name: gzip
enable: true
config:
types:
- "text/plain"
- "application/javascript"
- "application/x-javascript"
- "text/css"
- "application/xml"
- "text/javascript"
- "application/x-httpd-php"
- "image/jpeg"
- "image/gif"
- "image/png"
min_length: 1024
comp_level: 9
buffers:
number: 32
size: 4096
vary: true
```
Ingress is configured as follows:
```
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
field.cattle.io/description: 业务运营平台前端路由
k8s.apisix.apache.org/enable-websocket: "true"
k8s.apisix.apache.org/plugin-conifg-name: bop-gzip
kubernetes.io/ingress.class: apisix
creationTimestamp: "2022-03-21T08:08:39Z"
generation: 4
name: web
namespace: bop
resourceVersion: "149731322"
uid: 27c585dc-e723-4ba8-816e-bfe9d028d923
spec:
rules:
- host: bop.sanyglobal.com
http:
paths:
- backend:
service:
name: bop-web
port:
number: 80
path: /*
pathType: ImplementationSpecific
- host: bop-headimg.sanyglobal.com
http:
paths:
- backend:
service:
name: bop-web
port:
number: 80
path: /*
pathType: ImplementationSpecific
```
ask for advice
### Environment
- APISIX version (run `apisix version`):2.13.0
- APISIX Ingress Controller version (run `apisix version`):1.5.0
- Operating system (run `uname -a`):Centos
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org