Skip to content

Commit 7324750

Browse files
committed
feat: add helm values for affinity and ns on fabric ds
1 parent 7bce362 commit 7324750

File tree

3 files changed

+31
-10
lines changed

3 files changed

+31
-10
lines changed

deployments/liqo/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
| authentication.awsConfig.useExistingSecret | bool | `false` | Use an existing secret to configure the AWS credentials. |
1313
| authentication.enabled | bool | `true` | Enable/Disable the authentication module. |
1414
| authentication.tlsCompatibilityMode | bool | `false` | Enable TLS compatibility mode for client certificates and keys. If set to true, Liqo will use widely supported algorithm (RSA) instead of Ed25519 (default) for generating private keys and CSRs. Enable this option to ensure compatibility with systems that do not yet support Ed25519 as signature algorithm. |
15-
| common.affinity | object | `{}` | Affinity for all liqo pods, excluding virtual kubelet. |
15+
| common.affinity | object | `{}` | Affinity for all liqo pods, excluding virtual kubelet pod and fabric daemonset. |
1616
| common.extraArgs | list | `[]` | Extra arguments for all liqo pods, excluding virtual kubelet. |
1717
| common.globalAnnotations | object | `{}` | Global annotations to be added to all resources created by Liqo controllers |
1818
| common.globalLabels | object | `{"liqo.io/managed":"true"}` | Global labels to be added to all resources created by Liqo controllers |
19-
| common.nodeSelector | object | `{}` | NodeSelector for all liqo pods, excluding virtual kubelet. |
20-
| common.tolerations | list | `[]` | Tolerations for all liqo pods, excluding virtual kubelet. |
19+
| common.nodeSelector | object | `{}` | NodeSelector for all liqo pods, excluding virtual kubelet pod and fabric daemonset. |
20+
| common.tolerations | list | `[]` | Tolerations for all liqo pods, excluding virtual kubelet pod and fabric daemonset. |
2121
| controllerManager.config.defaultLimitsEnforcement | string | `"None"` | Defines how strict is the enforcement of the quota offered by the remote cluster. enableResourceEnforcement must be enabled to use this feature. Possible values are: None, Soft, Hard. None: the offloaded pods might not have the resource `requests` or `limits`. Soft: it forces the offloaded pods to have `requests` set. If the pods go over the requests, the total used resources might go over the quota. Hard: it forces the offloaded pods to have `limits` and `requests` set, with `requests` == `limits`. This is the safest mode as the consumer cluster cannot go over the quota. |
2222
| controllerManager.config.enableNodeFailureController | bool | `false` | Ensure offloaded pods running on a failed node are evicted and rescheduled on a healthy node, preventing them to remain in a terminating state indefinitely. This feature can be useful in case of remote node failure to guarantee better service continuity and to have the expected pods workload on the remote cluster. However, enabling this feature could produce zombies in the worker node, in case the node returns Ready again without a restart. |
2323
| controllerManager.config.enableResourceEnforcement | bool | `true` | 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 makes sure that the sum of the requests of the offloaded pods never exceeds the quota offered by the remote cluster. The quota can be still exceeded if no limits and requests are defined in the offloaded pods or if the limits are larger than the requests. For a stricter enforcement, the defaultLimitsEnforcement can be set to Hard. |
@@ -86,19 +86,21 @@
8686
| nameOverride | string | `""` | Override the standard name used by Helm and associated to Kubernetes/Liqo resources. |
8787
| networking.clientResources | list | `[{"apiVersion":"networking.liqo.io/v1beta1","resource":"wggatewayclients"}]` | Set the list of resources that implement the GatewayClient |
8888
| networking.enabled | bool | `true` | Use the default Liqo networking module. |
89+
| networking.fabric.affinity | object | `{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"liqo.io/type","operator":"NotIn","values":["virtual-node"]}]}]}}}` | Affinity for the fabric pod. |
8990
| networking.fabric.config.fullMasquerade | bool | `false` | Enabe/Disable the full masquerade mode for the fabric pod. It means that all traffic will be masquerade using the first external cidr IP, instead of using the pod IP. Full masquerade is useful when the cluster nodeports uses a PodCIDR IP to masqerade the incoming traffic. IMPORTANT: Please consider that enabling this feature will masquerade the source IP of traffic towards a remote cluster, making impossible for a pod that receives the traffic to know the original source IP. |
9091
| networking.fabric.config.gatewayMasqueradeBypass | bool | `false` | Enable/Disable the masquerade bypass for the gateway pods. It means that the packets from gateway pods will not be masqueraded from the host where the pod is scheduled. This is useful in scenarios where CNIs masquerade the traffic from pod to nodes. For example this is required when using the Azure CNI or Kindnet. |
9192
| networking.fabric.config.healthProbeBindAddressPort | string | `"8081"` | Set the port where the fabric pod will expose the health probe. To disable the health probe, set the port to 0. |
9293
| networking.fabric.config.metricsAddressPort | string | `"8082"` | Set the port where the fabric pod will expose the metrics. To disable the metrics, set the port to 0. |
9394
| networking.fabric.config.nftablesMonitor | bool | `false` | Enable/Disable the nftables monitor for the fabric pod. It means that the fabric pod will monitor the nftables rules and will restore them in case of changes. In some cases (like K3S), this monitor can cause a huge amount of CPU usage. If you are experiencing high CPU usage, you can disable this feature. |
9495
| networking.fabric.image.name | string | `"ghcr.io/liqotech/fabric"` | Image repository for the fabric pod. |
9596
| networking.fabric.image.version | string | `""` | Custom version for the fabric image. If not specified, the global tag is used. |
97+
| networking.fabric.nodeSelector | object | `{}` | NodeSelector for the fabric pod. |
9698
| networking.fabric.pod.annotations | object | `{}` | Annotations for the fabric pod. |
9799
| networking.fabric.pod.extraArgs | list | `[]` | Extra arguments for the fabric pod. |
98100
| networking.fabric.pod.labels | object | `{}` | Labels for the fabric pod. |
99101
| networking.fabric.pod.priorityClassName | string | `""` | PriorityClassName (https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority) for the fabric pod. |
100102
| networking.fabric.pod.resources | object | `{"limits":{},"requests":{}}` | Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the fabric pod. |
101-
| networking.fabric.tolerations | list | `[]` | Extra tolerations for the fabric daemonset. |
103+
| networking.fabric.tolerations | list | `[]` | Extra tolerations for the fabric pod. |
102104
| networking.gatewayTemplates | object | `{"container":{"gateway":{"image":{"name":"ghcr.io/liqotech/gateway","version":""}},"geneve":{"image":{"name":"ghcr.io/liqotech/gateway/geneve","version":""}},"wireguard":{"image":{"name":"ghcr.io/liqotech/gateway/wireguard","version":""}}},"ping":{"interval":"2s","lossThreshold":5,"updateStatusInterval":"10s"},"replicas":1,"server":{"service":{"allocateLoadBalancerNodePorts":"","annotations":{}}},"wireguard":{"implementation":"kernel"}}` | Set the options for the default gateway (server/client) templates. The default templates use a WireGuard implementation to connect the gateway of the clusters. These options are used to configure only the default templates and should not be considered if a custom template is used. |
103105
| networking.gatewayTemplates.container.gateway.image.name | string | `"ghcr.io/liqotech/gateway"` | Image repository for the gateway container. |
104106
| networking.gatewayTemplates.container.gateway.image.version | string | `""` | Custom version for the gateway image. If not specified, the global tag is used. |

