This repository was archived by the owner on Jan 31, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package svs.doido.mongo; | ||
|
||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.core.MediaType; | ||
import io.fabric8.kubernetes.client.KubernetesClient; | ||
import java.util.List; | ||
import jakarta.inject.Inject; | ||
import svs.doido.mongo.dto.Configmap; | ||
import svs.doido.mongo.kubernetes.Configmap.Read; | ||
|
||
@Path("/configmap") | ||
public class ConfigmapApi { | ||
|
||
private final KubernetesClient kubernetesClient; | ||
|
||
@Inject | ||
Read cfg; | ||
|
||
public ConfigmapApi(KubernetesClient kubernetesClient) { | ||
this.kubernetesClient = kubernetesClient; | ||
} | ||
|
||
@GET | ||
@Path("/{namespace}/{configmapName}") | ||
@Produces(MediaType.APPLICATION_JSON) | ||
public Configmap ConfigmapApi(String nameespac, String configmapName) { | ||
return kubernetesClient.pods().inNamespace(namespace).list().getItems(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters