Puppet Class: k8s::scheduler

Defined in:
modules/k8s/manifests/scheduler.pp

Overview

Class that sets up and configures kube-scheduler

Parameters:

  • kubeconfig (Stdlib::Unixpath)
  • logtostderr (Boolean) (defaults to: true)
  • v_log_level (Integer) (defaults to: 0)
  • packages_from_future (Boolean) (defaults to: false)


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'modules/k8s/manifests/scheduler.pp', line 2

class k8s::scheduler(
    Stdlib::Unixpath $kubeconfig,
    Boolean $logtostderr = true,
    Integer $v_log_level = 0,
    Boolean $packages_from_future = false,
) {

    if $packages_from_future {
        apt::package_from_component { 'scheduler-kubernetes-future':
            component => 'component/kubernetes-future',
            packages  => ['kubernetes-master'],
        }
    } else {
        ensure_packages('kubernetes-master')
    }

    file { '/etc/default/kube-scheduler':
        ensure  => file,
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
        content => template('k8s/kube-scheduler.default.erb'),
        notify  => Service['kube-scheduler'],
    }

    service { 'kube-scheduler':
        ensure => running,
        enable => true,
    }
}