Puppet Class: k8s::proxy

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

Overview

Parameters:

  • master_host (Any)
  • proxy_mode (Any) (defaults to: 'iptables')
  • masquerade_all (Any) (defaults to: true)
  • kubeconfig (Any) (defaults to: '/etc/kubernetes/kubeconfig')


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
# File 'modules/k8s/manifests/proxy.pp', line 1

class k8s::proxy(
    $master_host,
    $proxy_mode = 'iptables',
    $masquerade_all = true,
    $kubeconfig = '/etc/kubernetes/kubeconfig',
) {
    require ::k8s::infrastructure_config

    require_package('kubernetes-node')

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

    service { 'kube-proxy':
        ensure    => running,
        enable    => true,
        subscribe => [
            File[$kubeconfig],
            File['/etc/default/kube-proxy'],
        ],

    }
}