mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-22 22:05:18 +01:00
Enhancement: support multiple instance annotation for Kubernetes Automatic Service Discovery (#3590)
This commit is contained in:
parent
15cc1d98c5
commit
35dd7ec230
@ -98,6 +98,8 @@ When the Kubernetes cluster connection has been properly configured, this servic
|
||||
|
||||
If you are using multiple instances of homepage, an `instance` annotation can be specified to limit services to a specific instance. If no instance is provided, the service will be visible on all instances.
|
||||
|
||||
If you have a single service that needs to be shown on multiple specific instances of homepage (but not on all of them), the service can be annotated by multiple `instance.name` annotations, where `name` can be the names of your specific multiple homepage instances. For example, a service that is annotated with `gethomepage.dev/instance.public: ""` and `gethomepage.dev/instance.internal: ""` will be shown on `public` and `internal` homepage instances.
|
||||
|
||||
### Traefik IngressRoute support
|
||||
|
||||
Homepage can also read ingresses defined using the Traefik IngressRoute custom resource definition. Due to the complex nature of Traefik routing rules, it is required for the `gethomepage.dev/href` annotation to be set:
|
||||
|
@ -254,7 +254,8 @@ export async function servicesFromKubernetes() {
|
||||
ingress.metadata.annotations &&
|
||||
ingress.metadata.annotations[`${ANNOTATION_BASE}/enabled`] === "true" &&
|
||||
(!ingress.metadata.annotations[`${ANNOTATION_BASE}/instance`] ||
|
||||
ingress.metadata.annotations[`${ANNOTATION_BASE}/instance`] === instanceName),
|
||||
ingress.metadata.annotations[`${ANNOTATION_BASE}/instance`] === instanceName ||
|
||||
`${ANNOTATION_BASE}/instance.${instanceName}` in ingress.metadata.annotations),
|
||||
)
|
||||
.map((ingress) => {
|
||||
let constructedService = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user