This is an automated email from the ASF dual-hosted git repository.

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b0c139  fix: ApisixClusterConfig e2e test case (#859)
6b0c139 is described below

commit 6b0c139ce2fbf56c683d86b8f93c7b4ef854fbc6
Author: Jintao Zhang <[email protected]>
AuthorDate: Mon Feb 14 09:38:55 2022 +0800

    fix: ApisixClusterConfig e2e test case (#859)
    
    Signed-off-by: Jintao Zhang <[email protected]>
---
 Makefile              |  4 ++--
 pkg/apisix/plugin.go  |  2 +-
 pkg/ingress/status.go | 16 ++++++++++++++++
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index a561235..05251b2 100644
--- a/Makefile
+++ b/Makefile
@@ -87,8 +87,8 @@ endif
 .PHONY: push-images-to-kind
 push-images-to-kind: kind-up
 ifeq ($(E2E_SKIP_BUILD), 0)
-       docker pull apache/apisix:dev
-       docker tag apache/apisix:dev $(LOCAL_REGISTRY)/apache/apisix:dev
+       docker pull apache/apisix:2.12.0-alpine
+       docker tag apache/apisix:2.12.0-alpine 
$(LOCAL_REGISTRY)/apache/apisix:dev
        docker push $(LOCAL_REGISTRY)/apache/apisix:dev
 
        docker pull bitnami/etcd:3.4.14-debian-10-r0
diff --git a/pkg/apisix/plugin.go b/pkg/apisix/plugin.go
index 92a9c96..43e1f3b 100644
--- a/pkg/apisix/plugin.go
+++ b/pkg/apisix/plugin.go
@@ -41,7 +41,7 @@ func (p *pluginClient) List(ctx context.Context) ([]string, 
error) {
                zap.String("cluster", "default"),
                zap.String("url", p.url),
        )
-       pluginList, err := p.cluster.getList(ctx, p.url+"/list", "plugin")
+       pluginList, err := p.cluster.getList(ctx, p.url+"?all=true", "plugin")
        if err != nil {
                log.Errorf("failed to list plugins' names: %s", err)
                return nil, err
diff --git a/pkg/ingress/status.go b/pkg/ingress/status.go
index cda58a5..8274610 100644
--- a/pkg/ingress/status.go
+++ b/pkg/ingress/status.go
@@ -190,6 +190,22 @@ func (c *Controller) recordStatus(at interface{}, reason 
string, err error, stat
                                )
                        }
                }
+       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 *networkingv1.Ingress:
                // set to status
                lbips, err := c.ingressLBStatusIPs()

Reply via email to