Skip to content

Commit

Permalink
helm: uniform flag names
Browse files Browse the repository at this point in the history
  • Loading branch information
aleoli authored and adamjensenbot committed Dec 12, 2024
1 parent 3927c28 commit a5f2198
Show file tree
Hide file tree
Showing 20 changed files with 41 additions and 41 deletions.
16 changes: 8 additions & 8 deletions deployments/liqo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
| ipam.reservedSubnets | list | `[]` | List of IP subnets that do not have to be used by Liqo. Liqo can perform automatic IP address remapping when a remote cluster is peering with you, e.g., in case IP address spaces (e.g., PodCIDR) overlaps. In order to prevent IP conflicting between locally used private subnets in your infrastructure and private subnets belonging to remote clusters you need tell liqo the subnets used in your cluster. E.g if your cluster nodes belong to the 192.168.2.0/24 subnet, then you should add that subnet to the reservedSubnets. PodCIDR and serviceCIDR used in the local cluster are automatically added to the reserved list. |
| ipam.serviceCIDR | string | `""` | The subnet used by the services in you cluster, in CIDR notation (e.g., 172.16.0.0/16). |
| metricAgent.config.timeout | object | `{"read":"30s","write":"30s"}` | Set the timeout for the metrics server. |
| metricAgent.enable | bool | `true` | Enable/Disable the virtual kubelet metric agent. This component aggregates all the kubelet-related metrics (e.g., CPU, RAM, etc) collected on the nodes that are used by a remote cluster peered with you, then exporting the resulting values as a property of the virtual kubelet running on the remote cluster. |
| metricAgent.enabled | bool | `true` | Enable/Disable the virtual kubelet metric agent. This component aggregates all the kubelet-related metrics (e.g., CPU, RAM, etc) collected on the nodes that are used by a remote cluster peered with you, then exporting the resulting values as a property of the virtual kubelet running on the remote cluster. |
| metricAgent.image.name | string | `"ghcr.io/liqotech/metric-agent"` | Image repository for the metricAgent pod. |
| metricAgent.image.version | string | `""` | Custom version for the metricAgent image. If not specified, the global tag is used. |
| metricAgent.initContainer.image.name | string | `"ghcr.io/liqotech/cert-creator"` | Image repository for the init container of the metricAgent pod. |
Expand Down Expand Up @@ -138,15 +138,15 @@
| offloading.reflection.skip.annotations | list | `["cloud.google.com/neg","cloud.google.com/neg-status","kubernetes.digitalocean.com/load-balancer-id","ingress.kubernetes.io/backends","ingress.kubernetes.io/forwarding-rule","ingress.kubernetes.io/target-proxy","ingress.kubernetes.io/url-map","metallb.universe.tf/address-pool","metallb.universe.tf/ip-allocated-from-pool","metallb.universe.tf/loadBalancerIPs","loadbalancer.openstack.org/load-balancer-id"]` | List of annotations that must not be reflected on remote clusters. |
| offloading.reflection.skip.labels | list | `[]` | List of labels that must not be reflected on remote clusters. |
| offloading.runtimeClass.annotations | object | `{}` | Annotations for the runtime class. |
| offloading.runtimeClass.enable | bool | `false` | |
| offloading.runtimeClass.enabled | bool | `false` | |
| offloading.runtimeClass.handler | string | `"liqo"` | Handler for the runtime class. |
| offloading.runtimeClass.labels | object | `{}` | Labels for the runtime class. |
| offloading.runtimeClass.name | string | `"liqo"` | Name of the runtime class to use for offloading. |
| offloading.runtimeClass.nodeSelector | object | `{"enable":true,"labels":{"liqo.io/type":"virtual-node"}}` | Node selector for the runtime class. |
| offloading.runtimeClass.nodeSelector | object | `{"enabled":true,"labels":{"liqo.io/type":"virtual-node"}}` | Node selector for the runtime class. |
| offloading.runtimeClass.nodeSelector.labels | object | `{"liqo.io/type":"virtual-node"}` | Labels for the node selector. |
| offloading.runtimeClass.tolerations | object | `{"enable":true,"tolerations":[{"effect":"NoExecute","key":"virtual-node.liqo.io/not-allowed","operator":"Exists"}]}` | Tolerations for the runtime class. |
| offloading.runtimeClass.tolerations | object | `{"enabled":true,"tolerations":[{"effect":"NoExecute","key":"virtual-node.liqo.io/not-allowed","operator":"Exists"}]}` | Tolerations for the runtime class. |
| offloading.runtimeClass.tolerations.tolerations | list | `[{"effect":"NoExecute","key":"virtual-node.liqo.io/not-allowed","operator":"Exists"}]` | Tolerations for the tolerations. |
| openshiftConfig.enable | bool | `false` | Enable/Disable the OpenShift support, enabling Openshift-specific resources, and setting the pod security contexts in a way that is compatible with Openshift. |
| openshiftConfig.enabled | bool | `false` | Enable/Disable the OpenShift support, enabling Openshift-specific resources, and setting the pod security contexts in a way that is compatible with Openshift. |
| openshiftConfig.virtualKubeletSCCs | list | `["anyuid"]` | Security context configurations granted to the virtual kubelet in the local cluster. The configuration of one or more SCCs for the virtual kubelet is not strictly required, and privileges can be reduced in production environments. Still, the default configuration (i.e., anyuid) is suggested to prevent problems (i.e., the virtual kubelet fails to add the appropriate labels) when attempting to offload pods not managed by higher-level abstractions (e.g., Deployments), and not associated with a properly privileged service account. Indeed, "anyuid" is the SCC automatically associated with pods created by cluster administrators. Any pod granted a more privileged SCC and not linked to an adequately privileged service account will fail to be offloaded. |
| proxy.config.listeningPort | int | `8118` | Port used by the proxy pod. |
| proxy.enabled | bool | `true` | Enable/Disable the proxy pod. This pod is mandatory to allow in-band peering and to connect to the consumer k8s api server from a remotly offloaded pod. |
Expand All @@ -161,14 +161,14 @@
| proxy.service.annotations | object | `{}` | |
| proxy.service.type | string | `"ClusterIP"` | |
| pullPolicy | string | `"IfNotPresent"` | The pullPolicy for liqo pods. |
| requirements.kernel.disabled | bool | `false` | Enable/Disable the kernel requirements check. |
| storage.enable | bool | `true` | Enable/Disable the liqo virtual storage class on the local cluster. You will be able to offload your persistent volumes, while other clusters will be able to schedule their persistent workloads on the current cluster. |
| requirements.kernel.enabled | bool | `true` | Enable/Disable the kernel requirements check. |
| storage.enabled | bool | `true` | Enable/Disable the liqo virtual storage class on the local cluster. You will be able to offload your persistent volumes, while other clusters will be able to schedule their persistent workloads on the current cluster. |
| storage.realStorageClassName | string | `""` | Name of the real storage class to use in the local cluster. |
| storage.storageNamespace | string | `"liqo-storage"` | Namespace where liqo will deploy specific PVCs. Internal parameter, do not change. |
| storage.virtualStorageClassName | string | `"liqo"` | Name to assign to the liqo virtual storage class. |
| tag | string | `""` | Images' tag to select a development version of liqo instead of a release |
| telemetry.config.schedule | string | `""` | Set the schedule of the telemetry collector CronJob. Consider setting this value on ArgoCD deployments to avoid randomization. |
| telemetry.enable | bool | `true` | Enable/Disable the telemetry collector. |
| telemetry.enabled | bool | `true` | Enable/Disable the telemetry collector. |
| telemetry.image.name | string | `"ghcr.io/liqotech/telemetry"` | Image repository for the telemetry pod. |
| telemetry.image.version | string | `""` | Custom version for the telemetry image. If not specified, the global tag is used. |
| telemetry.pod.annotations | object | `{}` | Annotations for the telemetry pod. |
Expand Down
2 changes: 1 addition & 1 deletion deployments/liqo/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Get the liqo clusterID ConfigMap name
Get the Pod security context
*/}}
{{- define "liqo.podSecurityContext" -}}
{{- if not .Values.openshiftConfig.enable }}
{{- if not .Values.openshiftConfig.enabled }}
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ spec:
- --ipam-server={{ include "liqo.prefixedName" $ipamConfig }}.{{ .Release.Namespace }}:6000
{{- end }}
{{- end }}
- --enable-storage={{ .Values.storage.enable }}
- --enable-storage={{ .Values.storage.enabled }}
- --webhook-port={{ .Values.webhook.port }}
{{- if .Values.storage.enable }}
{{- if .Values.storage.enabled }}
- --virtual-storage-class-name={{ .Values.storage.virtualStorageClassName }}
- --real-storage-class-name={{ .Values.storage.realStorageClassName }}
- --storage-namespace={{ .Values.storage.storageNamespace }}
Expand Down
2 changes: 1 addition & 1 deletion deployments/liqo/templates/liqo-fabric-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- --podname=$(POD_NAME)
- --nodename=$(NODE_NAME)
- --geneve-port={{ .Values.networking.genevePort }}
{{- if .Values.requirements.kernel.disabled }}
{{- if not .Values.requirements.kernel.enabled }}
- --disable-kernel-version-check
{{- end }}
- --enable-nft-monitor={{ .Values.networking.fabric.config.nftablesMonitor }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
{{- $metricConfig := (merge (dict "name" "metric-agent" "module" "metrics" "containerName" "metric-agent") .) -}}

{{- if .Values.metricAgent.enable }}
{{- if .Values.metricAgent.enabled }}

apiVersion: apiregistration.k8s.io/v1
kind: APIService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- $metricConfig := (merge (dict "name" "metric-agent" "module" "metrics" "version" .Values.metricAgent.image.version) .) -}}
{{- $certConfig := (merge (dict "name" "cert-creator" "module" "metrics" "version" .Values.metricAgent.initContainer.image.version) .) -}}

