Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: pre-transition ign refactor #610

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/MachineConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type MachineConfigSpec struct {
// fetch the OS. This must be in the canonical $name@$digest format.
OSImageURL string `json:"osImageURL"`
// Config is a Ignition Config object.
Config ignv2_2.Config `json:"config"`
Config ign.Config `json:"config"`
}
```

Expand Down
32 changes: 16 additions & 16 deletions lib/resourceapply/machineconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

ignv2_2types "github.com/coreos/ignition/config/v2_2/types"
igntypes "github.com/coreos/ignition/config/v2_2/types"
"github.com/davecgh/go-spew/spew"
mcfgv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
"github.com/openshift/machine-config-operator/pkg/generated/clientset/versioned/fake"
Expand Down Expand Up @@ -175,9 +175,9 @@ func TestApplyMachineConfig(t *testing.T) {
input: &mcfgv1.MachineConfig{
ObjectMeta: metav1.ObjectMeta{Name: "foo"},
Spec: mcfgv1.MachineConfigSpec{
Config: ignv2_2types.Config{
Passwd: ignv2_2types.Passwd{
Users: []ignv2_2types.PasswdUser{{
Config: igntypes.Config{
Passwd: igntypes.Passwd{
Users: []igntypes.PasswdUser{{
HomeDir: "/home/dummy",
kikisdeliveryservice marked this conversation as resolved.
Show resolved Hide resolved
}},
},
Expand All @@ -199,9 +199,9 @@ func TestApplyMachineConfig(t *testing.T) {
expected := &mcfgv1.MachineConfig{
ObjectMeta: metav1.ObjectMeta{Name: "foo", Labels: map[string]string{"extra": "leave-alone"}},
Spec: mcfgv1.MachineConfigSpec{
Config: ignv2_2types.Config{
Passwd: ignv2_2types.Passwd{
Users: []ignv2_2types.PasswdUser{{
Config: igntypes.Config{
Passwd: igntypes.Passwd{
Users: []igntypes.PasswdUser{{
HomeDir: "/home/dummy",
}},
},
Expand All @@ -218,9 +218,9 @@ func TestApplyMachineConfig(t *testing.T) {
&mcfgv1.MachineConfig{
ObjectMeta: metav1.ObjectMeta{Name: "foo", Labels: map[string]string{"extra": "leave-alone"}},
Spec: mcfgv1.MachineConfigSpec{
Config: ignv2_2types.Config{
Passwd: ignv2_2types.Passwd{
Users: []ignv2_2types.PasswdUser{{
Config: igntypes.Config{
Passwd: igntypes.Passwd{
Users: []igntypes.PasswdUser{{
HomeDir: "/home/dummy-prev",
}},
},
Expand All @@ -231,9 +231,9 @@ func TestApplyMachineConfig(t *testing.T) {
input: &mcfgv1.MachineConfig{
ObjectMeta: metav1.ObjectMeta{Name: "foo"},
Spec: mcfgv1.MachineConfigSpec{
Config: ignv2_2types.Config{
Passwd: ignv2_2types.Passwd{
Users: []ignv2_2types.PasswdUser{{
Config: igntypes.Config{
Passwd: igntypes.Passwd{
Users: []igntypes.PasswdUser{{
HomeDir: "/home/dummy",
}},
},
Expand All @@ -255,9 +255,9 @@ func TestApplyMachineConfig(t *testing.T) {
expected := &mcfgv1.MachineConfig{
ObjectMeta: metav1.ObjectMeta{Name: "foo", Labels: map[string]string{"extra": "leave-alone"}},
Spec: mcfgv1.MachineConfigSpec{
Config: ignv2_2types.Config{
Passwd: ignv2_2types.Passwd{
Users: []ignv2_2types.PasswdUser{{
Config: igntypes.Config{
Passwd: igntypes.Passwd{
Users: []igntypes.PasswdUser{{
HomeDir: "/home/dummy",
}},
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/machineconfiguration.openshift.io/v1/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"sort"

ignv2_2 "github.com/coreos/ignition/config/v2_2"
ign "github.com/coreos/ignition/config/v2_2"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand All @@ -21,7 +21,7 @@ func MergeMachineConfigs(configs []*MachineConfig, osImageURL string) *MachineCo

outIgn := configs[0].Spec.Config
for idx := 1; idx < len(configs); idx++ {
outIgn = ignv2_2.Append(outIgn, configs[idx].Spec.Config)
outIgn = ign.Append(outIgn, configs[idx].Spec.Config)
}

return &MachineConfig{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package v1

import (
ignv2_2 "github.com/coreos/ignition/config/v2_2"
ignv2_2types "github.com/coreos/ignition/config/v2_2/types"
ign "github.com/coreos/ignition/config/v2_2"
igntypes "github.com/coreos/ignition/config/v2_2/types"
runtime "k8s.io/apimachinery/pkg/runtime"
)

Expand Down Expand Up @@ -37,13 +37,13 @@ func (in *MachineConfigSpec) DeepCopyInto(out *MachineConfigSpec) {
return
}

func deepCopyIgnConfig(in ignv2_2types.Config) ignv2_2types.Config {
var out ignv2_2types.Config
func deepCopyIgnConfig(in igntypes.Config) igntypes.Config {
var out igntypes.Config

// https://github.com/coreos/ignition/blob/d19b2021cf397de7c31774c13805bbc3aa655646/config/v2_2/append.go#L41
out.Ignition.Version = in.Ignition.Version

return ignv2_2.Append(out, in)
return ign.Append(out, in)
}

// DeepCopy copying the receiver, creating a new MachineConfigSpec.
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/machineconfiguration.openshift.io/v1/types.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1

import (
ignv2_2types "github.com/coreos/ignition/config/v2_2/types"
igntypes "github.com/coreos/ignition/config/v2_2/types"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -228,7 +228,7 @@ type MachineConfigSpec struct {
// fetch the OS.
OSImageURL string `json:"osImageURL"`
// Config is a Ignition Config object.
Config ignv2_2types.Config `json:"config"`
Config igntypes.Config `json:"config"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
12 changes: 6 additions & 6 deletions pkg/controller/common/helpers.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package common

