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 05:59:38 UTC

[GitHub] [apisix-ingress-controller] cyrpg520 opened a new issue, #1375: help request: unsupported resource record

cyrpg520 opened a new issue, #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375

   ### 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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1278690189

   @cyrpg520 Are you interested in submitting a PR?
   
   If you don't have time, we'll go straight to the fix


-- 
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-ingress-controller] tao12345666333 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1293169127

   yes,   we will relase v1.5.1 and include this one.
   https://github.com/apache/apisix-ingress-controller/pull/1409


-- 
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-ingress-controller] dickens7 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
dickens7 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1295698042

   After merging #1409
   Multiple ApisixRoute refer to the same ApisixPluginConfig
   
   ```yaml
   apiVersion: apisix.apache.org/v2
   kind: ApisixRoute
   metadata:
     name: httpserver
   spec:
     http:
     - name: httpserver
       match:
         hosts:
           - local.httpbin.org
         paths:
           - /
       backends:
        - serviceName: httpbin
          servicePort: 80
       plugin_config_name: cors-plugins
   
   ---
   apiVersion: apisix.apache.org/v2
   kind: ApisixRoute
   metadata:
     name: httpserver2
   spec:
     http:
     - name: httpserver
       match:
         hosts:
           - local.httpbin.org
         paths:
           - /
       backends:
        - serviceName: httpbin
          servicePort: 80
       plugin_config_name: cors-plugins
   ```
   
   - error-log
   
   ```log
   2022-10-29T10:37:04+08:00       error   ingress/status.go:254   failed to record status change for ApisixPluginConfig   
   
   {
   	"error": "Operation cannot be fulfilled on apisixpluginconfigs.apisix.apache.org \"cors-plugins\": the object has been modified; please apply your changes to the latest version and try again",
   	"name": "cors-plugins",
   	"namespace": "test"
   }
   ```


-- 
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-ingress-controller] cyrpg520 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
cyrpg520 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1278707282

   > @cyrpg520 Are you interested in submitting a PR?
   > 
   > If you don't have time, we'll go straight to the fix
   Hello, you can modify it directly
   


-- 
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-ingress-controller] tao12345666333 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1278710593

   okay


-- 
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-ingress-controller] dickens7 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
dickens7 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1293037918

   Will this bug be fixed for v1.5?