{{- if .Values.metricAgent.enable }}
{{- if .Values.metricAgent.enabled }}

apiVersion: apps/v1
kind: Deployment
Expand Down
2 changes: 1 addition & 1 deletion deployments/liqo/templates/liqo-metric-agent-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
{{- $metricConfig := (merge (dict "name" "metric-agent" "module" "metrics" "containerName" "metric-agent") .) -}}

{{- if .Values.metricAgent.enable }}
{{- if .Values.metricAgent.enabled }}

apiVersion: v1
kind: ServiceAccount
Expand Down
2 changes: 1 addition & 1 deletion deployments/liqo/templates/liqo-metric-agent-service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
{{- $metricConfig := (merge (dict "name" "metric-agent" "module" "metrics" "containerName" "metric-agent") .) -}}

{{- if .Values.metricAgent.enable }}
{{- if .Values.metricAgent.enabled }}

apiVersion: v1
kind: Service
Expand Down
2 changes: 1 addition & 1 deletion deployments/liqo/templates/liqo-storage-class.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.storage.enable -}}
{{- if .Values.storage.enabled -}}

kind: StorageClass
apiVersion: storage.k8s.io/v1
Expand Down
2 changes: 1 addition & 1 deletion deployments/liqo/templates/liqo-telemetry-cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $telemetryCronConfig := (merge (dict "name" "telemetry" "module" "telemetry" "version" .Values.telemetry.image.version) .) -}}

