Puppet Class: profile::rsyslog::kubernetes

Defined in:
modules/profile/manifests/rsyslog/kubernetes.pp

Overview

Parameters:

  • enable (Boolean) (defaults to: lookup( 'profile::rsyslog::kubernetes::enable', {'default_value' => false}))
  • token (Optional[String]) (defaults to: lookup( 'profile::rsyslog::kubernetes::token', {'default_value' => undef}))
  • kubernetes_url (Optional[Stdlib::HTTPSUrl]) (defaults to: lookup( 'profile::rsyslog::kubernetes::kubernetes_url', {'default_value' => undef}))


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'modules/profile/manifests/rsyslog/kubernetes.pp', line 2

class profile::rsyslog::kubernetes (
    Boolean $enable = lookup(
        'profile::rsyslog::kubernetes::enable', {'default_value' => false}),
    Optional[String] $token = lookup(
        'profile::rsyslog::kubernetes::token', {'default_value' => undef}),
    Optional[Stdlib::HTTPSUrl] $kubernetes_url = lookup(
        'profile::rsyslog::kubernetes::kubernetes_url', {'default_value' => undef}),
) {
    require_package('rsyslog-kubernetes')

    $ensure = $enable ? {
      true    => present,
      default => absent,
    }

    rsyslog::conf { 'kubernetes':
        ensure   => $ensure,
        content  => template('profile/rsyslog/kubernetes.conf.erb'),
        priority => 9,
        mode     => '0400', # Contains sensitive token
    }
}