Skip to content

Commit d1da99a

Browse files
committed
add provisionedWorkspace field to kubeconfig status
On-behalf-of: @SAP [email protected]
1 parent 27cbe81 commit d1da99a

File tree

10 files changed

+90
-6
lines changed

10 files changed

+90
-6
lines changed

config/crd/bases/operator.kcp.io_kubeconfigs.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,13 @@ spec:
369369
status:
370370
description: KubeconfigStatus defines the observed state of Kubeconfig
371371
properties:
372+
authorization:
373+
properties:
374+
provisionedWorkspace:
375+
type: string
376+
required:
377+
- provisionedWorkspace
378+
type: object
372379
conditions:
373380
items:
374381
description: Condition contains details for one aspect of the current

internal/resources/kubeconfig/certificate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package kubeconfig
1919
import (
2020
certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1"
2121
certmanagermetav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1"
22+
2223
"k8s.io/apimachinery/pkg/util/sets"
2324

2425
"github.com/kcp-dev/kcp-operator/internal/reconciling"

sdk/apis/operator/v1alpha1/kubeconfig_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,17 @@ type KubeconfigStatus struct {
7878
// TargetName represents the name of the target resource (RootShard, Shard, or FrontProxy).
7979
TargetName string `json:"targetName,omitempty"`
8080

81+
Authorization *KubeconfigAuthorizationStatus `json:"authorization,omitempty"`
82+
8183
// +listType=map
8284
// +listMapKey=type
8385
Conditions []metav1.Condition `json:"conditions,omitempty"`
8486
}
8587

88+
type KubeconfigAuthorizationStatus struct {
89+
ProvisionedWorkspace string `json:"provisionedWorkspace"`
90+
}
91+
8692
// +genclient
8793
// +kubebuilder:object:root=true
8894
// +kubebuilder:subresource:status

sdk/apis/operator/v1alpha1/zz_generated.deepcopy.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/applyconfiguration/operator/v1alpha1/kubeconfigauthorizationstatus.go

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/applyconfiguration/operator/v1alpha1/kubeconfigstatus.go

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/applyconfiguration/utils.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/e2e/frontproxies/frontproxies_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"time"
2626

2727
"github.com/go-logr/logr"
28+
"github.com/kcp-dev/logicalcluster/v3"
2829

2930
corev1 "k8s.io/api/core/v1"
3031
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -33,7 +34,6 @@ import (
3334

3435
operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1"
3536
"github.com/kcp-dev/kcp-operator/test/utils"
36-
"github.com/kcp-dev/logicalcluster/v3"
3737
)
3838

3939
func TestCreateFrontProxy(t *testing.T) {

test/e2e/kubeconfig-rbac/frontproxies_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525
"time"
2626

2727
"github.com/go-logr/logr"
28-
2928
kcptenancyv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/tenancy/v1alpha1"
3029
"github.com/kcp-dev/logicalcluster/v3"
30+
3131
corev1 "k8s.io/api/core/v1"
3232
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3333
"k8s.io/apimachinery/pkg/types"

test/e2e/rootshards/rootshards_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"time"
2525

2626
"github.com/go-logr/logr"
27+
"github.com/kcp-dev/logicalcluster/v3"
2728

2829
corev1 "k8s.io/api/core/v1"
2930
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -32,7 +33,6 @@ import (
3233

3334
operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1"
3435
"github.com/kcp-dev/kcp-operator/test/utils"
35-
"github.com/kcp-dev/logicalcluster/v3"
3636
)
3737

3838
func TestCreateRootShard(t *testing.T) {

0 commit comments

Comments
 (0)