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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Use RHEL 9 as the primary builder base for the Machine Config Operator
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS rhel9-builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS rhel9-builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/machine-config-operator
COPY . .

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Avoid copying the entire build context.

Both builder stages copy the entire build context (COPY . .), which violates the container security path instructions. This practice can unintentionally include sensitive files or unnecessary dependencies, and it degrades layer caching.

  • Dockerfile#L5-L5: update to COPY only the specific source files needed for make install DESTDIR=./instroot-rhel9.
  • Dockerfile#L13-L13: update to COPY only the specific source files needed for make install DESTDIR=./instroot-rhel8.
📍 Affects 1 file
  • Dockerfile#L5-L5 (this comment)
  • Dockerfile#L13-L13
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 5, Replace the broad COPY directives in both builder
stages with explicit copies of only the source files required by make install
DESTDIR=./instroot-rhel9 and make install DESTDIR=./instroot-rhel8. Update
Dockerfile lines 5-5 and 13-13 consistently, preserving each stage’s existing
build behavior while excluding sensitive and unnecessary context files.

Source: Path instructions

RUN make install DESTDIR=./instroot-rhel9

# Add a RHEL 8 builder to compile the RHEL 8 compatible binaries
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.25-openshift-4.22 AS rhel8-builder
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.26-openshift-5.0 AS rhel8-builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/machine-config-operator
# Copy the RHEL 8 machine-config-daemon binary and rename
COPY . .
RUN make install DESTDIR=./instroot-rhel8

FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
FROM registry.ci.openshift.org/ocp/5.0:base-rhel9

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Apply required container security practices to the final image.

The final stage does not comply with the following container security path instructions:

  • USER non-root: The final image must specify a non-root user (e.g., USER 1000 or USER nonroot) and never run as root. The stage inherits the default root user and does not switch users before the ENTRYPOINT.
  • HEALTHCHECK defined: The image must define a HEALTHCHECK instruction to allow runtime orchestration tools to monitor the container's health.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 16, Update the final image stage based on FROM
registry.ci.openshift.org/ocp/5.0:base-rhel9 to add a HEALTHCHECK instruction
and set a non-root USER before ENTRYPOINT. Ensure the chosen user can execute
the entrypoint and that the container never runs as root.

Source: Path instructions

ARG TAGS=""
COPY install /manifests
RUN if [ "${TAGS}" = "fcos" ]; then \
Expand Down
178 changes: 88 additions & 90 deletions go.mod

Large diffs are not rendered by default.