-- 
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-ingress-controller] AlinsRan commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
AlinsRan commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1274242269

   > 看了下源代码1.15.0版本 /pkg/ingress/status.go中apisixpluginconfig好像没有v2版本的类型,所以注解中添加插件时报错:`error ingress/status.go:336 unsupported resource record` 这是不是1.15.0版本的bug啊?
   > 
   > ```
   > 	switch v := at.(type) {
   > 	case *configv2beta3.ApisixTls:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2beta3().ApisixTlses(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixTls",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 	case *configv2.ApisixTls:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2().ApisixTlses(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixTls",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 	case *configv2beta3.ApisixUpstream:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2beta3().ApisixUpstreams(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixUpstream",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 
   > 	case *configv2.ApisixUpstream:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2().ApisixUpstreams(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixUpstream",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 	case *configv2.ApisixRoute:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2().ApisixRoutes(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixRoute",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 	case *configv2beta2.ApisixRoute:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2beta2().ApisixRoutes(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixRoute",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 	case *configv2beta3.ApisixRoute:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2beta3().ApisixRoutes(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixRoute",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 	case *configv2beta3.ApisixConsumer:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2beta3().ApisixConsumers(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixConsumer",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 	case *configv2.ApisixConsumer:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2().ApisixConsumers(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixConsumer",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 	case *configv2beta3.ApisixPluginConfig:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2beta3().ApisixPluginConfigs(v.Namespace).
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixPluginConfig",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 					zap.String("namespace", v.Namespace),
   > 				)
   > 			}
   > 		}
   > 	case *configv2beta3.ApisixClusterConfig:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2beta3().ApisixClusterConfigs().
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixClusterConfig",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 				)
   > 			}
   > 		}
   > 	case *configv2.ApisixClusterConfig:
   > 		// set to status
   > 		if v.Status.Conditions == nil {
   > 			conditions := make([]metav1.Condition, 0)
   > 			v.Status.Conditions = conditions
   > 		}
   > 		if c.verifyGeneration(&v.Status.Conditions, condition) {
   > 			meta.SetStatusCondition(&v.Status.Conditions, condition)
   > 			if _, errRecord := client.ApisixV2().ApisixClusterConfigs().
   > 				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 				log.Errorw("failed to record status change for ApisixClusterConfig",
   > 					zap.Error(errRecord),
   > 					zap.String("name", v.Name),
   > 				)
   > 			}
   > 		}
   > 	case *networkingv1.Ingress:
   > 		// set to status
   > 		lbips, err := c.ingressLBStatusIPs()
   > 		if err != nil {
   > 			log.Errorw("failed to get APISIX gateway external IPs",
   > 				zap.Error(err),
   > 			)
   > 
   > 		}
   > 
   > 		v.ObjectMeta.Generation = generation
   > 		v.Status.LoadBalancer.Ingress = lbips
   > 		if _, errRecord := kubeClient.NetworkingV1().Ingresses(v.Namespace).UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 			log.Errorw("failed to record status change for IngressV1",
   > 				zap.Error(errRecord),
   > 				zap.String("name", v.Name),
   > 				zap.String("namespace", v.Namespace),
   > 			)
   > 		}
   > 
   > 	case *networkingv1beta1.Ingress:
   > 		// set to status
   > 		lbips, err := c.ingressLBStatusIPs()
   > 		if err != nil {
   > 			log.Errorw("failed to get APISIX gateway external IPs",
   > 				zap.Error(err),
   > 			)
   > 
   > 		}
   > 
   > 		v.ObjectMeta.Generation = generation
   > 		v.Status.LoadBalancer.Ingress = lbips
   > 		if _, errRecord := kubeClient.NetworkingV1beta1().Ingresses(v.Namespace).UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 			log.Errorw("failed to record status change for IngressV1",
   > 				zap.Error(errRecord),
   > 				zap.String("name", v.Name),
   > 				zap.String("namespace", v.Namespace),
   > 			)
   > 		}
   > 	case *extensionsv1beta1.Ingress:
   > 		// set to status
   > 		lbips, err := c.ingressLBStatusIPs()
   > 		if err != nil {
   > 			log.Errorw("failed to get APISIX gateway external IPs",
   > 				zap.Error(err),
   > 			)
   > 
   > 		}
   > 
   > 		v.ObjectMeta.Generation = generation
   > 		v.Status.LoadBalancer.Ingress = lbips
   > 		if _, errRecord := kubeClient.ExtensionsV1beta1().Ingresses(v.Namespace).UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   > 			log.Errorw("failed to record status change for IngressV1",
   > 				zap.Error(errRecord),
   > 				zap.String("name", v.Name),
   > 				zap.String("namespace", v.Namespace),
   > 			)
   > 		}
   > 	default:
   > 		// This should not be executed
   > 		log.Errorf("unsupported resource record: %s", v)
   > 	}
   > }
   > ```
   
   yeah,i reproduce it. Are you interested in submitting pr to fix it?


-- 
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-ingress-controller] cyrpg520 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
cyrpg520 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1278709638

   > @cyrpg520 Are you interested in submitting a PR?
   > 
   > If you don't have time, we'll go straight to the fix
   
   @tao12345666333 Hello, you can modify it directly


