Skip to content
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
4 changes: 2 additions & 2 deletions Gopkg.lock

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

23 changes: 0 additions & 23 deletions pkg/controller/template/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
ignv2_2types "github.com/coreos/ignition/config/v2_2/types"
"github.com/ghodss/yaml"
"github.com/golang/glog"
"github.com/openshift/machine-config-operator/lib/resourcemerge"
mcfgv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
"github.com/openshift/machine-config-operator/pkg/controller/common"
"github.com/openshift/machine-config-operator/pkg/version"
Expand Down Expand Up @@ -75,11 +74,7 @@ func generateTemplateMachineConfigs(config *RenderConfig, templateDir string) ([
if err != nil {
return nil, fmt.Errorf("failed to create MachineConfig for role %s: %v", role, err)
}
if len(roleConfigs) > 0 {
injectDockerConfigKubeletAuthSymlink(roleConfigs[len(roleConfigs)-1])
}
cfgs = append(cfgs, roleConfigs...)

}

// tag all the machineconfigs with version of the controller.
Expand All @@ -93,24 +88,6 @@ func generateTemplateMachineConfigs(config *RenderConfig, templateDir string) ([
return cfgs, nil
}

// injectDockerConfigKubeletAuthSymlink is a hack to symlink /var/lib/kubelet/auth.json -> ~/.docker/config.json
// See https://bugzilla.redhat.com/show_bug.cgi?id=1686556
// https://github.com/containers/skopeo/pull/612
func injectDockerConfigKubeletAuthSymlink(cfg *mcfgv1.MachineConfig) {
authLink := ignv2_2types.Link{
Node: ignv2_2types.Node{
Filesystem: "root",
Path: "/root/.docker/config.json",
Overwrite: resourcemerge.BoolPtr(false),
},
LinkEmbedded1: ignv2_2types.LinkEmbedded1{
Hard: false,
Target: "/var/lib/kubelet/config.json",
},
}
cfg.Spec.Config.Storage.Links = append(cfg.Spec.Config.Storage.Links, authLink)
}

// GenerateMachineConfigsForRole creates MachineConfigs for the role provided
func GenerateMachineConfigsForRole(config *RenderConfig, role string, path string) ([]*mcfgv1.MachineConfig, error) {
infos, err := ioutil.ReadDir(path)
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ contents:
# pause_image is the image which we use to instantiate infra containers.
pause_image = "{{.Images.infraImage}}"

# If not empty, the path to a docker/config.json-like file containing credentials
# necessary for pulling the image specified by pause_image above.
pause_image_auth_file = "/var/lib/kubelet/config.json"

# pause_command is the command to run in a pause_image to have a container just
# sit there. If the image contains the necessary information, this value need
# not be specified.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ contents:
# pause_image is the image which we use to instantiate infra containers.
pause_image = "{{.Images.infraImage}}"

# If not empty, the path to a docker/config.json-like file containing credentials
# necessary for pulling the image specified by pause_image above.
pause_image_auth_file = "/var/lib/kubelet/config.json"

# pause_command is the command to run in a pause_image to have a container just
# sit there. If the image contains the necessary information, this value need
# not be specified.
Expand Down

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