Skip to content

use ClusterWorkspaceShard.VirtualWorkspaceURL #1670

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

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

p0lyn0mial
Copy link
Contributor

Summary

this PR:

  • exposes the new field as shard-virtual-workspace-url flag.
    when set points to an external URL address of a virtual workspace server
    associated with as shard.
  • updates the admission plugin so that it defaults the new field to the shard's base address.

Related issue(s)

Fixes #

@openshift-ci openshift-ci bot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Aug 3, 2022
@p0lyn0mial
Copy link
Contributor Author

requires #1669

@p0lyn0mial
Copy link
Contributor Author

/retest

@p0lyn0mial
Copy link
Contributor Author

/assign @sttts

@@ -496,6 +496,17 @@ type ClusterWorkspaceShardSpec struct {
// +kubebuilder:Required
// +required
ExternalURL string `json:"externalURL"`

// VirtualWorkspaceURL is the address of the virtual workspace server associated with this shard.
Copy link
Member

Choose a reason for hiding this comment

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

camlCase

@@ -3,6 +3,7 @@ kind: ClusterWorkspaceShard
metadata:
name: SHARD_NAME
spec:
virtualWorkspaceURL: SHARD_VIRTUAL_WORKSPACE_URL
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is backward compatible.

Copy link
Member

Choose a reason for hiding this comment

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

should be

@@ -133,6 +133,10 @@ func (o *clusterWorkspaceShard) Admit(_ context.Context, a admission.Attributes,
}
}

if cws.Spec.VirtualWorkspaceURL == "" {
cws.Spec.VirtualWorkspaceURL = cws.Spec.BaseURL
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is where a default value is applied.

@p0lyn0mial
Copy link
Contributor Author

/retest

@@ -32,6 +31,7 @@ import (

"github.com/kcp-dev/kcp/pkg/admission/helpers"
tenancyv1alpha1 "github.com/kcp-dev/kcp/pkg/apis/tenancy/v1alpha1"
"github.com/kcp-dev/logicalcluster/v2"
Copy link
Member

Choose a reason for hiding this comment

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

correct order? is openshift-imports happy?

@sttts
Copy link
Member

sttts commented Aug 4, 2022

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 4, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 4, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 4, 2022
when set points to an external URL address of a virtual workspace server
associated with as shard. Defaults to shard's base address.
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 4, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 4, 2022

New changes are detected. LGTM label has been removed.

@p0lyn0mial
Copy link
Contributor Author

import not happy, please re-tag

@p0lyn0mial p0lyn0mial added the lgtm Indicates that a PR is ready to be merged. label Aug 4, 2022
@openshift-ci openshift-ci bot merged commit a7935a2 into kcp-dev:main Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants