-
Notifications
You must be signed in to change notification settings - Fork 398
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
🐛 clusterworkspaceshard: fix admission and shard creation for multi-shard setups #2360
🐛 clusterworkspaceshard: fix admission and shard creation for multi-shard setups #2360
Conversation
e1f6ea6
to
03bcc6f
Compare
pkg/server/server.go
Outdated
@@ -186,6 +183,9 @@ func (s *Server) Run(ctx context.Context) error { | |||
|
|||
if s.Options.Extra.ShardName == tenancyv1alpha1.RootShard { | |||
logger.Info("bootstrapping root workspace phase 0") | |||
|
|||
s.RootShardKcpClusterClient = s.KcpClusterClient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems this is not needed as we assign in the config.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
shard := &tenancyv1alpha1.ClusterWorkspaceShard{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: s.Options.Extra.ShardName, | ||
Annotations: map[string]string{logicalcluster.AnnotationKey: tenancyv1alpha1.RootCluster.String()}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not s.Options.Extra.ShardName
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this is just for logging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the future we will put a shard name as an annotation
03bcc6f
to
06620e0
Compare
06620e0
to
11aaa31
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Admission is not the right place to default the shard.status URLs values as it is run on the server side and the server side is always the root shard. This PR moves it into the server initialization "client-side".