Puppet Class: profile::ci::kubernetes_config

Defined in:
modules/profile/manifests/ci/kubernetes_config.pp

Overview

Parameters:

  • user (Any) (defaults to: hiera('profile::ci::kubernetes_config::user'))
  • namespace (Any) (defaults to: hiera('profile::ci::kubernetes_config::namespace'))
  • master (Any) (defaults to: hiera('profile::ci::kubernetes_config::master'))
  • token (Any) (defaults to: hiera('profile::ci::kubernetes_config::token'))


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

class profile::ci::kubernetes_config(
    $user = hiera('profile::ci::kubernetes_config::user'),
    $namespace = hiera('profile::ci::kubernetes_config::namespace'),
    $master = hiera('profile::ci::kubernetes_config::master'),
    $token = hiera('profile::ci::kubernetes_config::token')
) {
    # the file is visible to jenkins-slave and to contint-admins
    k8s::kubeconfig { '/etc/kubernetes/ci-staging.config':
        master_host => $master,
        username    => $user,
        token       => $token,
        owner       => 'jenkins-slave',
        group       => 'contint-admins',
        mode        => '0440',
        namespace   => $namespace,
    }
}