Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
add apiversion to component lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
cvignola committed Dec 20, 2019
1 parent c671f8f commit 892f39b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class PodlistFunction implements Function {

private static final String DEPLOYMENT_KIND = "Deployment";
private static final String POD_KIND = "Pod";
private static final String POD_APIVERSION = "/v1"; // means group="", version=v1
private static final String METADATA_PROPERTY_NAME = "metadata";

@Override
Expand Down Expand Up @@ -91,7 +92,7 @@ private String getPodListFromDeployment(ApiClient client, JsonObject resource, C
if (!selector.isEmpty()) {
final String labelSelector = selector.toString();
try {
Object o = registry.listClusterObject(client, POD_KIND, "", null, labelSelector, null, null);
Object o = registry.listClusterObject(client, POD_KIND, POD_APIVERSION, null, labelSelector, null, null);
List<JsonObject> items = KAppNavEndpoint.getItemsAsList(client, o);

items.forEach(v -> {
Expand Down

0 comments on commit 892f39b

Please sign in to comment.