Skip to content

Commit

Permalink
added debug logs
Browse files Browse the repository at this point in the history
Signed-off-by: Min Min <[email protected]>
  • Loading branch information
jamsman94 committed Jan 24, 2025
1 parent fac12d7 commit ec56505
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/microservice/aslan/core/multicluster/service/clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package service

import (
"context"
"encoding/json"
"fmt"
"net/http"
"reflect"
Expand Down Expand Up @@ -1602,6 +1603,10 @@ func GetClusterIRSAInfo(clusterID string, logger *zap.SugaredLogger) (*GetCluste
}

func stsHasImmutableFieldChanged(existing, desired *appsv1.StatefulSet) bool {
a, _ := json.Marshal(existing)
log.Infof("existing: \n %s \n ========================", string(a))
b, _ := json.Marshal(desired)
log.Infof("existing: \n %s \n ========================", string(b))
// Example check for `volumeClaimTemplates`
return !reflect.DeepEqual(existing.Spec.VolumeClaimTemplates, desired.Spec.VolumeClaimTemplates) || !reflect.DeepEqual(existing.Spec.ServiceName, desired.Spec.ServiceName) || !reflect.DeepEqual(existing.Spec.Selector, desired.Spec.Selector)
}
Expand Down

0 comments on commit ec56505

Please sign in to comment.