327 changes: 167 additions & 160 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/controller/drain/drain_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ func (ctrl *Controller) drainNode(node *corev1.Node, drainer *drain.Helper) erro
if duration > ctrl.cfg.DrainTimeoutDuration {
logMessage := fmt.Sprintf("node %s: drain exceeded timeout: %v. Will continue to retry.", node.Name, ctrl.cfg.DrainTimeoutDuration)
klog.Error(logMessage)
ctrl.eventRecorder.Eventf(node, corev1.EventTypeWarning, "DrainFailed", logMessage)
ctrl.eventRecorder.Eventf(node, corev1.EventTypeWarning, "DrainFailed", "%s", logMessage)
ctrlcommon.MCCDrainErr.WithLabelValues(node.Name).Set(1)
}
break
Expand Down Expand Up @@ -493,7 +493,7 @@ func (ctrl *Controller) drainNode(node *corev1.Node, drainer *drain.Helper) erro
logMessage := fmt.Sprintf("Drain failed. Drain has been failing for more than %v minutes. Waiting %v minutes then retrying. "+
"Error message from drain: %v", ctrl.cfg.DrainRequeueFailingThreshold.Minutes(), ctrl.cfg.DrainRequeueFailingDelay.Minutes(), err)
ctrl.logNode(node, "%s", logMessage)
ctrl.eventRecorder.Eventf(node, corev1.EventTypeWarning, "DrainThresholdExceeded", logMessage)
ctrl.eventRecorder.Eventf(node, corev1.EventTypeWarning, "DrainThresholdExceeded", "%s", logMessage)
ctrl.enqueueAfter(node, ctrl.cfg.DrainRequeueFailingDelay)
} else {
ctrl.logNode(node, "Drain failed. Waiting %v minute then retrying. Error message from drain: %v",
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/kubelet-config/kubelet_config_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (ctrl *Controller) updateNodeConfig(old, cur interface{}) {
}
if newNode.Name != ctrlcommon.ClusterNodeInstanceName {
message := fmt.Sprintf("The node.config.openshift.io \"%v\" is invalid: metadata.name Invalid value: \"%v\" : must be \"%v\"", newNode.Name, newNode.Name, ctrlcommon.ClusterNodeInstanceName)
ctrl.eventRecorder.Eventf(oldNode, corev1.EventTypeNormal, "ActionProhibited", message)
ctrl.eventRecorder.Eventf(oldNode, corev1.EventTypeNormal, "ActionProhibited", "%s", message)
klog.V(2).Infof("%s", message)
return
}
Expand All @@ -228,7 +228,7 @@ func (ctrl *Controller) updateNodeConfig(old, cur interface{}) {
}
if !isValidWorkerLatencyProfleTransition {
message := fmt.Sprintf("Skipping the Update Node event, name: %s, transition not allowed from old WorkerLatencyProfile: \"%s\" to new WorkerLatencyProfile: \"%s\"", newNode.Name, oldNode.Spec.WorkerLatencyProfile, newNode.Spec.WorkerLatencyProfile)
ctrl.eventRecorder.Eventf(newNode, corev1.EventTypeNormal, "ActionProhibited", message)
ctrl.eventRecorder.Eventf(newNode, corev1.EventTypeNormal, "ActionProhibited", "%s", message)
klog.Info(message)
return
}
Expand All @@ -246,7 +246,7 @@ func (ctrl *Controller) addNodeConfig(obj interface{}) {
if nodeConfig.Name != ctrlcommon.ClusterNodeInstanceName {
message := fmt.Sprintf("The node.config.openshift.io \"%v\" is invalid: metadata.name Invalid value: \"%v\" : must be \"%v\"", nodeConfig.Name, nodeConfig.Name, ctrlcommon.ClusterNodeInstanceName)
klog.V(2).Info(message)
ctrl.eventRecorder.Eventf(nodeConfig, corev1.EventTypeNormal, "ActionProhibited", message)
ctrl.eventRecorder.Eventf(nodeConfig, corev1.EventTypeNormal, "ActionProhibited", "%s", message)
return
}
klog.V(4).Infof("Adding the node config resource, name: %s", nodeConfig.Name)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/node/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ func (ctrl *Controller) updateNode(old, cur interface{}) {
changed = true
// For the control plane, emit events for these since they're important
if pool.Name == ctrlcommon.MachineConfigPoolMaster {
ctrl.eventRecorder.Eventf(pool, corev1.EventTypeNormal, "AnnotationChange", controlPlaneChangedMsg)
ctrl.eventRecorder.Eventf(pool, corev1.EventTypeNormal, "AnnotationChange", "%s", controlPlaneChangedMsg)
}
}
if !reflect.DeepEqual(oldNode.Labels, curNode.Labels) {
Expand Down
20 changes: 9 additions & 11 deletions pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ func (dn *Daemon) runPreflightConfigDriftCheck() error {
start := time.Now()

if err := dn.validateOnDiskStateOrImage(currentOnDisk.currentConfig, currentOnDisk.currentImage); err != nil {
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "PreflightConfigDriftCheckFailed", err.Error())
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "PreflightConfigDriftCheckFailed", "%s", err.Error())
klog.Errorf("Preflight config drift check failed: %v", err)
return &configDriftErr{err}
}
Expand Down Expand Up @@ -1456,7 +1456,7 @@ func (dn *Daemon) kubeletRebootstrap(ctx context.Context) error {
// Called whenever the on-disk config has drifted from the current machineconfig.
func (dn *Daemon) onConfigDrift(err error) {
mcdConfigDrift.SetToCurrentTime()
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "ConfigDriftDetected", err.Error())
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "ConfigDriftDetected", "%s", err.Error())
klog.Error(err)
if err := dn.updateErrorState(err); err != nil {
klog.Errorf("Could not update annotation: %v", err)
Expand Down Expand Up @@ -1545,9 +1545,7 @@ func (dn *Daemon) startConfigDriftMonitor() {
return
}

dn.nodeWriter.Eventf(corev1.EventTypeNormal, "ConfigDriftMonitorStarted",
"Config Drift Monitor started, watching against %s", odc.currentConfig.Name)

dn.nodeWriter.Eventf(corev1.EventTypeNormal, "ConfigDriftMonitorStarted", "%s", fmt.Sprintf("Config Drift Monitor started, watching against %s", odc.currentConfig.Name))
go func() {
// Common shutdown function
shutdown := func() {
Expand Down Expand Up @@ -1657,7 +1655,7 @@ func (dn *Daemon) syncFinalizationFailureAnnotation(finalizeError string) error

// And let's emit this as an event
if dn.previousFinalizationFailure != finalizeError {
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedFinalization", finalizeError)
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedFinalization", "%s", finalizeError)
}

annos := map[string]string{
Expand Down Expand Up @@ -2274,7 +2272,7 @@ func (dn *Daemon) checkStateOnFirstRun() error {
}

if err := dn.validateOnDiskStateOrImage(state.currentConfig, state.currentImage); err != nil {
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "OnDiskStateValidationFailed", err.Error())
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "OnDiskStateValidationFailed", "%s", err.Error())
// Start the config drift monitor even when there's pre-existing drift
// so the metric gets initialized correctly on MCD restart
dn.startConfigDriftMonitor()
Expand All @@ -2293,7 +2291,7 @@ func (dn *Daemon) checkStateOnFirstRun() error {
}

if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "BootResync", fmt.Sprintf("Booting node %s, currentConfig %s, desiredConfig %s", dn.node.Name, state.currentConfig.GetName(), state.desiredConfig.GetName()))
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "BootResync", "%s", fmt.Sprintf("Booting node %s, currentConfig %s, desiredConfig %s", dn.node.Name, state.currentConfig.GetName(), state.desiredConfig.GetName()))
}

// currentConfig != desiredConfig, and we're not booting up into the desiredConfig.
Expand Down Expand Up @@ -2389,7 +2387,7 @@ func (dn *Daemon) updateConfigAndState(state *stateAndConfigs) (bool, bool, erro

// We update the node annotation, and pop an event saying we're done.
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "NodeDone", fmt.Sprintf("Setting node %s, currentConfig %s to Done", dn.node.Name, state.currentConfig.GetName()))
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "NodeDone", "%s", fmt.Sprintf("Setting node %s, currentConfig %s to Done", dn.node.Name, state.currentConfig.GetName()))
}

if err := dn.nodeWriter.SetDone(state); err != nil {
Expand Down Expand Up @@ -2603,14 +2601,14 @@ func (dn *Daemon) completeUpdate(desiredConfigName string) error {
}); err != nil {
if wait.Interrupted(err) {
failMsg := fmt.Sprintf("failed to uncordon node: %s after 10 minutes. Please see machine-config-controller logs for more information", dn.node.Name)
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedToUncordon", failMsg)
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedToUncordon", "%s", failMsg)
return errors.New(failMsg)
}
return fmt.Errorf("something went wrong while attempting to uncordon node: %w", err)
}

logSystem("Update completed for config %s and node has been successfully uncordoned", desiredConfigName)
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "Uncordon", fmt.Sprintf("Update completed for config %s and node has been uncordoned", desiredConfigName))
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "Uncordon", "%s", fmt.Sprintf("Update completed for config %s and node has been uncordoned", desiredConfigName))

