clc

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package clc generates bootstrap data in Ignition format using Container Linux Config Transpiler.

CLC configuration defined in this package will run kubeadm command by creating a /etc/kubeadm.sh script file containing both pre and post kubeadm commands as well as the kubeadm command itself.

/etc/kubeadm.sh script will be executed using kubeadm.service systemd unit, which will only happen if /etc/kubeadm.yml file exists, which ensures the script will run only once, as by the end of the script, /etc/kubeadm.yml is moved to /tmp filesystem, so it gets automatically cleaned up after a reboot. This is to align the implementation with cloud-init, which places kubeadm configuration in /tmp directory directly, which is not possible with Ignition.

/etc/kubeadm.yml file contains generated kubeadm configuration and can be customized using pre kubeadm commands if needed, as a replacement for Jinja templates supported by cloud-init, for example using 'envsubst' or 'sed'.

To override the behavior of kubeadm.service unit, one should create an override drop-in using AdditionalConfig field. Data from this field takes precedence and will be merged with configuration generated by the bootstrap provider, overriding already defined fields following the merge strategy described in https://coreos.github.io/ignition/operator-notes/#config-merging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(input *cloudinit.BaseUserData, clc *bootstrapv1.ContainerLinuxConfig, ocneConfig string) ([]byte, string, error)

Render renders the provided user data and CLC snippets into Ignition config.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL