Add some debug logging for k8s

pull/3954/head
shamoon 3 months ago
parent 0d3a57be13
commit d1e5d58e01

@ -22,11 +22,12 @@ export default async function handler(req, res) {
.then((response) => response.body)
.catch((error) => {
logger.error("Error getting ingresses: %d %s %s", error.statusCode, error.body, error.response);
logger.debug(error);
return null;
});
if (!nodes) {
return res.status(500).send({
error: "unknown error",
error: "An error occurred while fetching nodes, check logs for more details.",
});
}
let cpuTotal = 0;

@ -198,6 +198,7 @@ export async function servicesFromKubernetes() {
.then((response) => response.body)
.catch((error) => {
logger.error("Error getting ingresses: %d %s %s", error.statusCode, error.body, error.response);
logger.debug(error);
return null;
});
@ -215,6 +216,7 @@ export async function servicesFromKubernetes() {
error.body,
error.response,
);
logger.debug(error);
}
return [];
@ -231,6 +233,7 @@ export async function servicesFromKubernetes() {
error.body,
error.response,
);
logger.debug(error);
}
return [];
@ -300,6 +303,7 @@ export async function servicesFromKubernetes() {
constructedService = JSON.parse(substituteEnvironmentVars(JSON.stringify(constructedService)));
} catch (e) {
logger.error("Error attempting k8s environment variable substitution.");
logger.debug(e);
}
return constructedService;

Loading…
Cancel
Save