Skip to content

Commit

Permalink
server: relax ShardVirtualWorkspace flag validation
Browse files Browse the repository at this point in the history
In kcp-dev#2407 we introduced this validation, but it doesn't handle the
case where the VW server is not standalone, but you still want to
specify --shard-virtual-workspace-url

This scenario is likely when deploying a sharded environment, since
you'll want the VW traffic to go via the front-proxy regardless
of whether the VW server is standalone or not.
  • Loading branch information
Steven Hardy committed Jan 20, 2023
1 parent 3816204 commit 5e4c0b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/server/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ func (s *Server) installAPIBinderController(ctx context.Context, config *rest.Co
config = rest.AddUserAgent(config, initialization.ControllerName)

vwURL := fmt.Sprintf("https://%s", s.GenericConfig.ExternalAddress)
if s.Options.Extra.ShardVirtualWorkspaceURL != "" {
if !s.Options.Virtual.Enabled && s.Options.Extra.ShardVirtualWorkspaceURL != "" {
if s.Options.Extra.ShardVirtualWorkspaceCAFile == "" {
// TODO move verification up
return fmt.Errorf("s.Options.Extra.ShardVirtualWorkspaceCAFile is required")
Expand Down

0 comments on commit 5e4c0b7

Please sign in to comment.