mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-04 06:23:40 +01:00
Added "external" boolean annotation to specify external services
External services define a kubernetes service pointing to an application hosted outside of the cluster. These services should not attempt to get the status based on kubernetes deployments. The new boolean flag disables this functionality. Since this is an edge case, the default value is "false".
This commit is contained in:
parent
601edb8d6b
commit
f8f96645b0
@ -91,7 +91,7 @@ export default function Item({ service }) {
|
|||||||
<span className="sr-only">View container stats</span>
|
<span className="sr-only">View container stats</span>
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
{service.app && (
|
{(service.app && !service.external) && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => (statsOpen ? closeStats() : setStatsOpen(true))}
|
onClick={() => (statsOpen ? closeStats() : setStatsOpen(true))}
|
||||||
|
@ -164,7 +164,11 @@ export async function servicesFromKubernetes() {
|
|||||||
weight: ingress.metadata.annotations[`${ANNOTATION_BASE}/weight`] || '0',
|
weight: ingress.metadata.annotations[`${ANNOTATION_BASE}/weight`] || '0',
|
||||||
icon: ingress.metadata.annotations[`${ANNOTATION_BASE}/icon`] || '',
|
icon: ingress.metadata.annotations[`${ANNOTATION_BASE}/icon`] || '',
|
||||||
description: ingress.metadata.annotations[`${ANNOTATION_BASE}/description`] || '',
|
description: ingress.metadata.annotations[`${ANNOTATION_BASE}/description`] || '',
|
||||||
|
external: false,
|
||||||
};
|
};
|
||||||
|
if (ingress.metadata.annotations[`${ANNOTATION_BASE}/external`]) {
|
||||||
|
constructedService.external = String(ingress.metadata.annotations[`${ANNOTATION_BASE}/external`]).toLowerCase() === "true"
|
||||||
|
}
|
||||||
if (ingress.metadata.annotations[ANNOTATION_POD_SELECTOR]) {
|
if (ingress.metadata.annotations[ANNOTATION_POD_SELECTOR]) {
|
||||||
constructedService.podSelector = ingress.metadata.annotations[ANNOTATION_POD_SELECTOR];
|
constructedService.podSelector = ingress.metadata.annotations[ANNOTATION_POD_SELECTOR];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user