Skip to content

Commit

Permalink
bootstrap/kubeadm: Add support for Ignition v3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
bengentil committed Aug 9, 2023
1 parent 59b8c79 commit aac6da7
Show file tree
Hide file tree
Showing 10 changed files with 1,242 additions and 7 deletions.
25 changes: 25 additions & 0 deletions bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ type IgnitionSpec struct {
// ContainerLinuxConfig contains CLC specific configuration.
// +optional
ContainerLinuxConfig *ContainerLinuxConfig `json:"containerLinuxConfig,omitempty"`

// ButaneConfig contains butane specific configuration.
// +optional
ButaneConfig *ButaneConfig `json:"butaneConfig,omitempty"`

// Ignition version, Default to clc
// +kubebuilder:validation:Enum=clc;butane
// +optional
Transpiler string `json:"transpiler,omitempty"`
}

// ContainerLinuxConfig contains CLC-specific configuration.
Expand All @@ -130,6 +139,22 @@ type ContainerLinuxConfig struct {
Strict bool `json:"strict,omitempty"`
}

// ButaneConfig contains butane-specific configuration.
//
// We use a structured type here to allow adding additional fields, for example 'version'.
type ButaneConfig struct {
// AdditionalConfig contains additional configuration to be merged with the Ignition
// configuration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging
//
// The data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/
// +optional
AdditionalConfig string `json:"additionalConfig,omitempty"`

// Strict controls if AdditionalConfig should be strictly parsed. If so, warnings are treated as errors.
// +optional
Strict bool `json:"strict,omitempty"`
}

// KubeadmConfigStatus defines the observed state of KubeadmConfig.
type KubeadmConfigStatus struct {
// Ready indicates the BootstrapData field is ready to be consumed
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aac6da7

Please sign in to comment.