{"level":"info","ts":1675420439.1297846,"logger":"api.controller","msg":"Reconciling API","request_namespace":"tn-playground-wso2","request_name":"ruian-api"}
{"level":"info","ts":1675420439.2181957,"logger":"apim.login","msg":"Getting clientId and clientSecret from memory"}
{"level":"info","ts":1675420439.3174286,"logger":"apim.import","msg":"Importing API using swagger"}
{"level":"info","ts":1675420439.323991,"logger":"swagger","msg":"Swagger version","version":"3.0.1"}
{"level":"error","ts":1675420439.354647,"logger":"apim.import","msg":"Error when importing the API using swagger","error":"Unable to GET APIs. Status:404 ","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/ubuntu/go/pkg/mod/github.com/go-logr/zapr@v0.2.0/zapr.go:132\ngithub.com/wso2/k8s-api-operator/api-operator/pkg/apim.ImportAPI\n\tapi-operator/pkg/apim/importAPI.go:94\ngithub.com/wso2/k8s-api-operator/api-operator/pkg/controller/api.(*ReconcileAPI).Reconcile\n\tapi-operator/pkg/controller/api/api_controller.go:180\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:256\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\t/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\t/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:90"}
E0203 10:33:59.354787 1 event.go:334] Unsupported event type: 'Error'
{"level":"error","ts":1675420439.3548555,"logger":"controller-runtime.controller","msg":"Reconciler error","controller":"api-controller","request":"tn-playground-wso2/ruian-api","error":"Unable to GET APIs. Status:404 ","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/ubuntu/go/pkg/mod/github.com/go-logr/zapr@v0.2.0/zapr.go:132\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:258\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\t/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\t/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/home/ubuntu/go/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:90"}
Description:
Im using WSO2 APIM 4.1.0 deployed in K8S cluster and I want to use
k8s-api-operatorfor creation of WSO2 APIs from K8S CRDs. When I configured all needed credentials and endpoint and want to letk8s-api-operatorto create API in WSO2 APIM . Then I found out thatk8s-api-operatorusing hard-coded publisher endpoint [here] API v2 for listing APIs but in WSO2 APIM 4.1.0 is only avilable publisher API v3.Affected Product Version:
2.0.3
OS, DB, other environment details and versions:
WSO2 APIM 4.1.0 installed from single instance helm chart here
WSO2 k8s-api-operator 2.0.3 installed form manifest here
Deployed to K8S 1.25.5
Steps to reproduce:
APIM 4.1.0k8s-api-operator 2.0.3apimKeymanagerEndpoint,apimPublisherEndpoint,apimTokenEndpointand WSO2 APIM secrets fork8s-api-operatorswaggerConfigMapNamek8s-api-operatorlogs will be displayed thisCan be also reproduced from Postman
http://WSO2_APIM_HOST:WSO2_APIM_PORT/api/am/publisher/v2/apiswill end with status code 404http://WSO2_APIM_HOST:WSO2_APIM_PORT/api/am/publisher/v3/apiswill end with status code 200 and return list of APIsFor now I will downgrade my WSO2 APIM to version 4.0.0 as quick fix.