{{- if .Values.telemetry.enable }}
{{- if .Values.telemetry.enabled }}

apiVersion: batch/v1
kind: CronJob
Expand Down
2 changes: 1 addition & 1 deletion deployments/liqo/templates/liqo-telemetry-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $telemetryConfig := (merge (dict "name" "telemetry" "module" "telemetry") .) -}}

{{- if .Values.telemetry.enable }}
{{- if .Values.telemetry.enabled }}

apiVersion: v1
kind: ServiceAccount
Expand Down
2 changes: 1 addition & 1 deletion deployments/liqo/templates/liqo-virtual-kubelet-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
labels:
{{- include "liqo.labels" $virtualKubeletConfig | nindent 4 }}
{{ .Files.Get (include "liqo.cluster-role-filename" (dict "prefix" ( include "liqo.prefixedName" $virtualKubeletConfig))) }}
{{- if and (.Values.openshiftConfig.enable) (gt (len .Values.openshiftConfig.virtualKubeletSCCs) 0) -}}
{{- if and (.Values.openshiftConfig.enabled) (gt (len .Values.openshiftConfig.virtualKubeletSCCs) 0) -}}
- apiGroups:
- security.openshift.io
resourceNames:
Expand Down
2 changes: 1 addition & 1 deletion deployments/liqo/templates/liqo-webhook-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
{{- if .Values.controllerManager.config.enableResourceEnforcement }}
- --enable-resource-enforcement
{{- end }}
{{- if not .Values.offloading.runtimeClass.enable }}
{{- if not .Values.offloading.runtimeClass.enabled }}
- --add-virtual-node-toleration-on-offloaded-pods
{{- end }}
{{- if .Values.common.extraArgs }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
- --ping-interval={{ .Values.networking.gatewayTemplates.ping.interval }}
- --ping-update-status-interval={{ .Values.networking.gatewayTemplates.ping.updateStatusInterval }}
- --leader-election=true
{{- if .Values.requirements.kernel.disabled }}
{{- if not .Values.requirements.kernel.enabled }}
- --disable-kernel-version-check
{{- end }}
volumeMounts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ spec:
- --ping-interval={{ .Values.networking.gatewayTemplates.ping.interval }}
- --ping-update-status-interval={{ .Values.networking.gatewayTemplates.ping.updateStatusInterval }}
- --leader-election=true
{{- if .Values.requirements.kernel.disabled }}
{{- if not .Values.requirements.kernel.enabled }}
- --disable-kernel-version-check
{{- end }}
volumeMounts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
- --ping-interval={{ .Values.networking.gatewayTemplates.ping.interval }}
- --ping-update-status-interval={{ .Values.networking.gatewayTemplates.ping.updateStatusInterval }}
- --leader-election=true
{{- if .Values.requirements.kernel.disabled }}
{{- if not .Values.requirements.kernel.enabled }}
- --disable-kernel-version-check
{{- end }}
volumeMounts:
Expand Down
6 changes: 3 additions & 3 deletions deployments/liqo/templates/runtime-class.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $runtimeConfig := (merge (dict "name" "runtimeclass" "module" "runtimeclass") .) -}}