import (
ignv2_2types "github.com/coreos/ignition/config/v2_2/types"
igntypes "github.com/coreos/ignition/config/v2_2/types"
)

// NewIgnConfig returns an empty ignition config with version set as 2.2.0
func NewIgnConfig() ignv2_2types.Config {
return ignv2_2types.Config{
Ignition: ignv2_2types.Ignition{
Version: "2.2.0",
// NewIgnConfig returns an empty ignition config with version set as latest version
func NewIgnConfig() igntypes.Config {
return igntypes.Config{
Ignition: igntypes.Ignition{
Version: igntypes.MaxVersion.String(),
},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"reflect"
"time"

ignv2_2types "github.com/coreos/ignition/config/v2_2/types"
igntypes "github.com/coreos/ignition/config/v2_2/types"
"github.com/golang/glog"
"github.com/vincent-petithory/dataurl"
"k8s.io/api/core/v1"
Expand Down Expand Up @@ -345,7 +345,7 @@ func (ctrl *Controller) handleImgErr(err error, key interface{}) {
}

// generateOriginalContainerRuntimeConfigs returns rendered default storage, and crio config files
func (ctrl *Controller) generateOriginalContainerRuntimeConfigs(role string) (*ignv2_2types.File, *ignv2_2types.File, *ignv2_2types.File, error) {
func (ctrl *Controller) generateOriginalContainerRuntimeConfigs(role string) (*igntypes.File, *igntypes.File, *igntypes.File, error) {
cc, err := ctrl.ccLister.Get(ctrlcommon.ControllerConfigName)
if err != nil {
return nil, nil, nil, fmt.Errorf("could not get ControllerConfig %v", err)
Expand All @@ -359,7 +359,7 @@ func (ctrl *Controller) generateOriginalContainerRuntimeConfigs(role string) (*i
}
// Find generated storage.config, and crio.config
var (
config, gmcStorageConfig, gmcCRIOConfig, gmcRegistriesConfig *ignv2_2types.File
config, gmcStorageConfig, gmcCRIOConfig, gmcRegistriesConfig *igntypes.File
errStorage, errCRIO, errRegistries error
)
// Find storage config
Expand Down Expand Up @@ -504,7 +504,8 @@ func (ctrl *Controller) syncContainerRuntimeConfig(key string) error {
}
}
if isNotFound {
mc = mtmpl.MachineConfigFromIgnConfig(role, managedKey, &ignv2_2types.Config{})
tempIgnCfg := ctrlcommon.NewIgnConfig()
mc = mtmpl.MachineConfigFromIgnConfig(role, managedKey, &tempIgnCfg)
}
mc.Spec.Config = createNewCtrRuntimeConfigIgnition(storageTOML, crioTOML)
mc.SetAnnotations(map[string]string{
Expand Down Expand Up @@ -536,7 +537,7 @@ func (ctrl *Controller) syncContainerRuntimeConfig(key string) error {

// mergeConfigChanges retrieves the original/default config data from the templates, decodes it and merges in the changes given by the Custom Resource.
// It then encodes the new data and returns it.
func (ctrl *Controller) mergeConfigChanges(origFile *ignv2_2types.File, cfg *mcfgv1.ContainerRuntimeConfig, mc *mcfgv1.MachineConfig, role, managedKey string, isNotFound bool, update updateConfig) ([]byte, error) {
func (ctrl *Controller) mergeConfigChanges(origFile *igntypes.File, cfg *mcfgv1.ContainerRuntimeConfig, mc *mcfgv1.MachineConfig, role, managedKey string, isNotFound bool, update updateConfig) ([]byte, error) {
dataURL, err := dataurl.DecodeString(origFile.Contents.Source)
if err != nil {
return nil, ctrl.syncStatusOnly(cfg, err, "could not decode original Container Runtime config: %v", err)
Expand Down Expand Up @@ -631,7 +632,8 @@ func (ctrl *Controller) syncImageConfig(key string) error {
}
}
if isNotFound {
mc = mtmpl.MachineConfigFromIgnConfig(role, managedKey, &ignv2_2types.Config{})
tempIgnCfg := ctrlcommon.NewIgnConfig()
mc = mtmpl.MachineConfigFromIgnConfig(role, managedKey, &tempIgnCfg)
}
mc.Spec.Config = registriesIgn
mc.ObjectMeta.Annotations = map[string]string{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/record"

ignv2_2types "github.com/coreos/ignition/config/v2_2/types"
igntypes "github.com/coreos/ignition/config/v2_2/types"
apicfgv1 "github.com/openshift/api/config/v1"
fakeconfigv1client "github.com/openshift/client-go/config/clientset/versioned/fake"
configv1informer "github.com/openshift/client-go/config/informers/externalversions"
Expand Down Expand Up @@ -86,7 +86,7 @@ func (f *fixture) validateActions() {
}
}

func newMachineConfig(name string, labels map[string]string, osurl string, files []ignv2_2types.File) *mcfgv1.MachineConfig {
func newMachineConfig(name string, labels map[string]string, osurl string, files []igntypes.File) *mcfgv1.MachineConfig {
if labels == nil {
labels = map[string]string{}
}
Expand All @@ -95,7 +95,7 @@ func newMachineConfig(name string, labels map[string]string, osurl string, files
ObjectMeta: metav1.ObjectMeta{Name: name, Labels: labels, UID: types.UID(utilrand.String(5))},
Spec: mcfgv1.MachineConfigSpec{
OSImageURL: osurl,
Config: ignv2_2types.Config{Storage: ignv2_2types.Storage{Files: files}},
Config: igntypes.Config{Storage: igntypes.Storage{Files: files}},
},
}
}
Expand Down Expand Up @@ -341,7 +341,7 @@ func TestContainerRuntimeConfigCreate(t *testing.T) {
mcp := newMachineConfigPool("master", map[string]string{"custom-crio": "my-config"}, metav1.AddLabelToSelector(&metav1.LabelSelector{}, "node-role", "master"), "v0")
mcp2 := newMachineConfigPool("worker", map[string]string{"custom-crio": "storage-config"}, metav1.AddLabelToSelector(&metav1.LabelSelector{}, "node-role", "worker"), "v0")
ctrcfg1 := newContainerRuntimeConfig("set-log-level", &mcfgv1.ContainerRuntimeConfiguration{LogLevel: "debug", LogSizeMax: resource.MustParse("9k"), OverlaySize: resource.MustParse("3G")}, metav1.AddLabelToSelector(&metav1.LabelSelector{}, "custom-crio", "my-config"))
mcs1 := newMachineConfig(getManagedKeyCtrCfg(mcp, ctrcfg1), map[string]string{"node-role": "master"}, "dummy://", []ignv2_2types.File{{}})
mcs1 := newMachineConfig(getManagedKeyCtrCfg(mcp, ctrcfg1), map[string]string{"node-role": "master"}, "dummy://", []igntypes.File{{}})

f.ccLister = append(f.ccLister, cc)
f.mcpLister = append(f.mcpLister, mcp)
Expand Down Expand Up @@ -372,7 +372,7 @@ func TestContainerRuntimeConfigUpdate(t *testing.T) {
mcp := newMachineConfigPool("master", map[string]string{"custom-crio": "my-config"}, metav1.AddLabelToSelector(&metav1.LabelSelector{}, "node-role", "master"), "v0")
mcp2 := newMachineConfigPool("worker", map[string]string{"custom-crio": "storage-config"}, metav1.AddLabelToSelector(&metav1.LabelSelector{}, "node-role", "worker"), "v0")
ctrcfg1 := newContainerRuntimeConfig("set-log-level", &mcfgv1.ContainerRuntimeConfiguration{LogLevel: "debug", LogSizeMax: resource.MustParse("9k"), OverlaySize: resource.MustParse("3G")}, metav1.AddLabelToSelector(&metav1.LabelSelector{}, "custom-crio", "my-config"))
mcs := newMachineConfig(getManagedKeyCtrCfg(mcp, ctrcfg1), map[string]string{"node-role": "master"}, "dummy://", []ignv2_2types.File{{}})
mcs := newMachineConfig(getManagedKeyCtrCfg(mcp, ctrcfg1), map[string]string{"node-role": "master"}, "dummy://", []igntypes.File{{}})

f.ccLister = append(f.ccLister, cc)
f.mcpLister = append(f.mcpLister, mcp)
Expand Down Expand Up @@ -448,8 +448,8 @@ func TestImageConfigCreate(t *testing.T) {
mcp2 := newMachineConfigPool("worker", map[string]string{"custom-crio": "storage-config"}, metav1.AddLabelToSelector(&metav1.LabelSelector{}, "node-role", "worker"), "v0")
imgcfg1 := newImageConfig("cluster", &apicfgv1.RegistrySources{InsecureRegistries: []string{"blah.io"}})
cvcfg1 := newClusterVersionConfig("version", "test.io/myuser/myimage:test")
mcs1 := newMachineConfig(getManagedKeyReg(mcp, imgcfg1), map[string]string{"node-role": "master"}, "dummy://", []ignv2_2types.File{{}})
mcs2 := newMachineConfig(getManagedKeyReg(mcp2, imgcfg1), map[string]string{"node-role": "worker"}, "dummy://", []ignv2_2types.File{{}})
mcs1 := newMachineConfig(getManagedKeyReg(mcp, imgcfg1), map[string]string{"node-role": "master"}, "dummy://", []igntypes.File{{}})
mcs2 := newMachineConfig(getManagedKeyReg(mcp2, imgcfg1), map[string]string{"node-role": "worker"}, "dummy://", []igntypes.File{{}})

f.ccLister = append(f.ccLister, cc)
f.mcpLister = append(f.mcpLister, mcp)
Expand Down Expand Up @@ -480,8 +480,8 @@ func TestImageConfigUpdate(t *testing.T) {
mcp2 := newMachineConfigPool("worker", map[string]string{"custom-crio": "storage-config"}, metav1.AddLabelToSelector(&metav1.LabelSelector{}, "node-role", "worker"), "v0")
imgcfg1 := newImageConfig("cluster", &apicfgv1.RegistrySources{InsecureRegistries: []string{"blah.io"}})
cvcfg1 := newClusterVersionConfig("version", "test.io/myuser/myimage:test")
mcs1 := newMachineConfig(getManagedKeyReg(mcp, imgcfg1), map[string]string{"node-role": "master"}, "dummy://", []ignv2_2types.File{{}})
mcs2 := newMachineConfig(getManagedKeyReg(mcp2, imgcfg1), map[string]string{"node-role": "worker"}, "dummy://", []ignv2_2types.File{{}})
mcs1 := newMachineConfig(getManagedKeyReg(mcp, imgcfg1), map[string]string{"node-role": "master"}, "dummy://", []igntypes.File{{}})
mcs2 := newMachineConfig(getManagedKeyReg(mcp2, imgcfg1), map[string]string{"node-role": "worker"}, "dummy://", []igntypes.File{{}})

f.ccLister = append(f.ccLister, cc)
f.mcpLister = append(f.mcpLister, mcp)
Expand Down
36 changes: 18 additions & 18 deletions pkg/controller/container-runtime-config/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/containers/image/docker/reference"
"github.com/containers/image/pkg/sysregistriesv2"
storageconfig "github.com/containers/storage/pkg/config"
ignv2_2types "github.com/coreos/ignition/config/v2_2/types"
igntypes "github.com/coreos/ignition/config/v2_2/types"
crioconfig "github.com/kubernetes-sigs/cri-o/pkg/config"
apicfgv1 "github.com/openshift/api/config/v1"
mcfgv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
Expand Down Expand Up @@ -61,21 +61,21 @@ type tomlConfigRegistries struct {

type updateConfig func(data []byte, internal *mcfgv1.ContainerRuntimeConfiguration) ([]byte, error)

func createNewCtrRuntimeConfigIgnition(storageTOMLConfig, crioTOMLConfig []byte) ignv2_2types.Config {
func createNewCtrRuntimeConfigIgnition(storageTOMLConfig, crioTOMLConfig []byte) igntypes.Config {
tempIgnConfig := ctrlcommon.NewIgnConfig()
mode := 0644
// Create storage.conf ignition
if storageTOMLConfig != nil {
storagedu := dataurl.New(storageTOMLConfig, "text/plain")
storagedu.Encoding = dataurl.EncodingASCII
storageTempFile := ignv2_2types.File{
Node: ignv2_2types.Node{
storageTempFile := igntypes.File{
Node: igntypes.Node{
Filesystem: "root",
Path: storageConfigPath,
},
FileEmbedded1: ignv2_2types.FileEmbedded1{
FileEmbedded1: igntypes.FileEmbedded1{
Mode: &mode,
Contents: ignv2_2types.FileContents{
Contents: igntypes.FileContents{
Source: storagedu.String(),
},
},
Expand All @@ -87,14 +87,14 @@ func createNewCtrRuntimeConfigIgnition(storageTOMLConfig, crioTOMLConfig []byte)
if crioTOMLConfig != nil {
criodu := dataurl.New(crioTOMLConfig, "text/plain")
criodu.Encoding = dataurl.EncodingASCII
crioTempFile := ignv2_2types.File{
Node: ignv2_2types.Node{
crioTempFile := igntypes.File{
Node: igntypes.Node{
Filesystem: "root",
Path: crioConfigPath,
},
FileEmbedded1: ignv2_2types.FileEmbedded1{
FileEmbedded1: igntypes.FileEmbedded1{
Mode: &mode,
Contents: ignv2_2types.FileContents{
Contents: igntypes.FileContents{
Source: criodu.String(),
},
},
Expand All @@ -105,21 +105,21 @@ func createNewCtrRuntimeConfigIgnition(storageTOMLConfig, crioTOMLConfig []byte)
return tempIgnConfig
}

func createNewRegistriesConfigIgnition(registriesTOMLConfig []byte) ignv2_2types.Config {
func createNewRegistriesConfigIgnition(registriesTOMLConfig []byte) igntypes.Config {
tempIgnConfig := ctrlcommon.NewIgnConfig()
mode := 0644
// Create Registries ignition
if registriesTOMLConfig != nil {
regdu := dataurl.New(registriesTOMLConfig, "text/plain")
regdu.Encoding = dataurl.EncodingASCII
regTempFile := ignv2_2types.File{
Node: ignv2_2types.Node{
regTempFile := igntypes.File{
Node: igntypes.Node{
Filesystem: "root",
Path: registriesConfigPath,
},
FileEmbedded1: ignv2_2types.FileEmbedded1{
FileEmbedded1: igntypes.FileEmbedded1{
Mode: &mode,
Contents: ignv2_2types.FileContents{
Contents: igntypes.FileContents{
Source: regdu.String(),
},
},
Expand All @@ -129,7 +129,7 @@ func createNewRegistriesConfigIgnition(registriesTOMLConfig []byte) ignv2_2types
return tempIgnConfig
}

func findStorageConfig(mc *mcfgv1.MachineConfig) (*ignv2_2types.File, error) {
func findStorageConfig(mc *mcfgv1.MachineConfig) (*igntypes.File, error) {
for _, c := range mc.Spec.Config.Storage.Files {
if c.Path == storageConfigPath {
return &c, nil
Expand All @@ -138,7 +138,7 @@ func findStorageConfig(mc *mcfgv1.MachineConfig) (*ignv2_2types.File, error) {
return nil, fmt.Errorf("could not find Storage Config")
}

func findCRIOConfig(mc *mcfgv1.MachineConfig) (*ignv2_2types.File, error) {
func findCRIOConfig(mc *mcfgv1.MachineConfig) (*igntypes.File, error) {
for _, c := range mc.Spec.Config.Storage.Files {
if c.Path == crioConfigPath {
return &c, nil
Expand All @@ -147,7 +147,7 @@ func findCRIOConfig(mc *mcfgv1.MachineConfig) (*ignv2_2types.File, error) {
return nil, fmt.Errorf("could not find CRI-O Config")
}

func findRegistriesConfig(mc *mcfgv1.MachineConfig) (*ignv2_2types.File, error) {
func findRegistriesConfig(mc *mcfgv1.MachineConfig) (*igntypes.File, error) {
for _, c := range mc.Spec.Config.Storage.Files {
if c.Path == registriesConfigPath {
return &c, nil
Expand Down
Loading