Skip to content

Commit cf60672

Browse files
committed
rename v2 MCP resource
1 parent 11901e9 commit cf60672

File tree

3 files changed

+40
-40
lines changed

3 files changed

+40
-40
lines changed

api/core/v2alpha1/managedcontrolplane_types.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import (
66
commonapi "github.com/openmcp-project/openmcp-operator/api/common"
77
)
88

9-
type ManagedControlPlaneSpec struct {
10-
// IAM contains the access management configuration for the ManagedControlPlane.
9+
type ManagedControlPlaneV2Spec struct {
10+
// IAM contains the access management configuration for the ManagedControlPlaneV2.
1111
IAM IAMConfig `json:"iam"`
1212
}
1313

14-
type ManagedControlPlaneStatus struct {
14+
type ManagedControlPlaneV2Status struct {
1515
commonapi.Status `json:",inline"`
1616

1717
// Access is a mapping from OIDC provider names to secret references.
18-
// Each referenced secret is expected to contain a 'kubeconfig' key with the kubeconfig that was generated for the respective OIDC provider for the ManagedControlPlane.
18+
// Each referenced secret is expected to contain a 'kubeconfig' key with the kubeconfig that was generated for the respective OIDC provider for the ManagedControlPlaneV2.
1919
// The default OIDC provider, if configured, uses the name "default" in this mapping.
2020
// The "default" key is also used if the ClusterProvider does not support OIDC-based access and created a serviceaccount with a token instead.
2121
Access map[string]commonapi.LocalObjectReference `json:"access"`
@@ -28,7 +28,7 @@ type IAMConfig struct {
2828
// +optional
2929
RoleBindings []commonapi.RoleBindings `json:"roleBindings,omitempty"`
3030

31-
// OIDCProviders is a list of OIDC providers that should be configured for the ManagedControlPlane.
31+
// OIDCProviders is a list of OIDC providers that should be configured for the ManagedControlPlaneV2.
3232
// They are independent of the standard OIDC provider and in addition to it, unless it has been disabled by not specifying any role bindings.
3333
// +kubebuilder:validation:items:XValidation:rule="self.name != 'default'", message="OIDC provider name must not be 'default' as this is reserved for the standard OIDC provider"
3434
// +optional
@@ -37,26 +37,26 @@ type IAMConfig struct {
3737

3838
// +kubebuilder:object:root=true
3939
// +kubebuilder:subresource:status
40-
// +kubebuilder:resource:shortName=mcp
40+
// +kubebuilder:resource:shortName=mcpv2
4141
// +kubebuilder:metadata:labels="openmcp.cloud/cluster=onboarding"
4242
// +kubebuilder:selectablefield:JSONPath=".status.phase"
4343
// +kubebuilder:printcolumn:JSONPath=".status.phase",name="Phase",type=string
4444

45-
type ManagedControlPlane struct {
45+
type ManagedControlPlaneV2 struct {
4646
metav1.TypeMeta `json:",inline"`
4747
metav1.ObjectMeta `json:"metadata,omitempty"`
48-
Spec ManagedControlPlaneSpec `json:"spec,omitempty"`
49-
Status ManagedControlPlaneStatus `json:"status,omitempty"`
48+
Spec ManagedControlPlaneV2Spec `json:"spec,omitempty"`
49+
Status ManagedControlPlaneV2Status `json:"status,omitempty"`
5050
}
5151

5252
// +kubebuilder:object:root=true
5353

54-
type ManagedControlPlaneList struct {
54+
type ManagedControlPlaneV2List struct {
5555
metav1.TypeMeta `json:",inline"`
5656
metav1.ListMeta `json:"metadata,omitempty"`
57-
Items []ManagedControlPlane `json:"items"`
57+
Items []ManagedControlPlaneV2 `json:"items"`
5858
}
5959

6060
func init() {
61-
SchemeBuilder.Register(&ManagedControlPlane{}, &ManagedControlPlaneList{})
61+
SchemeBuilder.Register(&ManagedControlPlaneV2{}, &ManagedControlPlaneV2List{})
6262
}

api/core/v2alpha1/zz_generated.deepcopy.go

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

api/crds/manifests/core.openmcp.cloud_managedcontrolplanes.yaml renamed to api/crds/manifests/core.openmcp.cloud_managedcontrolplanev2s.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ metadata:
66
controller-gen.kubebuilder.io/version: v0.18.0
77
labels:
88
openmcp.cloud/cluster: onboarding
9-
name: managedcontrolplanes.core.openmcp.cloud
9+
name: managedcontrolplanev2s.core.openmcp.cloud
1010
spec:
1111
group: core.openmcp.cloud
1212
names:
13-
kind: ManagedControlPlane
14-
listKind: ManagedControlPlaneList
15-
plural: managedcontrolplanes
13+
kind: ManagedControlPlaneV2
14+
listKind: ManagedControlPlaneV2List
15+
plural: managedcontrolplanev2s
1616
shortNames:
17-
- mcp
18-
singular: managedcontrolplane
17+
- mcpv2
18+
singular: managedcontrolplanev2
1919
scope: Namespaced
2020
versions:
2121
- additionalPrinterColumns:
@@ -47,11 +47,11 @@ spec:
4747
properties:
4848
iam:
4949
description: IAM contains the access management configuration for
50-
the ManagedControlPlane.
50+
the ManagedControlPlaneV2.
5151
properties:
5252
oidcProviders:
5353
description: |-
54-
OIDCProviders is a list of OIDC providers that should be configured for the ManagedControlPlane.
54+
OIDCProviders is a list of OIDC providers that should be configured for the ManagedControlPlaneV2.
5555
They are independent of the standard OIDC provider and in addition to it, unless it has been disabled by not specifying any role bindings.
5656
items:
5757
properties:
@@ -303,7 +303,7 @@ spec:
303303
x-kubernetes-map-type: atomic
304304
description: |-
305305
Access is a mapping from OIDC provider names to secret references.
306-
Each referenced secret is expected to contain a 'kubeconfig' key with the kubeconfig that was generated for the respective OIDC provider for the ManagedControlPlane.
306+
Each referenced secret is expected to contain a 'kubeconfig' key with the kubeconfig that was generated for the respective OIDC provider for the ManagedControlPlaneV2.
307307
The default OIDC provider, if configured, uses the name "default" in this mapping.
308308
The "default" key is also used if the ClusterProvider does not support OIDC-based access and created a serviceaccount with a token instead.
309309
type: object

0 commit comments

Comments
 (0)