k8s: Support app ingress annotation (#2198)

pull/2207/head
shamoon 1 year ago committed by GitHub
parent b8eda91005
commit 4248db7f21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -110,6 +110,7 @@ metadata:
gethomepage.dev/description: Media Server
gethomepage.dev/group: Media
gethomepage.dev/icon: emby.png
gethomepage.dev/app: emby-app # optional, may be needed if app.kubernetes.io/name != ingress metadata.name
gethomepage.dev/name: Emby
gethomepage.dev/widget.type: "emby"
gethomepage.dev/widget.url: "https://emby.example.com"

@ -45,7 +45,7 @@ export default async function handler(req, res) {
if (pods.length === 0) {
res.status(404).send({
error: "not found"
error: `no pods found with namespace=${namespace} and labelSelector=${labelSelector}`,
});
return;
}

@ -42,7 +42,7 @@ export default async function handler(req, res) {
if (pods.length === 0) {
res.status(404).send({
error: "not found",
error: `no pods found with namespace=${namespace} and labelSelector=${labelSelector}`,
});
return;
}

@ -237,7 +237,7 @@ export async function servicesFromKubernetes() {
)
.map((ingress) => {
let constructedService = {
app: ingress.metadata.name,
app: ingress.metadata.annotations[`${ANNOTATION_BASE}/app`] || ingress.metadata.name,
namespace: ingress.metadata.namespace,
href: ingress.metadata.annotations[`${ANNOTATION_BASE}/href`] || getUrlFromIngress(ingress),
name: ingress.metadata.annotations[`${ANNOTATION_BASE}/name`] || ingress.metadata.name,

Loading…
Cancel
Save