Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] improve OffloadingBackOff warning message and documentation #2975

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions docs/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ You can find additional information [here](https://github.com/liqotech/liqo/issu

### Why DaemonSets pods (e.g., Kube-Proxy, CNI pods) scheduled on virtual nodes are in OffloadingBackOff?

The majority of DaemonsSets pods (e.g., Kube-Proxy, CNI pods) that are scheduled on Liqo virtual nodes will result in the **OffloadingBackOff** state.
This generally does not represent a problem.
It is recommended to prevent the scheduling of a DaemonSet pod on a virtual node if needed, using the following *NodeAffinity*:
The virtual nodes generated by Liqo have a [taint](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) that prevents pods from being scheduled on a virtual node (so on the remote cluster) unless the pod is a created in an [offloaded namespace](../usage/namespace-offloading.md).

However, the majority of DaemonsSets (e.g., Kube-Proxy, CNI pods) have pretty wide tolerations to make sure that their pods are created in each node of the cluster.
As a result, a pod is forced to be scheduled on a Liqo virtual node, which rejects it and puts the pod in the **OffloadingBackOff** state.
While this is generally not an issue, during upgrades of those applications, the pod in the **OffloadingBackOff** state might be interpreted as an upgrade failure.

A strategy to prevent the scheduling of a DaemonSet pod on Liqo virtual nodes is using *NodeAffinity*.
For example, you might add the following under the `.spec.template.spec.affinity` field of your DaemonSet:

```yaml
nodeAffinity:
Expand All @@ -47,6 +52,8 @@ nodeAffinity:
operator: DoesNotExist
```

This ensures that a pod is **not** created on any nodes with the `liqo.io/type` label.

(FAQInstallationSection)=

## Installation
Expand Down Expand Up @@ -87,8 +94,8 @@ At this point, you should be able to delete the ForeignCluster.
If there are no peerings left you can uninstall Liqo if needed.

```{warning}
This is a not recommended solution, use this only as a last resort if no other viable options are possible.
Future upgrades will make it easier to unpeer a cluster or uninstall Liqo.
This is a not recommended solution, use this only as a last resort if no other viable options are possible.
Future upgrades will make it easier to unpeer a cluster or uninstall Liqo.
```

(FAQPeerOverIngress)=
Expand Down
10 changes: 9 additions & 1 deletion pkg/virtualKubelet/forge/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"

offloadingv1beta1 "github.com/liqotech/liqo/apis/offloading/v1beta1"
"github.com/liqotech/liqo/pkg/consts"
)

const (
Expand Down Expand Up @@ -78,7 +79,14 @@ func EventFailedDeletionMsg(err error) string {

// EventReflectionDisabledMsg returns the message for the event when reflection is disabled for the given namespace.
func EventReflectionDisabledMsg(namespace string) string {
return fmt.Sprintf("Reflection to cluster %q disabled for namespace %q", RemoteCluster, namespace)
return fmt.Sprintf("Reflection to cluster %q disabled for namespace %q. "+
"If this is a DaemonSet scheduling pods in all the nodes across the cluster, "+
"you might want to prevent scheduling on Liqo Virtual Nodes. "+
"You can configure the rules under `spec.template.spec.affinity.nodeAffinity` so that the pods "+
"are not scheduled on Nodes having the label %s=%s. "+
"For further info check the documentation.",
RemoteCluster, namespace, consts.TypeLabel, consts.TypeNode,
)
}

// EventReflectionDisabledErrorMsg returns the message for the event when reflection is disabled for the given namespace, and an error occurs.
Expand Down
Loading