{{- if .Values.offloading.runtimeClass.enable }}
{{- if .Values.offloading.runtimeClass.enabled }}

apiVersion: node.k8s.io/v1
kind: RuntimeClass
Expand All @@ -17,11 +17,11 @@ metadata:
name: {{ .Values.offloading.runtimeClass.name }}
handler: {{ .Values.offloading.runtimeClass.handler }}
scheduling:
{{- if .Values.offloading.runtimeClass.nodeSelector.enable }}
{{- if .Values.offloading.runtimeClass.nodeSelector.enabled }}
nodeSelector:
{{- toYaml .Values.offloading.runtimeClass.nodeSelector.labels | nindent 4 }}
{{- end }}
{{- if .Values.offloading.runtimeClass.tolerations.enable }}
{{- if .Values.offloading.runtimeClass.tolerations.enabled }}
tolerations:
{{- toYaml .Values.offloading.runtimeClass.tolerations.tolerations | nindent 4 }}
{{- end }}
Expand Down
24 changes: 12 additions & 12 deletions deployments/liqo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ nameOverride: ""
# -- Override the standard full name used by Helm and associated to Kubernetes/Liqo resources.
fullnameOverride: ""

requirements:
kernel:
# -- Enable/Disable the kernel requirements check.
disabled: false

metrics:
# -- Enable/Disable the metrics server in every liqo component.
enabled: false
Expand Down Expand Up @@ -184,7 +179,7 @@ offloading:
# by setting the "disableNetworkCheck" field in the resource Spec.
disableNetworkCheck: false
runtimeClass:
enable: false
enabled: false
# -- Name of the runtime class to use for offloading.
name: liqo
# -- Annotations for the runtime class.
Expand All @@ -195,13 +190,13 @@ offloading:
handler: liqo
# -- Node selector for the runtime class.
nodeSelector:
enable: true
enabled: true
# -- Labels for the node selector.
labels:
liqo.io/type: virtual-node
# -- Tolerations for the runtime class.
tolerations:
enable: true
enabled: true
# -- Tolerations for the tolerations.
tolerations:
- key: virtual-node.liqo.io/not-allowed
Expand Down Expand Up @@ -281,7 +276,7 @@ storage:
# -- Enable/Disable the liqo virtual storage class on the local cluster. You will be able to
# offload your persistent volumes, while other clusters will be able to schedule their
# persistent workloads on the current cluster.
enable: true
enabled: true
# -- Name to assign to the liqo virtual storage class.
virtualStorageClassName: liqo
# -- Name of the real storage class to use in the local cluster.
Expand Down Expand Up @@ -507,7 +502,7 @@ metricAgent:
# -- Enable/Disable the virtual kubelet metric agent. This component aggregates all the kubelet-related metrics
# (e.g., CPU, RAM, etc) collected on the nodes that are used by a remote cluster peered with you, then exporting
# the resulting values as a property of the virtual kubelet running on the remote cluster.
enable: true
enabled: true
config:
# -- Set the timeout for the metrics server.
timeout:
Expand Down Expand Up @@ -540,7 +535,7 @@ metricAgent:

telemetry:
# -- Enable/Disable the telemetry collector.
enable: true
enabled: true
pod:
# -- Annotations for the telemetry pod.
annotations: {}
Expand Down Expand Up @@ -651,11 +646,16 @@ proxy:
# -- Port used by the proxy pod.
listeningPort: 8118

requirements:
kernel:
# -- Enable/Disable the kernel requirements check.
enabled: true

# OpenShift-specific configurations.
openshiftConfig:
# -- Enable/Disable the OpenShift support, enabling Openshift-specific resources,
# and setting the pod security contexts in a way that is compatible with Openshift.
enable: false
enabled: false
# -- Security context configurations granted to the virtual kubelet in the local cluster.
# The configuration of one or more SCCs for the virtual kubelet is not strictly required, and privileges can be reduced in production environments.
# Still, the default configuration (i.e., anyuid) is suggested to prevent problems (i.e., the virtual kubelet fails to add the appropriate labels) when
Expand Down
2 changes: 1 addition & 1 deletion pkg/liqoctl/install/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func (o *Options) preProviderValues() map[string]interface{} {
},

"telemetry": map[string]interface{}{
"enable": !o.DisableTelemetry,
"enabled": !o.DisableTelemetry,
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/liqoctl/install/openshift/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (o *Options) Initialize(ctx context.Context) error {
func (o *Options) Values() map[string]interface{} {
return map[string]interface{}{
"openshiftConfig": map[string]interface{}{
"enable": true,
"enabled": true,
},
}
}
Expand Down

0 comments on commit a5f2198

Please sign in to comment.