Skip to main content
added 10 characters in body
Source Link
PJEM
  • 677
  • 19
  • 39

I need to get all resources based on label, I used the following code which works, However, it takes too much time ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?

resource.NewBuilder(flags).
   Unstructured().
   ResourceTypes(res...).
   NamespaceParam("vrf").AllNamespaces(false).
   LabelSelectorParam("a=b").SelectAllParam(selector == "").
   Flatten().
   Latest().Do().Object()

https://pkg.go.dev/k8s.io/[email protected]/pkg/resource#Builder

As I already using label and ns, not sure what should else I do in this case.

Ive checked the cluster connection and it seems that everything is ok, running regular kubectlkubectl are getting very fastvery fast response, just this query took much time.

I need to get all resources based on label, I used the following code which works, However, it takes too much time ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?

resource.NewBuilder(flags).
   Unstructured().
   ResourceTypes(res...).
   NamespaceParam("vrf").AllNamespaces(false).
   LabelSelectorParam("a=b").SelectAllParam(selector == "").
   Flatten().
   Latest().Do().Object()

https://pkg.go.dev/k8s.io/[email protected]/pkg/resource#Builder

As I already using label and ns, not sure what should else I do in this case.

Ive checked the cluster connection and it seems that everything is ok, running regular kubectl are getting very fast response, just this query took much time.

I need to get all resources based on label, I used the following code which works, However, it takes too much time ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?

resource.NewBuilder(flags).
   Unstructured().
   ResourceTypes(res...).
   NamespaceParam("vrf").AllNamespaces(false).
   LabelSelectorParam("a=b").SelectAllParam(selector == "").
   Flatten().
   Latest().Do().Object()

https://pkg.go.dev/k8s.io/[email protected]/pkg/resource#Builder

As I already using label and ns, not sure what should else I do in this case.

Ive checked the cluster connection and it seems that everything is ok, running regular kubectl are getting very fast response, just this query took much time.

added 164 characters in body
Source Link
PJEM
  • 677
  • 19
  • 39

I need to get all resources based on label, I used the following code which works, However, it takes too much time ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?

resource.NewBuilder(flags).
   Unstructured().
   ResourceTypes(res...).
   NamespaceParam("vrf").AllNamespaces(false).
   LabelSelectorParam("a=b").SelectAllParam(selector == "").
   Flatten().
   Latest().Do().Object()

https://pkg.go.dev/k8s.io/[email protected]/pkg/resource#Builder

As I already using label and ns, not sure what should else I do in this case.

Ive checked the cluster connection and it seems that everything is ok, running regular kubectl are getting very fast response, just this query took much time.

I need to get all resources based on label, I used the following code which works, However, it takes too much time ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?

resource.NewBuilder(flags).
   Unstructured().
   ResourceTypes(res...).
   NamespaceParam("vrf").AllNamespaces(false).
   LabelSelectorParam("a=b").SelectAllParam(selector == "").
   Flatten().
   Latest().Do().Object()

https://pkg.go.dev/k8s.io/[email protected]/pkg/resource#Builder

As I already using label and ns, not sure what should else I do in this case

I need to get all resources based on label, I used the following code which works, However, it takes too much time ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?

resource.NewBuilder(flags).
   Unstructured().
   ResourceTypes(res...).
   NamespaceParam("vrf").AllNamespaces(false).
   LabelSelectorParam("a=b").SelectAllParam(selector == "").
   Flatten().
   Latest().Do().Object()

https://pkg.go.dev/k8s.io/[email protected]/pkg/resource#Builder

As I already using label and ns, not sure what should else I do in this case.

Ive checked the cluster connection and it seems that everything is ok, running regular kubectl are getting very fast response, just this query took much time.

added 80 characters in body
Source Link
PJEM
  • 677
  • 19
  • 39

I need to get all resources based on label, I used the following code which works, However, it takes too much time ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?

resource.NewBuilder(flags).
   Unstructured().
   ResourceTypes(res...).
   NamespaceParam("vrf").AllNamespaces(false).
   LabelSelectorParam("a=b").SelectAllParam(selector == "").
   Flatten().
   Latest().Do().Object()

https://pkg.go.dev/k8s.io/[email protected]/pkg/resource#Builder

As I already using label and ns, not sure what should else I do in this case

I need to get all resources based on label, I used the following code which works, However, it takes too much time ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?

resource.NewBuilder(flags).
   Unstructured().
   ResourceTypes(res...).
   NamespaceParam("vrf").AllNamespaces(false).
   LabelSelectorParam("a=b").SelectAllParam(selector == "").
   Flatten().
   Latest().Do().Object()

https://pkg.go.dev/k8s.io/[email protected]/pkg/resource#Builder

I need to get all resources based on label, I used the following code which works, However, it takes too much time ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?

resource.NewBuilder(flags).
   Unstructured().
   ResourceTypes(res...).
   NamespaceParam("vrf").AllNamespaces(false).
   LabelSelectorParam("a=b").SelectAllParam(selector == "").
   Flatten().
   Latest().Do().Object()

https://pkg.go.dev/k8s.io/[email protected]/pkg/resource#Builder

As I already using label and ns, not sure what should else I do in this case

added 72 characters in body
Source Link
PJEM
  • 677
  • 19
  • 39
Loading
Source Link
PJEM
  • 677
  • 19
  • 39
Loading