return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/daemon/drain.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (dn *Daemon) performDrain() error {
}); err != nil {
if wait.Interrupted(err) {
failMsg := fmt.Sprintf("failed to drain node: %s after 1 hour. Please see machine-config-controller logs for more information", dn.node.Name)
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedToDrain", failMsg)
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedToDrain", "%s", failMsg)

return errors.New(failMsg)

Expand Down
22 changes: 11 additions & 11 deletions pkg/daemon/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (dn *Daemon) finishRebootlessUpdate() error {
func (dn *Daemon) executeReloadServiceNodeDisruptionAction(serviceName string, reloadErr error) error {
if reloadErr != nil {
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceReload", fmt.Sprintf("Reloading service %s failed. Error: %v", serviceName, reloadErr))
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceReload", "%s", fmt.Sprintf("Reloading service %s failed. Error: %v", serviceName, reloadErr))
}
return fmt.Errorf("could not apply update: reloading %s configuration failed. Error: %w", serviceName, reloadErr)
}
Expand All @@ -152,7 +152,7 @@ func (dn *Daemon) executeReloadServiceNodeDisruptionAction(serviceName string, r
}

if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "ServiceReload", "Config changes do not require reboot. Service %s was reloaded.", serviceName)
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "ServiceReload", "%s", fmt.Sprintf("Config changes do not require reboot. Service %s was reloaded.", serviceName))
}
logSystem("%s service reloaded successfully!", serviceName)
return nil
Expand Down Expand Up @@ -229,20 +229,20 @@ func (dn *Daemon) performPostConfigChangeNodeDisruptionAction(postConfigChangeAc
cmd.Stderr = &stderr
if err := cmd.Run(); err != nil {
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceRestart", fmt.Sprintf("Restarting %s service failed. Error: %v", serviceName, err))
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceRestart", "%s", fmt.Sprintf("Restarting %s service failed. Error: %v", serviceName, err))
}
return fmt.Errorf("error running %s: %s: %w", constants.UpdateCATrustCommand, stderr.String(), err)
}
} else {
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceRestart", fmt.Sprintf("Restarting %s service failed. Error: %v", serviceName, err))
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceRestart", "%s", fmt.Sprintf("Restarting %s service failed. Error: %v", serviceName, err))
}
return fmt.Errorf("could not apply update: restarting %s service failed. Error: %w", serviceName, err)
}
}
// TODO: Add a new MCN Condition to the API for service restarts?
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "ServiceRestart", "Config changes do not require reboot. Service %s was restarted.", serviceName)
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "ServiceRestart", "%s", fmt.Sprintf("Config changes do not require reboot. Service %s was restarted.", serviceName))
}
logSystem("%s service restarted successfully!", serviceName)

