Skip to content

Commit

Permalink
Update relationship labels on missed ConfigMap
Browse files Browse the repository at this point in the history
This one was missed in kubevirt#2018, we want to maintain its label values on update as well.

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
  • Loading branch information
akalenyu committed Jan 5, 2022
1 parent abb0c7f commit 7a16ffa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/cdi-controller/leaderelection.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

const (
configMapName = "cdi-controller-leader-election-helper"
configMapName = common.CDIControllerLeaderElectionHelperName
componentName = "cdi-controller"
)

Expand Down
3 changes: 3 additions & 0 deletions pkg/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ const (

// UnusualRestartCountThreshold is the number of pod restarts that we consider unusual and would like to alert about
UnusualRestartCountThreshold = 3

// CDIControllerLeaderElectionHelperName is the name of the configmap that is used as a helper for controller leader election
CDIControllerLeaderElectionHelperName = "cdi-controller-leader-election-helper"
)

// ProxyPaths are all supported paths
Expand Down
6 changes: 6 additions & 0 deletions pkg/operator/controller/cruft.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ func reconcileRemainingRelationshipLabels(args *callbacks.ReconcileCallbackArgs)
Namespace: namespace,
},
},
&corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: common.CDIControllerLeaderElectionHelperName,
Namespace: namespace,
},
},
&corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: apiserver.APISigningKeySecretName,
Expand Down

0 comments on commit 7a16ffa

Please sign in to comment.