Puppet Class: kubeadm::calico_yaml

Defined in:
modules/kubeadm/manifests/calico_yaml.pp

Overview

Parameters:

  • pod_subnet (String)
  • calico_version (String) (defaults to: 'v3.14.0')
  • typha_enabled (Boolean) (defaults to: false)
  • typha_replicas (Integer) (defaults to: 3)


1
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
32
33
34
35
# File 'modules/kubeadm/manifests/calico_yaml.pp', line 1

class kubeadm::calico_yaml (
    String              $pod_subnet,
    String              $calico_version = 'v3.14.0',
    Boolean             $typha_enabled = false,
    Integer             $typha_replicas = 3,
) {
    # because /etc/kubernetes
    require ::kubeadm::core

    file { '/etc/kubernetes/calico.yaml':
        ensure  => present,
        content => template('kubeadm/calico.yaml.erb'),
        owner   => 'root',
        group   => 'root',
        mode    => '0400',
        require => File['/etc/kubernetes'],
    }

    file { '/etc/kubernetes/calicoctl.yaml':
        ensure  => present,
        content => template('kubeadm/calicoctl.yaml.erb'),
        owner   => 'root',
        group   => 'root',
        mode    => '0400',
        require => File['/etc/kubernetes'],
    }

    file { '/root/.bash_aliases':
        ensure => present,
        source => 'puppet:///modules/kubeadm/root-bash-aliases',
        owner  => 'root',
        group  => 'root',
        mode   => '0644',
    }
}