Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove seed node label #722

Merged
merged 1 commit into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions pkg/controller/scyllacluster/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ func MemberService(sc *scyllav1.ScyllaCluster, rackName, name string, oldService
labels[naming.DatacenterNameLabel] = sc.Spec.Datacenter.Name
labels[naming.RackNameLabel] = rackName

// TODO: Remove seed label in v1.5. (#704)
// We need to keep this for v1.3 compatibility, so a ScyllaCluster that is rolling out during
// the operator upgrade, has a pod that restarts or gets evicted in the meantime can become ready
// as the label is still used by v1.3 sidecar before the new cluster version rolls out.
// If Member is seed, add the appropriate label
if strings.HasSuffix(name, "-0") || strings.HasSuffix(name, "-1") {
labels[naming.SeedLabel] = ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also remove definition and other usages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

// Copy the old replace label, if present.
var replaceAddr string
var hasReplaceLabel bool
Expand Down
3 changes: 0 additions & 3 deletions pkg/naming/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ package naming
//
// See the sidecar design doc for more details.
const (
// SeedLabel determines if a member is a seed or not.
SeedLabel = "scylla/seed"

// DecommissionedLabel expresses the intent to decommission
// the specific member. The presence of the label expresses
// the intent to decommission. If the value is true, it means
Expand Down
6 changes: 0 additions & 6 deletions pkg/naming/labels.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package naming

import (
"fmt"

scyllav1 "github.com/scylladb/scylla-operator/pkg/api/scylla/v1"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/labels"
Expand Down Expand Up @@ -53,10 +51,6 @@ func RackSelector(r scyllav1.RackSpec, c *scyllav1.ScyllaCluster) labels.Selecto
return sel
}

func SelectorForSeeds(clusterName string) string {
return fmt.Sprintf("%s,%s=%s", SeedLabel, ClusterNameLabel, clusterName)
}

func recommendedLabels() map[string]string {

return map[string]string{
Expand Down