-
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
sharded-test-server: support standalone vw server #1800
sharded-test-server: support standalone vw server #1800
Conversation
@@ -53,9 +60,9 @@ func startFrontProxy(ctx context.Context, args []string, servingCA *crypto.CA, h | |||
lineprefix.Color(color.New(color.FgHiWhite)), | |||
) | |||
|
|||
if err := ioutil.WriteFile(filepath.Join(workDirPath, ".kcp-front-proxy/mapping.yaml"), []byte(` | |||
if err := ioutil.WriteFile(filepath.Join(workDirPath, ".kcp-front-proxy/mapping.yaml"), []byte(fmt.Sprintf(` |
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.
Since we're now print-formatting some YAML, would it be difficult to define an anonymous type here and marshal it instead?
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.
Will look into it
commandLine = append( | ||
commandLine, | ||
"--kubeconfig=.kcp-0/admin.kubeconfig", | ||
"--context=system:admin", |
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.
@s-urbaniak @csams @kylape reminder: we definitely don't want this medium term, but find a way, probably some special RBAC permission to do wildcard list/watch.
Add --context to the standalone virtual-workspaces process to allow specifying the context in the kubeconfig to use. Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
When running sharded-test-server, if you now pass --shard-run-virtual-workspaces=false, it will run virtual-workspaces in standalone mode, and configure the front proxy to map to the virtual-workspaces process for /services. Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
1555b35
to
32eab91
Compare
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
ProxyClientCert: ".kcp-front-proxy/requestheader.crt", | ||
ProxyClientKey: ".kcp-front-proxy/requestheader.key", | ||
}, | ||
} |
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.
for follow-up: we should really turn this mapping file into flags. The file promises flexibility that is not there.
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.
Is there an issue for that?
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.
Now there is: #1857
|
||
func startVirtual(ctx context.Context, index int, logDirPath string) (<-chan error, error) { | ||
logger := klog.FromContext(ctx) | ||
logger.Info("starting virtual-workspaces standalone server", "index", index) |
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.
nit: not sure we do that elsewhere, but maybe print the command line with all parameters instead?
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.
/lgtm |
[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 |
Summary
When running sharded-test-server, if you now pass --shard-run-virtual-workspaces=false, it will run virtual-workspaces in
standalone mode, and configure the front proxy to map to the virtual-workspaces process for /services.
Note, this does not currently wire anything into CI/e2e tests. Figured we'd want to discuss where to plumb this in.
Related issue(s)
Fixes #1702