Skip to content
Open
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
7 changes: 4 additions & 3 deletions cmd/machine-config-controller/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
features "github.com/openshift/api/features"
"github.com/openshift/machine-config-operator/cmd/common"
"github.com/openshift/machine-config-operator/internal/clients"
bootimagecontroller "github.com/openshift/machine-config-operator/pkg/controller/bootimage"
certrotationcontroller "github.com/openshift/machine-config-operator/pkg/controller/certrotation"
ctrlcommon "github.com/openshift/machine-config-operator/pkg/controller/common"
containerruntimeconfig "github.com/openshift/machine-config-operator/pkg/controller/container-runtime-config"
"github.com/openshift/machine-config-operator/pkg/controller/drain"
"github.com/openshift/machine-config-operator/pkg/controller/internalreleaseimage"
kubeletconfig "github.com/openshift/machine-config-operator/pkg/controller/kubelet-config"
machinesetbootimage "github.com/openshift/machine-config-operator/pkg/controller/machine-set-boot-image"
"github.com/openshift/machine-config-operator/pkg/controller/node"
"github.com/openshift/machine-config-operator/pkg/controller/pinnedimageset"
"github.com/openshift/machine-config-operator/pkg/controller/render"
Expand Down Expand Up @@ -144,7 +144,7 @@ func runStartCmd(_ *cobra.Command, _ []string) {
}

if ctrlcommon.IsBootImageControllerRequired(ctrlctx) {
machineSetBootImage := machinesetbootimage.New(
bootImageController := bootimagecontroller.New(
ctrlctx.ClientBuilder.KubeClientOrDie("machine-set-boot-image-controller"),
ctrlctx.ClientBuilder.MachineClientOrDie("machine-set-boot-image-controller"),
ctrlctx.KubeNamespacedInformerFactory.Core().V1().ConfigMaps(),
Expand All @@ -153,9 +153,10 @@ func runStartCmd(_ *cobra.Command, _ []string) {
ctrlctx.ConfigInformerFactory.Config().V1().Infrastructures(),
ctrlctx.ClientBuilder.OperatorClientOrDie(componentName),
ctrlctx.OperatorInformerFactory.Operator().V1().MachineConfigurations(),
ctrlctx.ConfigInformerFactory.Config().V1().ClusterVersions(),
ctrlctx.FeatureGatesHandler,
)
go machineSetBootImage.Run(ctrlctx.Stop)
go bootImageController.Run(ctrlctx.Stop)
// start the informers again to enable feature gated types.
// see comments in SharedInformerFactory interface.
ctrlctx.KubeNamespacedInformerFactory.Start(ctrlctx.Stop)
Expand Down
21 changes: 10 additions & 11 deletions devex/cmd/mco-sanitize/redactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,17 @@ func recursiveWalk(node *visitorNode, path []string) (bool, error) {
}
}
return changed, nil
} else {
// The path provides the index to pick. Transverse only that index
pathIndex, err := strconv.Atoi(key)
if err != nil {
return false, errors.New("redact path uses array indexing at a path level that is not an array")
}
newNode := node.newArrayChild(pathIndex)
if newNode == nil {
return false, nil
}
return recursiveWalk(newNode, path[1:])
}
// The path provides the index to pick. Transverse only that index
pathIndex, err := strconv.Atoi(key)
if err != nil {
return false, errors.New("redact path uses array indexing at a path level that is not an array")
}
newNode := node.newArrayChild(pathIndex)
if newNode == nil {
return false, nil
}
return recursiveWalk(newNode, path[1:])
case map[string]interface{}:
// Map case. newObjectChild returns nil if the key doesn't exist which should make us
// break the transversing path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package machineset
package bootimage

import (
"k8s.io/apimachinery/pkg/util/sets"
Expand Down
Loading