Expand Down Expand Up @@ -325,7 +325,7 @@ func (dn *Daemon) performPostConfigChangeAction(postConfigChangeActions []string

if err := reloadService(serviceName); err != nil {
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceReload", fmt.Sprintf("Reloading %s service failed. Error: %v", serviceName, err))
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceReload", "%s", fmt.Sprintf("Reloading %s service failed. Error: %v", serviceName, err))
}
return fmt.Errorf("could not apply update: reloading %s configuration failed. Error: %w", serviceName, err)
}
Expand Down Expand Up @@ -363,7 +363,7 @@ func (dn *Daemon) performPostConfigChangeAction(postConfigChangeActions []string

if err := restartService(serviceName); err != nil {
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceReload", fmt.Sprintf("Reloading %s service failed. Error: %v", serviceName, err))
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedServiceReload", "%s", fmt.Sprintf("Reloading %s service failed. Error: %v", serviceName, err))
}
return fmt.Errorf("could not apply update: reloading %s configuration failed. Error: %w", serviceName, err)
}
Expand Down Expand Up @@ -532,7 +532,7 @@ func (dn *CoreOSDaemon) applyOSChanges(mcDiff machineConfigDiff, oldConfig, newC
if mcDiff.osUpdate || mcDiff.extensions || mcDiff.kernelType || mcDiff.oclEnabled {
// We emitted this event before, so keep it
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "InClusterUpgrade", fmt.Sprintf("Updating from oscontainer %s", newConfig.Spec.OSImageURL))
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "InClusterUpgrade", "%s", fmt.Sprintf("Updating from oscontainer %s", newConfig.Spec.OSImageURL))
}
}

Expand All @@ -558,7 +558,7 @@ func (dn *CoreOSDaemon) applyOSChanges(mcDiff machineConfigDiff, oldConfig, newC
// informative in such cases
reason = fmt.Sprintf("Updating to a target config with %s kernel", helpers.CanonicalizeKernelType(newConfig.Spec.KernelType))
}
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "OSUpdateStarted", reason)
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "OSUpdateStarted","%s", reason)
}