deployments/liqo/templates/liqo-fabric-daemonset.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ spec:
2525
{{- toYaml .Values.networking.fabric.pod.labels | nindent 8 }}
2626
{{- end }}
2727
spec:
28+
{{- if .Values.networking.fabric.nodeSelector }}
29+
nodeSelector:
30+
{{- toYaml .Values.networking.fabric.nodeSelector | nindent 8 }}
31+
{{- end }}
32+
{{- if .Values.networking.fabric.affinity }}
33+
affinity:
34+
{{- toYaml .Values.networking.fabric.affinity | nindent 8 }}
35+
{{- end }}
2836
tolerations:
2937
- key: CriticalAddonsOnly
3038
operator: Exists
@@ -38,7 +46,7 @@ spec:
3846
{{- toYaml .Values.networking.fabric.tolerations | nindent 8 }}
3947
{{- end }}
4048
serviceAccountName: {{ include "liqo.prefixedName" $fabricConfig }}
41-
{{- include "liqo.imagePullSecrets" . | nindent 6 }}
49+
{{- include "liqo.imagePullSecrets" . | nindent 6 -}}
4250
containers:
4351
- image: {{ .Values.networking.fabric.image.name }}{{ include "liqo.suffix" $fabricConfig }}:{{ include "liqo.version" $fabricConfig }}
4452
imagePullPolicy: {{ .Values.pullPolicy }}
@@ -98,5 +106,4 @@ spec:
98106
{{- if .Values.networking.fabric.pod.priorityClassName }}
99107
priorityClassName: {{ .Values.networking.fabric.pod.priorityClassName }}
100108
{{- end }}
101-
102109
{{- end }}

deployments/liqo/values.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,19 @@ networking:
112112
name: "ghcr.io/liqotech/fabric"
113113
# -- Custom version for the fabric image. If not specified, the global tag is used.
114114
version: ""
115-
# -- Extra tolerations for the fabric daemonset.
115+
# -- NodeSelector for the fabric pod.
116+
nodeSelector: {}
117+
# -- Affinity for the fabric pod.
118+
affinity:
119+
nodeAffinity:
120+
requiredDuringSchedulingIgnoredDuringExecution:
121+
nodeSelectorTerms:
122+
- matchExpressions:
123+
- key: liqo.io/type
124+
operator: NotIn
125+
values:
126+
- virtual-node
127+
# -- Extra tolerations for the fabric pod.
116128
tolerations: []
117129
config:
118130
# -- Enabe/Disable the full masquerade mode for the fabric pod.
@@ -304,11 +316,11 @@ storage:
304316
storageNamespace: liqo-storage
305317

306318
common:
307-
# -- NodeSelector for all liqo pods, excluding virtual kubelet.
319+
# -- NodeSelector for all liqo pods, excluding virtual kubelet pod and fabric daemonset.
308320
nodeSelector: {}
309-
# -- Tolerations for all liqo pods, excluding virtual kubelet.
321+
# -- Tolerations for all liqo pods, excluding virtual kubelet pod and fabric daemonset.
310322
tolerations: []
311-
# -- Affinity for all liqo pods, excluding virtual kubelet.
323+
# -- Affinity for all liqo pods, excluding virtual kubelet pod and fabric daemonset.
312324
affinity: {}
313325
# -- Extra arguments for all liqo pods, excluding virtual kubelet.
314326
extraArgs: []

0 commit comments

Comments
 (0)