Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed Mar 4, 2024
1 parent 2884e45 commit 181c1c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions api/v1/zz_generated.deepcopy.go

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

4 changes: 3 additions & 1 deletion controllers/rack.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"

asdbv1 "github.com/aerospike/aerospike-kubernetes-operator/api/v1"
Expand Down Expand Up @@ -559,7 +560,8 @@ func (r *SingleClusterReconciler) reconcileRack(

// Safe check to delete all dangling pod services which are no longer required
// There won't be any case of dangling pod service with MultiPodPerHost false, so ignore that case
if !podServiceNeeded(r.aeroCluster.Spec.PodSpec.MultiPodPerHost, &r.aeroCluster.Spec.AerospikeNetworkPolicy) {
if ptr.Deref(r.aeroCluster.Spec.PodSpec.MultiPodPerHost, false) &&
!podServiceNeeded(r.aeroCluster.Spec.PodSpec.MultiPodPerHost, &r.aeroCluster.Spec.AerospikeNetworkPolicy) {
if err := r.cleanupDanglingPodServices(rackState); err != nil {
return reconcileError(err)
}
Expand Down

0 comments on commit 181c1c6

Please sign in to comment.