mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +00:00
Improved handling of empty or disabled kubernetes configuration
This commit is contained in:
parent
0c6f7dbee1
commit
056e26dfd3
5 changed files with 24 additions and 1 deletions
|
@ -11,6 +11,11 @@ export default async function handler(req, res) {
|
|||
|
||||
try {
|
||||
const kc = getKubeConfig();
|
||||
if (!kc) {
|
||||
return res.status(500).send({
|
||||
error: "No kubernetes configuration"
|
||||
});
|
||||
}
|
||||
const coreApi = kc.makeApiClient(CoreV1Api);
|
||||
const metricsApi = new Metrics(kc);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue