1. add an extended API of listing all pods mounting the specific PVC. 2. remove redundant logs
This commit is contained in:
14
pkg/apis/v1alpha/volumes/volumes_handler.go
Normal file
14
pkg/apis/v1alpha/volumes/volumes_handler.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package volumes
|
||||
|
||||
import (
|
||||
"github.com/emicklei/go-restful"
|
||||
"kubesphere.io/kubesphere/pkg/filter/route"
|
||||
"kubesphere.io/kubesphere/pkg/models"
|
||||
)
|
||||
|
||||
func Register(ws *restful.WebService, subPath string) {
|
||||
ws.Route(ws.GET(subPath+"/namespaces/{namespace}/persistentvolumeclaims/{pvc}/pods").
|
||||
To(models.GetPodListByPvc).Filter(route.RouteLogging)).
|
||||
Consumes(restful.MIME_JSON, restful.MIME_XML).
|
||||
Produces(restful.MIME_JSON)
|
||||
}
|
||||
Reference in New Issue
Block a user