Skip to content

Commit 82a0632

Browse files
committed
fix url
1 parent 241ce5c commit 82a0632

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

pkg/reconciler/apis/apiexport/apiexport_reconcile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (c *controller) reconcile(ctx context.Context, apiExport *apisv1alpha2.APIE
113113
*/
114114

115115
// TODO(mjudeikis): Remove this and move to batteries.
116-
if !kcpfeatures.DefaultFeatureGate.Enabled(kcpfeatures.EnableDeprecatedAPIExportVirtualWorkspacesUrls) {
116+
if kcpfeatures.DefaultFeatureGate.Enabled(kcpfeatures.EnableDeprecatedAPIExportVirtualWorkspacesUrls) {
117117
if err := c.updateVirtualWorkspaceURLs(ctx, apiExport); err != nil {
118118
conditions.MarkFalse(
119119
apiExport,

pkg/reconciler/tenancy/workspacetype/workspacetype_controller_reconcile.go

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"k8s.io/klog/v2"
2727

2828
virtualworkspacesoptions "github.com/kcp-dev/kcp/cmd/virtual-workspaces/options"
29+
kcpfeatures "github.com/kcp-dev/kcp/pkg/features"
2930
"github.com/kcp-dev/kcp/pkg/virtual/initializingworkspaces"
3031
"github.com/kcp-dev/kcp/sdk/apis/tenancy/initialization"
3132
tenancyv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/tenancy/v1alpha1"
@@ -34,22 +35,23 @@ import (
3435
)
3536

3637
func (c *controller) reconcile(ctx context.Context, wt *tenancyv1alpha1.WorkspaceType) {
37-
if err := c.updateVirtualWorkspaceURLs(ctx, wt); err != nil {
38-
conditions.MarkFalse(
39-
wt,
40-
tenancyv1alpha1.WorkspaceTypeVirtualWorkspaceURLsReady,
41-
tenancyv1alpha1.ErrorGeneratingURLsReason,
42-
conditionsv1alpha1.ConditionSeverityError,
43-
"%v",
44-
err,
45-
)
46-
} else {
47-
conditions.MarkTrue(
48-
wt,
49-
tenancyv1alpha1.WorkspaceTypeVirtualWorkspaceURLsReady,
50-
)
38+
if kcpfeatures.DefaultFeatureGate.Enabled(kcpfeatures.EnableDeprecatedAPIExportVirtualWorkspacesUrls) {
39+
if err := c.updateVirtualWorkspaceURLs(ctx, wt); err != nil {
40+
conditions.MarkFalse(
41+
wt,
42+
tenancyv1alpha1.WorkspaceTypeVirtualWorkspaceURLsReady,
43+
tenancyv1alpha1.ErrorGeneratingURLsReason,
44+
conditionsv1alpha1.ConditionSeverityError,
45+
"%v",
46+
err,
47+
)
48+
} else {
49+
conditions.MarkTrue(
50+
wt,
51+
tenancyv1alpha1.WorkspaceTypeVirtualWorkspaceURLsReady,
52+
)
53+
}
5154
}
52-
5355
conditions.SetSummary(wt)
5456
}
5557

0 commit comments

Comments
 (0)