{"id":25526453,"url":"https://github.com/capacitorset/liqo-broker","last_synced_at":"2026-08-12T18:31:26.058Z","repository":{"id":71258362,"uuid":"462425906","full_name":"CapacitorSet/liqo-broker","owner":"CapacitorSet","description":"A pluggable resource broker for Liqo.","archived":false,"fork":false,"pushed_at":"2022-05-30T12:10:13.000Z","size":343,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-08-04T19:12:18.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CapacitorSet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-22T18:32:00.000Z","updated_at":"2024-02-18T20:36:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"71e600f7-6a45-4a1b-bf11-486abbee8c16","html_url":"https://github.com/CapacitorSet/liqo-broker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CapacitorSet/liqo-broker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CapacitorSet%2Fliqo-broker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CapacitorSet%2Fliqo-broker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CapacitorSet%2Fliqo-broker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CapacitorSet%2Fliqo-broker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CapacitorSet","download_url":"https://codeload.github.com/CapacitorSet/liqo-broker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CapacitorSet%2Fliqo-broker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36577932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-06T04:43:03.162Z","status":"online","status_checked_at":"2026-08-12T02:00:07.134Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-19T21:18:33.355Z","updated_at":"2026-08-12T18:31:26.037Z","avatar_url":"https://github.com/CapacitorSet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# liqo-broker\n\nA pluggable resource broker for [Liqo](https://github.com/liqotech/liqo/).\n\nLiqo-broker offers added-value services to a federation targeting different scenarios:\n\n - **catalog**: the middleman enables the discovery of the resources available on the federation. The customer can then query the catalog and discover the features and IP addresses of the providers, which he can use to open direct peering sessions towards them.\n - **orchestrator**: the customer peers with the middleman, who is in charge of offloading workloads on a series of providers; the customer maintains a direct data plane towards the providers. The choice of providers can be made directly by the customer, or indirectly by specifying criteria based on KPIs (eg. minimum uptime). The added value is in having the visibility over provider metrics to optimize scheduling.\n \u003e Note: at the moment criteria-based selection is not implemented.\n - **aggregator**: the customer peers with the middleman, who is now \"opaque\": it offloads workloads on a series of providers, but the customer has no visibility into the offloading process. The data plane is also going through the aggregator. The added value is in presenting the resources of many providers in an aggregated fashion.\n\n\u003e **Warning**: the orchestrator and the aggregator rely on unsupported modifications to Liqo, and as such they should be considered early proofs-of-concept!\n\n\u003e This project was developed for Liqo v0.4.1; later versions may not be supported.\n\n## Catalog\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./img/catalog.svg\" /\u003e\n\u003c/p\u003e\n\nThe dashed-arrow step (#1) describes the setup phase; the solid-arrow steps (#2 to #4) describe the use phase.\n\n### Installation: provider\n\nThe provider just needs to [install Liqo](https://doc.liqo.io/installation/install/):\n\n\n```sh\nliqoctl install k3s --name=provider # Select a Kubernetes distribution as needed\n```\n\nTo advertise on the catalog, the provider must open a peering towards the catalog cluster, or accept a peering from it:\n\n```sh\n# Run \"liqoctl generate-add-command\" on the broker to get the below command, copy it, and paste it on the provider machine\nliqoctl add --auth-url URL --id ID --token TOKEN\n```\n\n### Installation: middleman\n\nThe middleman also needs to install Liqo, and then run the broker with the `--with-catalog` flag.\n\nEdit the file `k8s/pod.yml` to select the command line flags you don't need (eg. `--with-aggregator`), then run the pod:\n\n```sh\nkubectl apply -f k8s/pod.yml\n```\n\nThe HTTP API will be exposed on port 8000 on the pod; create a `Service` and expose it as needed. The repository contains an example service you can use:\n\n```sh\nkubectl apply -f k8s/http-svc.yml\n```\n\n### Installation: consumer\n\nThe consumer needs to install Liqo alongside a client application (eg. a dashboard) that can interact with the catalog API documented below. Please refer to the installation guide for your client application; no further setup is required for Liqo.\n\n### Usage\n\nThe catalog exposes an HTTP API that describes the clusters it knows (i.e. those that are peered with the catalog, in the current implementation).\n\nIt has a single endpoint, `/api/clusters`, that takes no parameters and returns the list of foreign clusters as Kubernetes JSON. Here's an example (abridged for brevity):\n\n```\n$ curl http://127.0.0.1:8000/api/clusters\n\n[\n  {\n    \"kind\": \"ForeignCluster\",\n    \"apiVersion\": \"discovery.liqo.io/v1alpha1\",\n    \"metadata\": {\n      \"name\": \"polito-labs-79eba8\",\n      \"labels\": {\n        \"discovery.liqo.io/cluster-id\": \"32f0b45b-5c06-4cc4-84b6-03a323ffc93d\",\n        \"discovery.liqo.io/discovery-type\": \"LAN\"\n      }\n    },\n    \"spec\": {\n      \"clusterIdentity\": {\n        \"clusterID\": \"32f0b45b-5c06-4cc4-84b6-03a323ffc93d\",\n        \"clusterName\": \"polito-labs\"\n      },\n      \"outgoingPeeringEnabled\": \"Auto\",\n      \"incomingPeeringEnabled\": \"Auto\",\n      \"networkingEnabled\": \"Yes\",\n      \"foreignAuthUrl\": \"https://194.116.77.112:31520\",\n      \"insecureSkipTLSVerify\": false,\n      \"ttl\": 90\n    }\n  },\n  ...\n]\n```\n\nThis API is meant to be consumed by a client application that can display this information in a user-friendly manner, and optionally allow the user to peer with the cluster.\n\n## Orchestrator\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./img/orchestrator.svg\" /\u003e\n\u003c/p\u003e\n\nThe dashed-arrow steps (#1 to #3) describe the setup phase; the solid-arrow steps (#4 to #6) describe the use phase.\n\n### Installation: provider\n\nThe provider just needs to [install Liqo](https://doc.liqo.io/installation/install/):\n\n\n```sh\nliqoctl install k3s --name=provider # Select a Kubernetes distribution as needed\n```\n\nThen, it must peer with the broker (assuming it has already installed Liqo):\n\n```sh\n# Run \"liqoctl generate-add-command\" on the broker to get the below command, copy it, and paste it on the provider machine\nliqoctl add --auth-url URL --id ID --token TOKEN\n```\n\n### Installation: middleman\n\nThe middleman needs to install Liqo, which must be patched manually to use a [different virtual kubelet](https://github.com/CapacitorSet/liqo-orchestrator-vk) that supports orchestrator networking.\n\nOnce Liqo is installed, edit the `liqo-controller-manager` deployment:\n\n```sh\nkubectl edit deployment -n liqo liqo-controller-manager\n```\n\nSearch for a command-line flag called `kubelet-image`, and set it to `capacitorset/liqo-broker-vk:latest`.\n\nOnce you patched the controller manager, peer with any providers you want to support:\n\n```sh\n# Run \"liqoctl generate-add-command\" on the provider to get the below command, copy it, and paste it on the broker machine\nliqoctl add --auth-url URL --id ID --token TOKEN\n```\n\nFinally, run the broker with the `--with-orchestrator` flag. Edit the file `k8s/pod.yml` to select the command line flags you don't need (eg. `--with-aggregator`), then run the pod:\n\n```sh\nkubectl apply -f k8s/pod.yml\n```\n\nThe HTTP API will be exposed on port 8000 on the pod; create a `Service` and expose it as needed. The repository contains an example service you can use:\n\n```sh\nkubectl apply -f k8s/http-svc.yml\n```\n\n### Installation: consumer\n\nLikewise, the consumer needs to install Liqo and patch the `liqo-controller-manager` deployment. Then, it must peer with *both* the broker and any provider that it will use through the orchestrator.\n\nIn a future development, the orchestrator will expose an API to direct the consumer cluster to peer only with the providers that are effectively in use; in this early proof of concept you have to peer manually.\n\nThe consumer also needs to install a client of their choice (eg. a Web dashboard) to consume the orchestrator API. Please refer to the installation guide of your client for further instructions.\n\n### Usage\n\nMuch like the catalog, the orchestrator exposes an HTTP API. It has two endpoints: `/api/clusters` presents a list of providers for orchestration, and `/api/toggle` enables or disables orchestration on a provider. Again, this API is meant\n\n`/api/clusters` takes no parameters, while `/api/toggle` takes the URL parameters `id` with the cluster ID and `enable` that can be `true` or `false`. For example, to enable the cluster `fb51002c-7f1b-4327-898b-a8a5aa0f6f95` you would use `/api/toggle?id=fb51002c-7f1b-4327-898b-a8a5aa0f6f95\u0026enable=true`.\n\nThis API is meant to be consumed by a client application that presents the list of clusters in a user-friendly way, and allows the consumer to select the clusters they would like.\n\nOnce the consumer has selected some providers of their choice, they can offload applications on the broker as if it were a standard Liqo cluster (eg. using the provided NamespaceOffloading `k8s/nsoffloading.yml` in a namespace they wish to offload). The orchestrator will then re-offload the pods to the selected providers.\n\nNote that the data plane is direct: when the consumer generates traffic towards an offloaded pod, the traffic will be routed directly to the provider, without going through the orchestrator cluster.\n\n## Aggregator\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./img/aggregator.svg\" /\u003e\n\u003c/p\u003e\n\nThe dashed-arrow steps (#1 to #2) describe the setup phase; the solid-arrow steps (#3 to #6) describe the use phase.\n\n(The documentation for the aggregator is work-in-progress.)\n\n\u003c!-- ## Installation\n\n### Requirements\n\n### On the broker's cluster\n\n - Create a pod with this broker (use image `capacitorset/liqo-broker`), and create a service pointing to it.\n \n - Suppose the service is called `broker-svc` in the `broker` namespace, then the address would be `broker-svc.broker.svc.cluster.local`. Edit the `liqo-controller-manager` deployment to add the following flag: `--external-monitor=broker-svc.broker.svc.cluster.local:7000`.\n\n - Create a NamespaceOffloading in the `liqo` namespace with `podOffloadingStrategy: Local`, so that the `liqo-network-manager` service is reflected on the customer's cluster:\n    \n    ```yaml\n    apiVersion: offloading.liqo.io/v1alpha1\n    kind: NamespaceOffloading\n    metadata:\n        name: offloading\n        namespace: liqo\n    spec:\n        namespaceMappingStrategy: DefaultName\n        podOffloadingStrategy: Local\n        clusterSelector:\n            nodeSelectorTerms:\n            - matchExpressions:\n            - key: liqo.io/type\n                operator: In\n                values:\n                - virtual-node\n    ```\n\n - Create an outgoing peering with the customer. This is required to reflect the `liqo-network-manager` service.\n\n### On the customer's cluster\n\n - Take note of the address of the service you reflected in the previous steps on the cluster. For example, if `kubectl get svc -A` shows that the service is called `liqo-network-manager` and belongs to the namespace `liqo-broker-b9d3d5`, then the address would be `liqo-network-manager.liqo-broker-b9d3d5.svc.cluster.local`.\n\n - Edit the `liqo-controller-manager` deployment to add the following command line flags:\n\n\n```\n--kubelet-extra-args=--remote-ipam=server=\u003cthe address you just found\u003e:6000\n--kubelet-image=capacitorset/liqo-broker-vk:latest\n```\n\n[Spiegare perchè vengono fatte varie modifiche, specie perchè modifico i deployment]\n\n## Usage\n\nSimply create Liqo peerings as needed: the broker cluster will present a ResourceOffer that is the sum of all ResourceOffers from clusters with which it has outgoing peerings (the \"provider\" clusters). It will also react to workloads that are offloaded to the broker cluster by offloading them in turn to the provider clusters using a NamespaceOffloading. --\u003e\n\n## Credits\n\nBased on a prototype by [Giuseppe Alicino](https://github.com/giuse2596).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitorset%2Fliqo-broker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapacitorset%2Fliqo-broker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitorset%2Fliqo-broker/lists"}