Skip to content

Commit

Permalink
Use pointer package to create int64 reference
Browse files Browse the repository at this point in the history
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
  • Loading branch information
amisevsk committed Dec 16, 2022
1 parent e58403d commit 65a3779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/provision/sync/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/api/equality"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
crclient "sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down Expand Up @@ -141,8 +142,7 @@ func podDiffFunc(spec, cluster crclient.Object) (delete, update bool) {
}
if specPod.Spec.TerminationGracePeriodSeconds != nil &&
specPod.Spec.TerminationGracePeriodSeconds != clusterPod.Spec.TerminationGracePeriodSeconds {
negOne := int64(-1)
if clusterPod.Spec.TerminationGracePeriodSeconds == &negOne {
if clusterPod.Spec.TerminationGracePeriodSeconds == pointer.Int64(-1) {
return false, true
} else {
return true, false
Expand Down

0 comments on commit 65a3779

Please sign in to comment.