-- 
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-ingress-controller] cyrpg520 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
cyrpg520 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1273064039

   看了下源代码1.15.0版本 /pkg/ingress/status.go中apisixpluginconfig好像没有v2版本的类型,所以注解中添加插件时报错:`error ingress/status.go:336 unsupported resource record`
   这是不是1.15.0版本的bug啊?
   
   ```
   	switch v := at.(type) {
   	case *configv2beta3.ApisixTls:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2beta3().ApisixTlses(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixTls",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   	case *configv2.ApisixTls:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2().ApisixTlses(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixTls",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   	case *configv2beta3.ApisixUpstream:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2beta3().ApisixUpstreams(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixUpstream",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   
   	case *configv2.ApisixUpstream:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2().ApisixUpstreams(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixUpstream",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   	case *configv2.ApisixRoute:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2().ApisixRoutes(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixRoute",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   	case *configv2beta2.ApisixRoute:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2beta2().ApisixRoutes(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixRoute",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   	case *configv2beta3.ApisixRoute:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2beta3().ApisixRoutes(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixRoute",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   	case *configv2beta3.ApisixConsumer:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2beta3().ApisixConsumers(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixConsumer",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   	case *configv2.ApisixConsumer:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2().ApisixConsumers(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixConsumer",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   	case *configv2beta3.ApisixPluginConfig:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2beta3().ApisixPluginConfigs(v.Namespace).
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixPluginConfig",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   					zap.String("namespace", v.Namespace),
   				)
   			}
   		}
   	case *configv2beta3.ApisixClusterConfig:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2beta3().ApisixClusterConfigs().
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixClusterConfig",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   				)
   			}
   		}
   	case *configv2.ApisixClusterConfig:
   		// set to status
   		if v.Status.Conditions == nil {
   			conditions := make([]metav1.Condition, 0)
   			v.Status.Conditions = conditions
   		}
   		if c.verifyGeneration(&v.Status.Conditions, condition) {
   			meta.SetStatusCondition(&v.Status.Conditions, condition)
   			if _, errRecord := client.ApisixV2().ApisixClusterConfigs().
   				UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   				log.Errorw("failed to record status change for ApisixClusterConfig",
   					zap.Error(errRecord),
   					zap.String("name", v.Name),
   				)
   			}
   		}
   	case *networkingv1.Ingress:
   		// set to status
   		lbips, err := c.ingressLBStatusIPs()
   		if err != nil {
   			log.Errorw("failed to get APISIX gateway external IPs",
   				zap.Error(err),
   			)
   
   		}
   
   		v.ObjectMeta.Generation = generation
   		v.Status.LoadBalancer.Ingress = lbips
   		if _, errRecord := kubeClient.NetworkingV1().Ingresses(v.Namespace).UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   			log.Errorw("failed to record status change for IngressV1",
   				zap.Error(errRecord),
   				zap.String("name", v.Name),
   				zap.String("namespace", v.Namespace),
   			)
   		}
   
   	case *networkingv1beta1.Ingress:
   		// set to status
   		lbips, err := c.ingressLBStatusIPs()
   		if err != nil {
   			log.Errorw("failed to get APISIX gateway external IPs",
   				zap.Error(err),
   			)
   
   		}
   
   		v.ObjectMeta.Generation = generation
   		v.Status.LoadBalancer.Ingress = lbips
   		if _, errRecord := kubeClient.NetworkingV1beta1().Ingresses(v.Namespace).UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   			log.Errorw("failed to record status change for IngressV1",
   				zap.Error(errRecord),
   				zap.String("name", v.Name),
   				zap.String("namespace", v.Namespace),
   			)
   		}
   	case *extensionsv1beta1.Ingress:
   		// set to status
   		lbips, err := c.ingressLBStatusIPs()
   		if err != nil {
   			log.Errorw("failed to get APISIX gateway external IPs",
   				zap.Error(err),
   			)
   
   		}
   
   		v.ObjectMeta.Generation = generation
   		v.Status.LoadBalancer.Ingress = lbips
   		if _, errRecord := kubeClient.ExtensionsV1beta1().Ingresses(v.Namespace).UpdateStatus(context.TODO(), v, metav1.UpdateOptions{}); errRecord != nil {
   			log.Errorw("failed to record status change for IngressV1",
   				zap.Error(errRecord),
   				zap.String("name", v.Name),
   				zap.String("namespace", v.Namespace),
   			)
   		}
   	default:
   		// This should not be executed
   		log.Errorf("unsupported resource record: %s", v)
   	}
   }
   ```


-- 
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-ingress-controller] tao12345666333 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1327915295

   #1409 has been merged.
   
   v1.5.1 is on vote https://lists.apache.org/thread/64xgh02j7dv7vpqyym9kv33gg4ytdf3g
   
   I will close this one, thanks


-- 
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-ingress-controller] tao12345666333 closed issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
tao12345666333 closed issue #1375: help request: unsupported resource record
URL: https://github.com/apache/apisix-ingress-controller/issues/1375


-- 
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-ingress-controller] cyrpg520 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
cyrpg520 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1350525751

   Hi,大神
   &nbsp; &nbsp; 我已经更新apisix-ingress-controller到1.5.1了,但是使用ApisixPluginConfig资源还是不生效,查看控制器日志debug也没有报什么错误,不知道为什么。我的ingress和apisix插件配置如下:
   
   
   
   
   
   
   求大神帮忙,非常感谢!
   
   
   
   
   ------------------&nbsp;原始邮件&nbsp;------------------
   发件人:                                                                                                                        "apache/apisix-ingress-controller"                                                                                    ***@***.***&gt;;
   发送时间:&nbsp;2022年11月26日(星期六) 上午6:27
   ***@***.***&gt;;
   ***@***.******@***.***&gt;;
   主题:&nbsp;Re: [apache/apisix-ingress-controller] help request: unsupported resource record (Issue #1375)
   
   
   
   
   
    
   Closed #1375 as completed.
    
   —
   Reply to this email directly, view it on GitHub, or unsubscribe.
   You are receiving this because you were mentioned.Message ID: ***@***.***&gt;


-- 
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-ingress-controller] cyrpg520 commented on issue #1375: help request: unsupported resource record

Posted by GitBox <gi...@apache.org>.
cyrpg520 commented on issue #1375:
URL: https://github.com/apache/apisix-ingress-controller/issues/1375#issuecomment-1278708674

   > 
   
   Hello, you can modify it directly


-- 
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