Skip to content

Commit

Permalink
fix: ApisixClusterConfig e2e test case (#859)
Browse files Browse the repository at this point in the history
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
  • Loading branch information
tao12345666333 committed Apr 22, 2022
1 parent fd76c2a commit d1bb4ac
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/apisix/plugin.go
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions pkg/ingress/status.go
Expand Up @@ -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()
Expand Down

0 comments on commit d1bb4ac

Please sign in to comment.