|
1 | 1 | # Class kubernetes config kubeadm, populates kubeadm config file with params to bootstrap cluster
|
| 2 | +# @param config_file |
| 3 | +# Path to the configuration file. Defaults to '/etc/kubernetes/config.yaml' |
| 4 | +# @param controller_address |
| 5 | +# The IP address and Port of the controller that worker node will join. eg 172.17.10.101:6443 |
| 6 | +# Defaults to undef |
| 7 | +# @param dns_domain |
| 8 | +# This is a string that sets the dns domain in kubernetes cluster |
| 9 | +# Default cluster.local |
| 10 | +# @param manage_etcd |
| 11 | +# When set to true, etcd will be downloaded from the specified source URL. |
| 12 | +# Defaults to true. |
| 13 | +# @param delegated_pki |
| 14 | +# Set to true if all required X509 certificates will be provided by external means. Setting this to true will ignore all *_crt and *_key including sa.key and sa.pub files. |
| 15 | +# Defaults to false |
| 16 | +# @param etcd_install_method |
| 17 | +# The method on how to install etcd. Can be either wget (using etcd_source) or package (using $etcd_package_name) |
| 18 | +# Defaults to wget |
| 19 | +# @param kubernetes_version |
| 20 | +# The version of Kubernetes containers you want to install. |
| 21 | +# ie api server, |
| 22 | +# Defaults to 1.10.2 |
| 23 | +# @param kubernetes_cluster_name |
| 24 | +# The name of the cluster, for use when multiple clusters are accessed from the same source |
| 25 | +# Only used by Kubernetes 1.12+ |
| 26 | +# Defaults to "kubernetes" |
| 27 | +# @param etcd_ca_key |
| 28 | +# This is the ca certificate key data for the etcd cluster. This must be passed as string not as a file. |
| 29 | +# Defaults to undef |
| 30 | +# @param etcd_ca_crt |
| 31 | +# This is the ca certificate data for the etcd cluster. This must be passed as string not as a file. |
| 32 | +# Defaults to undef |
| 33 | +# @param etcdclient_key |
| 34 | +# This is the client certificate key data for the etcd cluster. This must be passed as string not as a file. |
| 35 | +# Defaults to undef |
| 36 | +# @param etcdclient_crt |
| 37 | +# This is the client certificate data for the etcd cluster. This must be passed as string not as a file. |
| 38 | +# Defaults to undef |
| 39 | +# @param etcdserver_crt |
| 40 | +# This is the server certificate data for the etcd cluster . This must be passed as string not as a file. |
| 41 | +# Defaults to undef |
| 42 | +# @param etcdserver_key |
| 43 | +# This is the server certificate key data for the etcd cluster. This must be passed as string not as a file. |
| 44 | +# Defaults to undef |
| 45 | +# @param etcdpeer_crt |
| 46 | +# This is the peer certificate data for the etcd cluster. This must be passed as string not as a file. |
| 47 | +# Defaults to undef |
| 48 | +# @param etcdpeer_key |
| 49 | +# This is the peer certificate key data for the etcd cluster. This must be passed as string not as a file. |
| 50 | +# Defaults to undef |
| 51 | +# @param etcd_peers |
| 52 | +# This will tell etcd how the list of peers to connect to into the cluster. |
| 53 | +# An example with hiera would be kubernetes::etcd_peers: |
| 54 | +# - 172.17.10.101 |
| 55 | +# - 172.17.10.102 |
| 56 | +# - 172.17.10.103 |
| 57 | +# Defaults to undef |
| 58 | +# @param etcd_hostname |
| 59 | +# The name of the etcd instance. |
| 60 | +# An example with hiera would be kubernetes::etcd_hostname: "%{::fqdn}" |
| 61 | +# Defaults to hostname |
| 62 | +# @param etcd_data_dir |
| 63 | +# Directory, where etcd data is stored. |
| 64 | +# Defaults to /var/lib/etcd. |
| 65 | +# @param etcd_ip |
| 66 | +# The ip address that you want etcd to use for communications. |
| 67 | +# An example with hiera would be kubernetes::etcd_ip: "%{networking.ip}" |
| 68 | +# Or to pin explicitly to a specific interface kubernetes::etcd_ip: "%{::ipaddress_enp0s8}" |
| 69 | +# Defaults to undef |
| 70 | +# @param cni_pod_cidr |
| 71 | +# The overlay (internal) network range to use. |
| 72 | +# Defaults to undef. kube_tool sets this per cni provider. |
| 73 | +# @param kube_api_bind_port |
| 74 | +# Apiserver bind port |
| 75 | +# Defaults to 6443 |
| 76 | +# @param kube_api_advertise_address |
| 77 | +# This is the ip address that the want to api server to expose. |
| 78 | +# An example with hiera would be kubernetes::kube_api_advertise_address: "%{networking.ip}" |
| 79 | +# Or to pin explicitly to a specific interface kubernetes::kube_api_advertise_address: "%{::ipaddress_enp0s8}" |
| 80 | +# defaults to undef |
| 81 | +# @param etcd_initial_cluster |
| 82 | +# This will tell etcd how many nodes will be in the cluster and is passed as a string. |
| 83 | +# An example with hiera would be kubernetes::etcd_initial_cluster: etcd-kube-control-plane=http://172.17.10.101:2380,etcd-kube-replica-control-plane-01=http://172.17.10.210:2380,etcd-kube-replica-control-plane-02=http://172.17.10.220:2380 |
| 84 | +# Defaults to undef |
| 85 | +# @param etcd_discovery_srv |
| 86 | +# This will tell etcd to use DNS SRV discovery method. This option is exclusive with `etcd_initial_cluster`, taking precedence |
| 87 | +# over it if both are present. |
| 88 | +# An example with hiera would be kubernetes::etcd_discovery_srv: etcd-gen.example.org |
| 89 | +# Defaults to undef |
| 90 | +# @param etcd_initial_cluster_state |
| 91 | +# This will tell etcd the initial state of the cluster. Useful for adding a node to the cluster. Allowed values are |
| 92 | +# "new" or "existing" |
| 93 | +# Defaults to "new" |
| 94 | +# @param etcd_compaction_method |
| 95 | +# This will tell etcd the compaction method to be used. |
| 96 | +# "periodic" or "revision" |
| 97 | +# Defaults to "periodic" |
| 98 | +# @param etcd_compaction_retention |
| 99 | +# This will tell etcd how much retention to be applied. This value can change depending on `etcd_compaction_method`. An integer or time string (i.e.: "5m") can be used in case of "periodic". Only integer allowed in case of "revision" |
| 100 | +# Integer or String |
| 101 | +# Defaults to 0 (disabled) |
| 102 | +# @param api_server_count |
| 103 | +# Defaults to undef |
| 104 | +# @param etcd_version |
| 105 | +# The version of etcd that you would like to use. |
| 106 | +# Defaults to 3.2.18 |
| 107 | +# @param etcd_max_wals |
| 108 | +# This will tell etcd how many WAL files to be kept |
| 109 | +# Defaults to 5 |
| 110 | +# @param etcd_max_request_bytes |
| 111 | +# This will tell etcd the maximum size of a request in bytes |
| 112 | +# Defaults to 1572864 |
| 113 | +# @param etcd_listen_metric_urls |
| 114 | +# The URL(s) to listen on to respond to /metrics and /health for etcd |
| 115 | +# Defaults to undef |
| 116 | +# @param token |
| 117 | +# A string to use when joining nodes to the cluster. Must be in the form of '[a-z0-9]{6}.[a-z0-9]{16}' |
| 118 | +# Defaults to undef |
| 119 | +# @param ttl_duration |
| 120 | +# Availability of the token |
| 121 | +# Default to 24h |
| 122 | +# @param discovery_token_hash |
| 123 | +# A string to validate to the root CA public key when joining a cluster. Created by kubetool |
| 124 | +# Defaults to undef |
| 125 | +# @param kubernetes_ca_crt |
| 126 | +# The clusters ca certificate. Must be passed as a string not a file. |
| 127 | +# Defaults to undef |
| 128 | +# @param kubernetes_ca_key |
| 129 | +# The clusters ca key. Must be passed as a string not a file. |
| 130 | +# Defaults to undef |
| 131 | +# @param kubernetes_front_proxy_ca_crt |
| 132 | +# The clusters front-proxy ca certificate. Must be passed as a string not a file. |
| 133 | +# Defaults to undef |
| 134 | +# @param kubernetes_front_proxy_ca_key |
| 135 | +# The clusters front-proxy ca key. Must be passed as a string not a file. |
| 136 | +# Defaults to undef |
| 137 | +# @param container_runtime |
| 138 | +# This is the runtime that the Kubernetes cluster will use. |
| 139 | +# It can only be set to "cri_containerd" or "docker" |
| 140 | +# Defaults to cri_containerd |
| 141 | +# @param sa_pub |
| 142 | +# The service account public key. Must be passed as cert not a file. |
| 143 | +# Defaults to undef |
| 144 | +# @param sa_key |
| 145 | +# The service account key. Must be passed as string not a file. |
| 146 | +# Defaults to undef |
| 147 | +# @param apiserver_cert_extra_sans |
| 148 | +# A string array of Subhect Alternative Names for the api server certificates. |
| 149 | +# Defaults to [] |
| 150 | +# @param apiserver_extra_arguments |
| 151 | +# A string array of extra arguments to be passed to the api server. |
| 152 | +# Defaults to [] |
| 153 | +# @param controllermanager_extra_arguments |
| 154 | +# A string array of extra arguments to be passed to the controller manager. |
| 155 | +# Defaults to [] |
| 156 | +# @param scheduler_extra_arguments |
| 157 | +# A string array of extra arguments to be passed to scheduler. |
| 158 | +# Defaults to [] |
| 159 | +# @param kubelet_extra_arguments |
| 160 | +# A string array to be appended to kubeletExtraArgs in the Kubelet's nodeRegistration configuration applied to both control planes and nodes. |
| 161 | +# Use this for critical Kubelet settings such as `pod-infra-container-image` which may be problematic to configure via kubelet_extra_config |
| 162 | +# Defaults to [] |
| 163 | +# @param service_cidr |
| 164 | +# The IP assdress range for service VIPs |
| 165 | +# Defaults to 10.96.0.0/12 |
| 166 | +# @param node_name |
| 167 | +# Name of the node. Defaults to a fact |
| 168 | +# @param cloud_provider |
| 169 | +# The name of the cloud provider of the cloud provider configured in /etc/kubernetes/cloud-config |
| 170 | +# Note: this file is not managed within this module and must be present before bootstrapping the kubernetes controller |
| 171 | +# Defaults to undef |
| 172 | +# @param cloud_config |
| 173 | +# The file location of the cloud config to be used by cloud_provider [*For use with v1.12 and above*] |
| 174 | +# Note: this file is not managed within this module and must be present before bootstrapping the kubernetes controller |
| 175 | +# Defaults to undef |
| 176 | +# @param apiserver_extra_volumes |
| 177 | +# A hash of extra volume mounts mounted on the api server. |
| 178 | +# Defaults to {} |
| 179 | +# @param controllermanager_extra_volumes |
| 180 | +# A hash of extra volume mounts mounted on the controller manager. |
| 181 | +# Defaults to [] |
| 182 | +# @param kubeadm_extra_config |
| 183 | +# A hash containing extra configuration data to be serialised with `to_yaml` and appended to the config.yaml file used by kubeadm. |
| 184 | +# Defaults to {} |
| 185 | +# @param kubelet_extra_config |
| 186 | +# A hash containing extra configuration data to be serialised with `to_yaml` and appended to Kubelet configuration file for the cluster. |
| 187 | +# Requires DynamicKubeletConfig. |
| 188 | +# Defaults to {} |
| 189 | +# @param image_repository |
| 190 | +# The container registry to pull control plane images from |
| 191 | +# Defaults to k8s.gcr.io |
| 192 | +# @param cgroup_driver |
| 193 | +# The cgroup driver to be used. |
| 194 | +# Defaults to 'systemd' on EL and 'cgroupfs' otherwise |
| 195 | +# @param proxy_mode |
| 196 | +# The mode for kubeproxy to run. It should be one of: "" (default), "userspace", "kernelspace", "iptables", or "ipvs". |
| 197 | +# Defaults to "" |
| 198 | +# @param metrics_bind_address |
| 199 | +# Set the metricsBindAddress (to allow prometheus) |
| 200 | +# Default to 127.0.0.1 |
| 201 | +# @param conntrack_max_per_core |
| 202 | +# Maximum number of NAT connections to track per CPU core. |
| 203 | +# Set to 0 to leave the limit as-is and ignore conntrack_min. |
| 204 | +# Default to 32768 |
| 205 | +# @param conntrack_min |
| 206 | +# Minimum number of conntrack entries to allocate, regardless of conntrack-max-per-core. |
| 207 | +# Set conntrack_max_per_core to 0 to leave the limit as-is |
| 208 | +# Default to 131072 |
| 209 | +# @param conntrack_tcp_wait_timeout |
| 210 | +# NAT timeout for TCP connections in the CLOSE_WAIT state. |
| 211 | +# Default to 1h0m0s |
| 212 | +# @param conntrack_tcp_stablished_timeout |
| 213 | +# Idle timeout for established TCP connections (0 to leave as-is). |
| 214 | +# Default to 24h0m0s |
| 215 | +# @param feature_gates |
| 216 | +# Feature gate hash to be added to kubeadm configuration |
| 217 | +# Example: |
| 218 | +# {'RootlessControlPlane' => true} |
| 219 | +# Default: undefined, no feature gates |
| 220 | +# |
2 | 221 | class kubernetes::config::kubeadm (
|
3 | 222 | String $config_file = $kubernetes::config_file,
|
4 | 223 | String $controller_address = $kubernetes::controller_address,
|
|
0 commit comments