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

Fix global service incompatibility when v1.14 agents connect to a v1.13 cluster #27882

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions pkg/service/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/cilium/cilium/pkg/loadbalancer"
"github.com/cilium/cilium/pkg/lock"
"github.com/cilium/cilium/pkg/logging/logfields"
"github.com/cilium/cilium/pkg/option"
)

var (
Expand Down Expand Up @@ -124,9 +123,9 @@ func (s *ClusterService) Unmarshal(_ string, data []byte) error {
}

func (s *ClusterService) validate() error {
// Skip the ClusterID check if it matches the local one, as we assume that
// it has already been validated, and to allow it to be zero.
if s.ClusterID != option.Config.ClusterID {
// Explicitly allow the ClusterID to be zero for backward compatibility,
// as this field was not present in v1.13.
if s.ClusterID != 0 {
if err := cmtypes.ValidateClusterID(s.ClusterID); err != nil {
return err
}
Expand Down