if err := dn.applyLayeredOSChanges(mcDiff, oldConfig, newConfig); err != nil {
Expand Down Expand Up @@ -1007,7 +1007,7 @@ func (dn *Daemon) update(oldConfig, newConfig *mcfgv1.MachineConfig, skipCertifi
}
wrappedErr := fmt.Errorf("can't reconcile config %s with %s: %w", oldConfigName, newConfigName, reconcilableError)
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedToReconcile", wrappedErr.Error())
dn.nodeWriter.Eventf(corev1.EventTypeWarning, "FailedToReconcile", "%s", wrappedErr.Error())
}
return &unreconcilableErr{wrappedErr}
}
Expand Down Expand Up @@ -3225,7 +3225,7 @@ func (dn *Daemon) reboot(rationale string) error {

// We'll only have a recorder if we're cluster driven
if dn.nodeWriter != nil {
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "Reboot", rationale)
dn.nodeWriter.Eventf(corev1.EventTypeNormal, "Reboot", "%s", rationale)
}
logSystem("initiating reboot: %s", rationale)

Expand Down
8 changes: 4 additions & 4 deletions pkg/operator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (optr *Operator) syncVersion(co *configv1.ClusterOperator) {
Namespace: co.Namespace,
UID: co.GetUID(),
}
optr.eventRecorder.Eventf(mcoObjectRef, corev1.EventTypeNormal, "OperatorVersionChanged", fmt.Sprintf("clusteroperator/machine-config version changed from %v to %v", co.Status.Versions, optr.vStore.GetAll()))
optr.eventRecorder.Eventf(mcoObjectRef, corev1.EventTypeNormal, "OperatorVersionChanged", "%s", fmt.Sprintf("clusteroperator/machine-config version changed from %v to %v", co.Status.Versions, optr.vStore.GetAll()))
}

co.Status.Versions = optr.vStore.GetAll()
Expand Down Expand Up @@ -118,7 +118,7 @@ func (optr *Operator) syncProgressingStatus(co *configv1.ClusterOperator) {
)
if optr.vStore.Equal(co.Status.Versions) {
if optr.inClusterBringup {
optr.eventRecorder.Eventf(mcoObjectRef, corev1.EventTypeNormal, "OperatorVersionChanged", fmt.Sprintf("clusteroperator/machine-config is bootstrapping to %v", optr.vStore.GetAll()))
optr.eventRecorder.Eventf(mcoObjectRef, corev1.EventTypeNormal, "OperatorVersionChanged", "%s", fmt.Sprintf("clusteroperator/machine-config is bootstrapping to %v", optr.vStore.GetAll()))
coStatusCondition.Message = fmt.Sprintf("Cluster is bootstrapping %s", optrVersion)
coStatusCondition.Status = configv1.ConditionTrue
}
Expand All @@ -127,7 +127,7 @@ func (optr *Operator) syncProgressingStatus(co *configv1.ClusterOperator) {
// but we want to fire the event only once when we're actually setting progressing and we
// weren't progressing before.
if !cov1helpers.IsStatusConditionTrue(co.Status.Conditions, configv1.OperatorProgressing) {
optr.eventRecorder.Eventf(mcoObjectRef, corev1.EventTypeNormal, "OperatorVersionChanged", fmt.Sprintf("clusteroperator/machine-config started a version change from %v to %v", co.Status.Versions, optr.vStore.GetAll()))
optr.eventRecorder.Eventf(mcoObjectRef, corev1.EventTypeNormal, "OperatorVersionChanged", "%s", fmt.Sprintf("clusteroperator/machine-config started a version change from %v to %v", co.Status.Versions, optr.vStore.GetAll()))
}
coStatusCondition.Message = fmt.Sprintf("Working towards %s", optrVersion)
coStatusCondition.Status = configv1.ConditionTrue
Expand Down Expand Up @@ -247,7 +247,7 @@ func (optr *Operator) syncDegradedStatus(co *configv1.ClusterOperator, ierr sync
Namespace: co.Namespace,
UID: co.GetUID(),
}
optr.eventRecorder.Eventf(mcoObjectRef, corev1.EventTypeWarning, degradedReason, message)
optr.eventRecorder.Eventf(mcoObjectRef, corev1.EventTypeWarning, degradedReason, "%s", message)

}
cov1helpers.SetStatusCondition(&co.Status.Conditions, coDegradedCondition, clock.RealClock{})
Expand Down
8 changes: 2 additions & 6 deletions vendor/cyphar.com/go-pathrs/handle_linux.go

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

Loading