Skip to content

Commit 09d409e

Browse files
committed
Support providing translating Butane configs via library
This change allows users to specify Butane configs [1] [2] directly to their instances on startup instead of an Ignition config. Many users already store their configs in Butane format and Butane provides some "sugar" for making it easier to generate Ignition specification configs. Some of this "sugar" is distro agnostic and some of it is distro specific. Implementing this means that users don't have to separately convert their Butane YAML configs into Ignition JSON configs via the `butane` CLI tool. This has the benefit of being easier for new users to understand and also the benefit of not having to have intermediate formats be either generated out of band at runtime OR stored in version control. It has the drawback, though, of allowing users to provide a configuration to their instance that is invalid and could have been detected earlier. After six years of experience in this space I believe the tradeoffs mentioned above are worth making a change like this. [1] https://coreos.github.io/butane/ [2] https://github.com/coreos/butane
1 parent 6a66bcb commit 09d409e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

config/config.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
package config
1616

1717
import (
18+
"github.com/coreos/ignition/v2/config/shared/errors"
1819
exp "github.com/coreos/ignition/v2/config/v3_6_experimental"
1920
types_exp "github.com/coreos/ignition/v2/config/v3_6_experimental/types"
20-
util "github.com/coreos/ignition/v2/config/util"
21-
"github.com/coreos/ignition/v2/config/shared/errors"
22-
23-
"github.com/coreos/vcontext/report"
21+
"github.com/coreos/ignition/v2/config/util"
2422

2523
butane_config "github.com/coreos/butane/config"
2624
butane_config_common "github.com/coreos/butane/config/common"
25+
"github.com/coreos/vcontext/report"
2726
)
2827

2928
// Parse parses a config of any supported version and returns the equivalent config at the latest

0 commit comments

Comments
 (0)