Puppet Class: kubeinstall::topolvm::scheduler

Defined in:
manifests/topolvm/scheduler.pp

Summary

TopoLVM scheduler setup

Overview

Define TopoLVM scheduler setup

Examples:

include kubeinstall::topolvm::scheduler

Parameters:

  • path (Stdlib::Unixpath) (defaults to: $kubeinstall::params::topolvm_scheduler_path)

    TopoLVM scheduler path to store scheduler configuration file

  • manage_path (Boolean) (defaults to: true)

    Whether to manage TopoLVM scheduler path

  • manage_config (Boolean) (defaults to: true)

    Whether to manage TopoLVM scheduler configuration file

  • config_file (String) (defaults to: 'kubeinstall/topolvm/scheduler-config.yaml')

    <MODULE NAME>/<FILE> reference to TopoLVM configuration file or absolut path to a file from anywhere on disk

  • config_content (Optional[String]) (defaults to: undef)

    TopoLVM configuration file content. Will be in use if specified.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'manifests/topolvm/scheduler.pp', line 23

class kubeinstall::topolvm::scheduler (
  Boolean $manage_path   = true,
  Stdlib::Unixpath $path = $kubeinstall::params::topolvm_scheduler_path,
  Boolean $manage_config = true,
  String  $config_file   = 'kubeinstall/topolvm/scheduler-config.yaml',
  Optional[String] $config_content = undef,
) {
  if $manage_path {
    exec { "mkdir -p ${path}":
      path    => '/usr/bin:/bin',
      creates => $path,
      before  => File[$path],
    }

    file { $path:
      ensure  => directory,
      purge   => false,
      recurse => true,
    }
  }

  if $manage_config {
    if $config_content {
      $content = $config_content
    }
    else {
      $content = file($config_file)
    }

    file { "${path}/scheduler-config.yaml":
      ensure  => file,
      content => $content,
    }
  }
}