Puppet Plan: kubeinstall::cgroup2

Defined in:
plans/cgroup2.pp

Summary

Set hostname on target hosts

Overview

Enable cgroups v2 on target hosts

Parameters:

  • targets (TargetSpec)

    Nodes for which cgroups v2 should be enabled

  • reboot (Boolean) (defaults to: false)


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'plans/cgroup2.pp', line 8

plan kubeinstall::cgroup2 (
  TargetSpec $targets,
  Boolean    $reboot = false,
) {
    $results = run_task(
      'kubeinstall::cgroup2',
      $targets,
      'Enable cgroups v2',
      '_catch_errors' => true,
      '_run_as' => 'root',
    )

    if $reboot {
      $reboot_targets = $results.ok_set.filter_set |$res| { $res['reboot'] == true }.targets

      return run_task('reboot', $reboot_targets)
    }

    return $results
}