Puppet Class: k8s::infrastructure_config

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

Overview

Parameters:

  • master_host (String)
  • username (String) (defaults to: 'client-infrastructure')


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'modules/k8s/manifests/infrastructure_config.pp', line 1

class k8s::infrastructure_config(
    String $master_host,
    String $username = 'client-infrastructure',
) {
    file { '/etc/kubernetes':
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    $users = hiera('k8s_infrastructure_users')
    k8s::kubeconfig { '/etc/kubernetes/kubeconfig':
        master_host => $master_host,
        username    => $username,
        token       => $users[$username]['token'],
    }
}