mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Fixed lint issues.
This commit is contained in:
@@ -32,8 +32,8 @@ export default async function handler(req, res) {
|
||||
const podsResponse = await coreApi
|
||||
.listNamespacedPod(
|
||||
{
|
||||
namespace: namespace,
|
||||
labelSelector:labelSelector
|
||||
namespace,
|
||||
labelSelector
|
||||
}
|
||||
)
|
||||
.then((response) => response.body)
|
||||
|
||||
@@ -29,8 +29,8 @@ export default async function handler(req, res) {
|
||||
const podsResponse = await coreApi
|
||||
.listNamespacedPod(
|
||||
{
|
||||
namespace: namespace,
|
||||
labelSelector:labelSelector
|
||||
namespace,
|
||||
labelSelector
|
||||
}
|
||||
)
|
||||
.then((response) => response)
|
||||
|
||||
@@ -36,7 +36,11 @@ export const getKubeConfig = () => {
|
||||
export async function checkCRD(name, kc, logger) {
|
||||
const apiExtensions = kc.makeApiClient(ApiextensionsV1Api);
|
||||
const exist = await apiExtensions
|
||||
.readCustomResourceDefinitionStatus({name:name})
|
||||
.readCustomResourceDefinitionStatus(
|
||||
{
|
||||
name
|
||||
}
|
||||
)
|
||||
.then(() => true)
|
||||
.catch(async (error) => {
|
||||
if (error.statusCode === 403) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { CustomObjectsApi, CoreV1Api, CustomObjectsApiListNamespacedCustomObjectRequest } from "@kubernetes/client-node";
|
||||
import { parseAppSegmentConfig } from "next/dist/build/segment-config/app/app-segment-config";
|
||||
import { CustomObjectsApi, CoreV1Api } from "@kubernetes/client-node";
|
||||
|
||||
import { getKubernetes, getKubeConfig, HTTPROUTE_API_GROUP, HTTPROUTE_API_VERSION } from "utils/config/kubernetes";
|
||||
import createLogger from "utils/logger";
|
||||
@@ -15,9 +14,16 @@ export default async function listHttpRoute() {
|
||||
|
||||
if (gateway) {
|
||||
// httproutes
|
||||
const getHttpRoute = async (namespace) => {
|
||||
return crd
|
||||
.listNamespacedCustomObject({ group: HTTPROUTE_API_GROUP, version: HTTPROUTE_API_VERSION, namespace: namespace, plural: "httproutes" })
|
||||
const getHttpRoute = async (namespace) =>
|
||||
crd
|
||||
.listNamespacedCustomObject(
|
||||
{
|
||||
group: HTTPROUTE_API_GROUP,
|
||||
version: HTTPROUTE_API_VERSION,
|
||||
namespace,
|
||||
plural: "httproutes"
|
||||
}
|
||||
)
|
||||
.then((response) => {
|
||||
const [httpRoute] = response.items;
|
||||
return httpRoute;
|
||||
@@ -26,7 +32,7 @@ export default async function listHttpRoute() {
|
||||
logger.error("Error getting httproutes: %d %s %s", error.statusCode, error.body, error.response);
|
||||
logger.debug(error);
|
||||
return null;
|
||||
});}
|
||||
});
|
||||
// namespaces
|
||||
const namespaces = await core
|
||||
.listNamespace()
|
||||
|
||||
Reference in New Issue
Block a user