Skip to content

Commit

Permalink
Merge pull request #37 from Madhu-1/fix-console-update
Browse files Browse the repository at this point in the history
preserve the resourceVersion of the consolePlugin
  • Loading branch information
Madhu-1 authored Oct 31, 2023
2 parents 261ebf3 + 502f8e3 commit ffea2d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions controllers/clusterversion_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,10 @@ func (c *ClusterVersionReconciler) ensureConsolePlugin() error {

consolePlugin := console.GetConsolePlugin(c.ConsolePort, c.OperatorNamespace)
err = c.createOrUpdate(consolePlugin, func() error {
// preserve the resourceVersion of the consolePlugin
resourceVersion := consolePlugin.ResourceVersion
console.GetConsolePlugin(c.ConsolePort, c.OperatorNamespace).DeepCopyInto(consolePlugin)
consolePlugin.ResourceVersion = resourceVersion
return nil
})

Expand Down
4 changes: 2 additions & 2 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

"github.com/red-hat-storage/ocs-client-operator/api/v1alpha1"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/ginkgo" //nolint:revive // ginkgo initialization
. "github.com/onsi/gomega" //nolint:revive // gomega initialization
"k8s.io/client-go/kubernetes/scheme"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/envtest"
Expand Down

0 comments on commit ffea2d7

Please sign in to comment.