Skip to content

Commit

Permalink
Move flatcar cgroupsv1 function to worker helper
Browse files Browse the repository at this point in the history
  • Loading branch information
fiunchinho committed Sep 30, 2024
1 parent 0f6fd8a commit 28a950b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 0 additions & 8 deletions helm/cluster/templates/clusterapi/_helpers_files.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@
{{- end }}
{{- end }}

{{- define "cluster.internal.kubeadm.files.cgroupv1" }}
{{- if $.nodePool.config.cgroupsv1 }}
- path: /etc/flatcar-cgroupv1
filesystem: root
permissions: "0444"
{{- end }}
{{- end }}

{{- define "cluster.internal.kubeadm.files.ssh" }}
{{- if or (and .Values.providerIntegration.resourcesApi.bastionResourceEnabled .Values.global.connectivity.bastion.enabled) .Values.providerIntegration.kubeadmConfig.enableGiantswarmUser }}
- path: /etc/ssh/trusted-user-ca-keys.pem
Expand Down
11 changes: 10 additions & 1 deletion helm/cluster/templates/clusterapi/workers/_helpers_files.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- define "cluster.internal.workers.kubeadm.files" }}
{{- include "cluster.internal.kubeadm.files" $ }}
{{- include "cluster.internal.kubeadm.files.cgroupv1" $ }}
{{- include "cluster.internal.workers.kubeadm.files.cgroupv1" $ }}
{{- include "cluster.internal.workers.kubeadm.files.cri" $ }}
{{- include "cluster.internal.workers.kubeadm.files.provider" $ }}
{{- include "cluster.internal.workers.kubeadm.files.custom" $ }}
Expand Down Expand Up @@ -47,3 +47,12 @@ different node pools, and use the same cgroups configuration in the containerd c
name: {{ include "cluster.resource.name" $ }}-{{ $.nodePool.name }}-containerd-{{ include "cluster.data.hash" (dict "data" (tpl ($.Files.Get "files/etc/containerd/workers-config.toml") $) "salt" $.Values.providerIntegration.hashSalt) }}
key: config.toml
{{- end }}
{{/* flatcare configuration to use cgroupsv1 for the worker nodes. When we don't support cgroups v1 anymore we can remove it */}}
{{- define "cluster.internal.workers.kubeadm.files.cgroupv1" }}
{{- if $.nodePool.config.cgroupsv1 }}
- path: /etc/flatcar-cgroupv1
filesystem: root
permissions: "0444"
{{- end }}
{{- end }}

0 comments on commit 28a950b

Please sign in to comment.