-
Notifications
You must be signed in to change notification settings - Fork 1.5k
*: move to Ignition v3 #1468
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
*: move to Ignition v3 #1468
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ import ( | |
| "fmt" | ||
| "net/url" | ||
|
|
||
| ignition "github.com/coreos/ignition/config/v2_2/types" | ||
| ignition "github.com/coreos/ignition/config/v3_0/types" | ||
| "github.com/vincent-petithory/dataurl" | ||
|
|
||
| "github.com/openshift/installer/pkg/types" | ||
|
|
@@ -13,18 +13,19 @@ import ( | |
| // pointerIgnitionConfig generates a config which references the remote config | ||
| // served by the machine config server. | ||
| func pointerIgnitionConfig(installConfig *types.InstallConfig, rootCA []byte, role string) *ignition.Config { | ||
| source := func() *url.URL { | ||
|
||
| return &url.URL{ | ||
| Scheme: "https", | ||
| Host: fmt.Sprintf("api.%s:22623", installConfig.ClusterDomain()), | ||
| Path: fmt.Sprintf("/config/%s", role), | ||
| } | ||
| }().String() | ||
| return &ignition.Config{ | ||
| Ignition: ignition.Ignition{ | ||
| Version: ignition.MaxVersion.String(), | ||
| Config: ignition.IgnitionConfig{ | ||
| Append: []ignition.ConfigReference{{ | ||
| Source: func() *url.URL { | ||
| return &url.URL{ | ||
| Scheme: "https", | ||
| Host: fmt.Sprintf("api.%s:22623", installConfig.ClusterDomain()), | ||
| Path: fmt.Sprintf("/config/%s", role), | ||
| } | ||
| }().String(), | ||
| Merge: []ignition.ConfigReference{{ | ||
| Source: &source, | ||
| }}, | ||
| }, | ||
| Security: ignition.Security{ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no need for func.
https://play.golang.org/p/kM-DWZ9yCXN