kubesphere-sigs / ks-devops-plugin Goto Github PK
View Code? Open in Web Editor NEWThis is a DevOps plugin of KubeSphere.
License: Apache License 2.0
This is a DevOps plugin of KubeSphere.
License: Apache License 2.0
If we request /kapis/resources.kubesphere.io/v1alpha3/namespaces/my-project/s2ibuilders?sortBy=createTime&limit=10
API, the response will be always empty list, even if we have already created a new s2ibuilder. The API is hosted in KubeSphere now, but we have removed CRDs related to DevOps.
I copied the content from LinuxSuRen/kubesphere#8
Recently, I authorized a DevOps project to give an account named test
operator
permission. But when I logged in with test
account and tries to list DevOps projects, a bad gateway error occurred.
/kapis/tenant.kubesphere.io/v1alpha2/workspaces/my-workspace/devops?limit=10
W0802 09:20:58.653225 1 client_config.go:552] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
W0802 09:20:58.655138 1 options.go:107] ks-apiserver starts without redis provided, it will use in memory cache. This may cause inconsistencies when running ks-apiserver with multiple replicas.
I0802 09:20:58.696255 1 apiserver.go:196] Start cache objects
I0802 09:20:59.313052 1 apiserver.go:315] Finished caching objects
I0802 09:20:59.313096 1 apiserver.go:150] Start listening on :9090
&{test [system:authenticated] map[]} my-workspace &{0xc00151d2d0 creationTimestamp false map[] }
2021/08/02 09:21:09 http: panic serving 10.233.66.120:45972: runtime error: invalid memory address or nil pointer dereference
goroutine 702 [running]:
net/http.(*conn).serve.func1(0xc0004bf9a0)
/usr/local/go/src/net/http/server.go:1795 +0x139
panic(0x1a69920, 0x2ec9990)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
devops.kubesphere.io/plugin/pkg/models/tenant.(*tenantOperator).ListDevOpsProjects(0xc000306a50, 0x200bbc0, 0xc00162a0c0, 0xc001c26c94, 0xc, 0xc00162ad80, 0x0, 0x0, 0xc0003fdda0)
/workspace/pkg/models/tenant/devops.go:74 +0x51b
devops.kubesphere.io/plugin/pkg/kapis/tenant/v1alpha2.(*tenantHandler).ListDevOpsProjects(0xc00021a0d0, 0xc0007ac570, 0xc000185d50)
/workspace/pkg/kapis/tenant/v1alpha2/handler.go:69 +0x294
github.com/emicklei/go-restful.(*FilterChain).ProcessFilter(0xc0007ac600, 0xc0007ac570, 0xc000185d50)
/go/pkg/mod/github.com/emicklei/go-restful@v2.14.3+incompatible/filter.go:21 +0x8b
devops.kubesphere.io/plugin/pkg/apiserver.logRequestAndResponse(0xc0007ac570, 0xc000185d50, 0xc0007ac600)
/workspace/pkg/apiserver/apiserver.go:344 +0x82
github.com/emicklei/go-restful.(*FilterChain).ProcessFilter(0xc0007ac600, 0xc0007ac570, 0xc000185d50)
/go/pkg/mod/github.com/emicklei/go-restful@v2.14.3+incompatible/filter.go:19 +0x65
github.com/emicklei/go-restful.(*Container).dispatch(0xc0005f0000, 0x2004e40, 0xc0001e2b60, 0xc0000be700)
/go/pkg/mod/github.com/emicklei/go-restful@v2.14.3+incompatible/container.go:291 +0x48d
net/http.HandlerFunc.ServeHTTP(0xc00021a690, 0x2004e40, 0xc0001e2b60, 0xc0000be700)
/usr/local/go/src/net/http/server.go:2036 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00040c580, 0x2004e40, 0xc0001e2b60, 0xc0000be700)
/usr/local/go/src/net/http/server.go:2416 +0x1bd
github.com/emicklei/go-restful.(*Container).ServeHTTP(0xc0005f0000, 0x2004e40, 0xc0001e2b60, 0xc0000be700)
/go/pkg/mod/github.com/emicklei/go-restful@v2.14.3+incompatible/container.go:311 +0x2c9
devops.kubesphere.io/plugin/pkg/apiserver/filters.WithKubeAPIServer.func1(0x2004e40, 0xc0001e2b60, 0xc0000be700)
/workspace/pkg/apiserver/filters/kubeapiserver.go:62 +0x37f
net/http.HandlerFunc.ServeHTTP(0xc00040ca80, 0x2004e40, 0xc0001e2b60, 0xc0000be700)
/usr/local/go/src/net/http/server.go:2036 +0x44
devops.kubesphere.io/plugin/pkg/apiserver/filters.WithAuthentication.func1(0x2004e40, 0xc0001e2b60, 0xc0000be700)
/workspace/pkg/apiserver/filters/authentication.go:70 +0x5ce
net/http.HandlerFunc.ServeHTTP(0xc00040cb00, 0x2004e40, 0xc0001e2b60, 0xc0000be500)
/usr/local/go/src/net/http/server.go:2036 +0x44
devops.kubesphere.io/plugin/pkg/apiserver/filters.WithRequestInfo.func1(0x2004e40, 0xc0001e2b60, 0xc0000be200)
/workspace/pkg/apiserver/filters/requestinfo.go:70 +0x3c5
net/http.HandlerFunc.ServeHTTP(0xc000610de0, 0x2004e40, 0xc0001e2b60, 0xc0000be200)
/usr/local/go/src/net/http/server.go:2036 +0x44
net/http.serverHandler.ServeHTTP(0xc0005f2380, 0x2004e40, 0xc0001e2b60, 0xc0000be200)
/usr/local/go/src/net/http/server.go:2831 +0xa4
net/http.(*conn).serve(0xc0004bf9a0, 0x200b580, 0xc001b7dfc0)
/usr/local/go/src/net/http/server.go:1919 +0x875
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2957 +0x384
&{test [system:authenticated] map[]} my-workspace &{0xc00165fc30 creationTimestamp false map[] }
2021/08/02 09:21:10 http: panic serving 10.233.66.120:46002: runtime error: invalid memory address or nil pointer dereference
goroutine 650 [running]:
net/http.(*conn).serve.func1(0xc00032da40)
/usr/local/go/src/net/http/server.go:1795 +0x139
panic(0x1a69920, 0x2ec9990)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
devops.kubesphere.io/plugin/pkg/models/tenant.(*tenantOperator).ListDevOpsProjects(0xc000306a50, 0x200bbc0, 0xc001680080, 0xc000dd53b4, 0xc, 0xc001680640, 0x0, 0x0, 0xc0003fdda0)
/workspace/pkg/models/tenant/devops.go:74 +0x51b
devops.kubesphere.io/plugin/pkg/kapis/tenant/v1alpha2.(*tenantHandler).ListDevOpsProjects(0xc00021a0d0, 0xc000812c00, 0xc000183ce0)
/workspace/pkg/kapis/tenant/v1alpha2/handler.go:69 +0x294
github.com/emicklei/go-restful.(*FilterChain).ProcessFilter(0xc000812c90, 0xc000812c00, 0xc000183ce0)
/go/pkg/mod/github.com/emicklei/go-restful@v2.14.3+incompatible/filter.go:21 +0x8b
devops.kubesphere.io/plugin/pkg/apiserver.logRequestAndResponse(0xc000812c00, 0xc000183ce0, 0xc000812c90)
/workspace/pkg/apiserver/apiserver.go:344 +0x82
github.com/emicklei/go-restful.(*FilterChain).ProcessFilter(0xc000812c90, 0xc000812c00, 0xc000183ce0)
/go/pkg/mod/github.com/emicklei/go-restful@v2.14.3+incompatible/filter.go:19 +0x65
github.com/emicklei/go-restful.(*Container).dispatch(0xc0005f0000, 0x2004e40, 0xc0005f20e0, 0xc0005fe400)
/go/pkg/mod/github.com/emicklei/go-restful@v2.14.3+incompatible/container.go:291 +0x48d
net/http.HandlerFunc.ServeHTTP(0xc00021a690, 0x2004e40, 0xc0005f20e0, 0xc0005fe400)
/usr/local/go/src/net/http/server.go:2036 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00040c580, 0x2004e40, 0xc0005f20e0, 0xc0005fe400)
/usr/local/go/src/net/http/server.go:2416 +0x1bd
github.com/emicklei/go-restful.(*Container).ServeHTTP(0xc0005f0000, 0x2004e40, 0xc0005f20e0, 0xc0005fe400)
/go/pkg/mod/github.com/emicklei/go-restful@v2.14.3+incompatible/container.go:311 +0x2c9
devops.kubesphere.io/plugin/pkg/apiserver/filters.WithKubeAPIServer.func1(0x2004e40, 0xc0005f20e0, 0xc0005fe400)
/workspace/pkg/apiserver/filters/kubeapiserver.go:62 +0x37f
net/http.HandlerFunc.ServeHTTP(0xc00040ca80, 0x2004e40, 0xc0005f20e0, 0xc0005fe400)
/usr/local/go/src/net/http/server.go:2036 +0x44
devops.kubesphere.io/plugin/pkg/apiserver/filters.WithAuthentication.func1(0x2004e40, 0xc0005f20e0, 0xc0005fe400)
/workspace/pkg/apiserver/filters/authentication.go:70 +0x5ce
net/http.HandlerFunc.ServeHTTP(0xc00040cb00, 0x2004e40, 0xc0005f20e0, 0xc0005fe300)
/usr/local/go/src/net/http/server.go:2036 +0x44
devops.kubesphere.io/plugin/pkg/apiserver/filters.WithRequestInfo.func1(0x2004e40, 0xc0005f20e0, 0xc0005fe100)
/workspace/pkg/apiserver/filters/requestinfo.go:70 +0x3c5
net/http.HandlerFunc.ServeHTTP(0xc000610de0, 0x2004e40, 0xc0005f20e0, 0xc0005fe100)
/usr/local/go/src/net/http/server.go:2036 +0x44
net/http.serverHandler.ServeHTTP(0xc0005f2380, 0x2004e40, 0xc0005f20e0, 0xc0005fe100)
/usr/local/go/src/net/http/server.go:2831 +0xa4
net/http.(*conn).serve(0xc00032da40, 0x200b580, 0xc000a91080)
/usr/local/go/src/net/http/server.go:1919 +0x875
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2957 +0x384
/kind bug
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.