Skip to content

Commit 33cc99a

Browse files
committed
Add doc for resource plugins and change exposed helm parameter name
1 parent 62b9aa4 commit 33cc99a

File tree

8 files changed

+17
-12
lines changed

8 files changed

+17
-12
lines changed

cmd/liqo-controller-manager/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ func main() {
120120
autoJoin := flag.Bool("auto-join-discovered-clusters", true, "Whether to automatically peer with discovered clusters")
121121

122122
// Resource sharing parameters
123-
externalResourceMonitorAddress := flag.String(consts.ExternalResourceMonitorParameter, "",
124-
"The address of a resource monitor service (default: monitor local resources)")
123+
resourcePluginAddress := flag.String(consts.ResourcePluginAddressParameter, "",
124+
"The address of a resource plugin service (default: monitor local resources)")
125125
flag.Var(&clusterLabels, consts.ClusterLabelsParameter,
126126
"The set of labels which characterizes the local cluster when exposed remotely as a virtual node")
127127
resourceSharingPercentage := argsutils.Percentage{Val: 50}
@@ -253,8 +253,8 @@ func main() {
253253

254254
var resourceRequestReconciler *resourceRequestOperator.ResourceRequestReconciler
255255
var monitor resourcemonitors.ResourceReader
256-
if *externalResourceMonitorAddress != "" {
257-
externalMonitor, err := resourcemonitors.NewExternalMonitor(ctx, *externalResourceMonitorAddress, 3*time.Second)
256+
if *resourcePluginAddress != "" {
257+
externalMonitor, err := resourcemonitors.NewExternalMonitor(ctx, *resourcePluginAddress, 3*time.Second)
258258
if err != nil {
259259
klog.Errorf("error on creating external resource monitor: %s", err)
260260
os.Exit(1)

deployments/liqo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
| awsConfig.region | string | `""` | AWS region where the clsuter is runnnig |
2626
| awsConfig.secretAccessKey | string | `""` | secretAccessKey for the Liqo user |
2727
| controllerManager.config.enableResourceEnforcement | bool | `false` | It enforces offerer-side that offloaded pods do not exceed offered resources (based on container limits). This feature is suggested to be enabled when consumer-side enforcement is not sufficient. It has the same tradeoffs of resource quotas (i.e, it requires all offloaded pods to have resource limits set). |
28-
| controllerManager.config.externalMonitorAddress | string | `""` | The address of an external resource monitor service, overriding the default resource computation logic based on the percentage of available resources. Leave it empty to use the standard local resource monitor. |
2928
| controllerManager.config.offerUpdateThresholdPercentage | string | `""` | the threshold (in percentage) of resources quantity variation which triggers a ResourceOffer update. |
29+
| controllerManager.config.resourcePluginAddress | string | `""` | The address of an external resource plugin service (see https://github.com/liqotech/liqo-resource-plugins for additional information), overriding the default resource computation logic based on the percentage of available resources. Leave it empty to use the standard local resource monitor. |
3030
| controllerManager.config.resourceSharingPercentage | int | `30` | It defines the percentage of available cluster resources that you are willing to share with foreign clusters. |
3131
| controllerManager.imageName | string | `"ghcr.io/liqotech/liqo-controller-manager"` | controller-manager image repository |
3232
| controllerManager.pod.annotations | object | `{}` | controller-manager pod annotations |

deployments/liqo/templates/liqo-controller-manager-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ spec:
128128
{{ fail (printf "Unsupported resource type \"%s\" for virtual kubelet containers' limits" $resource) }}
129129
{{- end }}
130130
{{- end }}
131-
{{- if .Values.controllerManager.config.externalMonitorAddress }}
132-
- --external-monitor={{ .Values.controllerManager.config.externalMonitorAddress }}
131+
{{- if .Values.controllerManager.config.resourcePluginAddress }}
132+
- --resource-plugin-address={{ .Values.controllerManager.config.resourcePluginAddress }}
133133
- --offer-update-threshold-percentage={{ .Values.controllerManager.config.offerUpdateThresholdPercentage | default 0 }}
134134
{{- else }}
135135
- --offer-update-threshold-percentage={{ .Values.controllerManager.config.offerUpdateThresholdPercentage | default 5 }}

deployments/liqo/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ controllerManager:
3333
resourceSharingPercentage: 30
3434
# -- the threshold (in percentage) of resources quantity variation which triggers a ResourceOffer update.
3535
offerUpdateThresholdPercentage: ""
36-
# -- The address of an external resource monitor service, overriding the default resource computation logic based on the percentage of available resources. Leave it empty to use the standard local resource monitor.
37-
externalMonitorAddress: ""
36+
# -- The address of an external resource plugin service (see https://github.com/liqotech/liqo-resource-plugins for additional information), overriding the default resource computation logic based on the percentage of available resources. Leave it empty to use the standard local resource monitor.
37+
resourcePluginAddress: ""
3838
# -- It enforces offerer-side that offloaded pods do not exceed offered resources (based on container limits).
3939
# This feature is suggested to be enabled when consumer-side enforcement is not sufficient.
4040
# It has the same tradeoffs of resource quotas (i.e, it requires all offloaded pods to have resource limits set).

docs/_toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ subtrees:
3838

3939
- caption: Add-Ons
4040
entries:
41+
- url: https://github.com/liqotech/liqo-resource-plugins
42+
title: Liqo Resource Plugins
4143
- url: https://github.com/LucaRocco/liqo-public-peering-dashboard
4244
title: Public Peering Dashboard
4345

docs/installation/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ The main control plane flags include:
351351
This name is propagated to remote clusters during the peering process, and used to identify the corresponding virtual nodes and the technical resources leveraged for the negotiation process. Additionally, it is leveraged as part of the suffix to ensure namespace names uniqueness during the offloading process. In case a cluster name is not specified, it is defaulted to that of the cluster in the cloud provider, if any, or it is automatically generated.
352352
* `--cluster-labels`: a set of **labels** (i.e., key/value pairs) **identifying the cluster in Liqo** (e.g., geographical region, Kubernetes distribution, cloud provider, ...) and automatically propagated during the peering process to the corresponding virtual nodes.
353353
These labels can be used later to **restrict workload offloading to a subset of clusters**, as detailed in the [namespace offloading usage section](/usage/namespace-offloading).
354-
* `--sharing-percentage`: the maximum percentage of available **cluster resources** that could be shared with remote clusters.
354+
* `--sharing-percentage`: the maximum percentage of available **cluster resources** that could be shared with remote clusters. This is the Liqo's default behavior but you can change it by using a custom [resource plugin](https://github.com/liqotech/liqo-resource-plugins).
355355

356356
### Networking
357357

docs/usage/peer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ The following sections present the respective procedures to **peer a local clust
1717
At the end of the process, a new **virtual node** is created in the consumer, abstracting the resources shared by the provider, and enabling seamless **pod offloading** to the remote cluster.
1818
Additional details are also provided to enable the reverse peering direction, hence achieving a **bidirectional peering**, allowing both clusters to offload a part of their workloads to the other.
1919

20+
By default, Liqo shares a configurable percentage of the currently available resources of the **provider** cluster with **consumers**.
21+
You can change this behavior by using a custom [resource plugin](https://github.com/liqotech/liqo-resource-plugins).
22+
2023
All examples leverage two different *contexts* to refer to *consumer* and *provider* clusters, respectively named `consumer` and `provider`.
2124

2225
```{admonition} Note

pkg/consts/parameters.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ const (
2626
// GenerateNameParameter is the name of the parameter specifying whether to generate a random name for the cluster.
2727
GenerateNameParameter = "generate-name"
2828

29-
// ExternalResourceMonitorParameter is the name of the parameter specifying the address of an ExternalResourceMonitor.
30-
ExternalResourceMonitorParameter = "external-monitor"
29+
// ResourcePluginAddressParameter is the name of the parameter specifying the address of a resource plugin.
30+
ResourcePluginAddressParameter = "resource-plugin-address"
3131
)

0 commit comments

Comments
 (0)