Skip to content

Commit

Permalink
Replace StatefulSet to PetSet (#1177)
Browse files Browse the repository at this point in the history
Signed-off-by: ashraful <ashraf@appscode.com>
  • Loading branch information
AshrafulHaqueToni authored Mar 15, 2024
1 parent e156d7a commit 4a4c398
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions apis/kubedb/v1alpha2/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ const (
DatabasePodMaster = "Master"
DatabasePodAggregator = "Aggregator"
DatabasePodLeaf = "Leaf"
StatefulSetTypeAggregator = "aggregator"
StatefulSetTypeLeaf = "leaf"
PetSetTypeAggregator = "aggregator"
PetSetTypeLeaf = "leaf"
SinglestoreDatabaseHealth = "singlestore_health"
SinglestoreTableHealth = "singlestore_health_table"

Expand Down
16 changes: 8 additions & 8 deletions apis/kubedb/v1alpha2/singlestore_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,20 @@ func (s *Singlestore) PVCName(alias string) string {
// return s.OffshootName()
}

func (s *Singlestore) AggregatorStatefulSet() string {
sts := s.OffshootName()
func (s *Singlestore) AggregatorPetSet() string {
ps := s.OffshootName()
if s.Spec.Topology.Aggregator.Suffix != "" {
sts = metautil.NameWithSuffix(sts, s.Spec.Topology.Aggregator.Suffix)
ps = metautil.NameWithSuffix(ps, s.Spec.Topology.Aggregator.Suffix)
}
return metautil.NameWithSuffix(sts, StatefulSetTypeAggregator)
return metautil.NameWithSuffix(ps, PetSetTypeAggregator)
}

func (s *Singlestore) LeafStatefulSet() string {
sts := s.OffshootName()
func (s *Singlestore) LeafPetSet() string {
ps := s.OffshootName()
if s.Spec.Topology.Leaf.Suffix != "" {
sts = metautil.NameWithSuffix(sts, s.Spec.Topology.Leaf.Suffix)
ps = metautil.NameWithSuffix(ps, s.Spec.Topology.Leaf.Suffix)
}
return metautil.NameWithSuffix(sts, StatefulSetTypeLeaf)
return metautil.NameWithSuffix(ps, PetSetTypeLeaf)
}

func (s *Singlestore) PodLabels(extraLabels ...map[string]string) map[string]string {
Expand Down

0 comments on commit 4a4c398

Please sign in to comment.