Puppet Class: profile::wmcs::kubeadm::core
- Defined in:
- modules/profile/manifests/wmcs/kubeadm/core.pp
Overview
SPDX-License-Identifier: Apache-2.0 Installs a container runtime and the core kubeadm tool
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'modules/profile/manifests/wmcs/kubeadm/core.pp', line 3
class profile::wmcs::kubeadm::core (
String[1] $component = lookup('profile::wmcs::kubeadm::component'),
Optional[Stdlib::Fqdn] $label_custom_domain = lookup('profile::wmcs::kubeadm::label_custom_domain', {default_value => undef}),
String[1] $pause_image = lookup('profile::wmcs::kubeadm::pause_image', {default_value => 'docker-registry.tools.wmflabs.org/pause:3.1'}),
Boolean $mount_nfs = lookup('mount_nfs', {default_value => false}),
) {
class { '::kubeadm::repo':
component => $component,
}
if debian::codename::eq('buster') {
class { '::kubeadm::docker': }
# Older versions of calico only supported iptables-legacy. Newer
# versions (including the ones we currently run) seem to support
# the newer iptables-nft (nft as in netfilter, not the blockchain
# thing) variant, so we will gradually migrate to it as we migrate
# the worker nodes from Debian 10 to Debian 12.
class { '::kubeadm::calico_workaround': }
} else {
class { 'kubeadm::containerd':
pause_image => $pause_image,
}
}
if $label_custom_domain {
$label_base_domains = [
$label_custom_domain,
'kubernetes.wmcloud.org', # include this on all projects to make shared automation easier
]
} else {
$label_base_domains = ['kubernetes.wmcloud.org']
}
if $mount_nfs {
$extra_labels = $label_base_domains.map |Stdlib::Fqdn $base_domain| {
"${base_domain}/nfs-mounted=true"
}
} else {
$extra_labels = []
}
class { '::kubeadm::core':
extra_labels => $extra_labels,
pause_image => $pause_image,
}
}
|