Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions api/core/v2alpha1/managedcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import (
commonapi "github.com/openmcp-project/openmcp-operator/api/common"
)

type ManagedControlPlaneSpec struct {
// IAM contains the access management configuration for the ManagedControlPlane.
type ManagedControlPlaneV2Spec struct {
// IAM contains the access management configuration for the ManagedControlPlaneV2.
IAM IAMConfig `json:"iam"`
}

type ManagedControlPlaneStatus struct {
type ManagedControlPlaneV2Status struct {
commonapi.Status `json:",inline"`

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

// OIDCProviders is a list of OIDC providers that should be configured for the ManagedControlPlane.
// OIDCProviders is a list of OIDC providers that should be configured for the ManagedControlPlaneV2.
// They are independent of the standard OIDC provider and in addition to it, unless it has been disabled by not specifying any role bindings.
// +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"
// +optional
Expand All @@ -37,26 +37,26 @@ type IAMConfig struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=mcp
// +kubebuilder:resource:shortName=mcpv2
// +kubebuilder:metadata:labels="openmcp.cloud/cluster=onboarding"
// +kubebuilder:selectablefield:JSONPath=".status.phase"
// +kubebuilder:printcolumn:JSONPath=".status.phase",name="Phase",type=string

type ManagedControlPlane struct {
type ManagedControlPlaneV2 struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ManagedControlPlaneSpec `json:"spec,omitempty"`
Status ManagedControlPlaneStatus `json:"status,omitempty"`
Spec ManagedControlPlaneV2Spec `json:"spec,omitempty"`
Status ManagedControlPlaneV2Status `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

type ManagedControlPlaneList struct {
type ManagedControlPlaneV2List struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ManagedControlPlane `json:"items"`
Items []ManagedControlPlaneV2 `json:"items"`
}

func init() {
SchemeBuilder.Register(&ManagedControlPlane{}, &ManagedControlPlaneList{})
SchemeBuilder.Register(&ManagedControlPlaneV2{}, &ManagedControlPlaneV2List{})
}
38 changes: 19 additions & 19 deletions api/core/v2alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ metadata:
controller-gen.kubebuilder.io/version: v0.18.0
labels:
openmcp.cloud/cluster: onboarding
name: managedcontrolplanes.core.openmcp.cloud
name: managedcontrolplanev2s.core.openmcp.cloud
spec:
group: core.openmcp.cloud
names:
kind: ManagedControlPlane
listKind: ManagedControlPlaneList
plural: managedcontrolplanes
kind: ManagedControlPlaneV2
listKind: ManagedControlPlaneV2List
plural: managedcontrolplanev2s
shortNames:
- mcp
singular: managedcontrolplane
- mcpv2
singular: managedcontrolplanev2
scope: Namespaced
versions:
- additionalPrinterColumns:
Expand Down Expand Up @@ -47,11 +47,11 @@ spec:
properties:
iam:
description: IAM contains the access management configuration for
the ManagedControlPlane.
the ManagedControlPlaneV2.
properties:
oidcProviders:
description: |-
OIDCProviders is a list of OIDC providers that should be configured for the ManagedControlPlane.
OIDCProviders is a list of OIDC providers that should be configured for the ManagedControlPlaneV2.
They are independent of the standard OIDC provider and in addition to it, unless it has been disabled by not specifying any role bindings.
items:
properties:
Expand Down Expand Up @@ -303,7 +303,7 @@ spec:
x-kubernetes-map-type: atomic
description: |-
Access is a mapping from OIDC provider names to secret references.
Each referenced secret is expected to contain a 'kubeconfig' key with the kubeconfig that was generated for the respective OIDC provider for the ManagedControlPlane.
Each referenced secret is expected to contain a 'kubeconfig' key with the kubeconfig that was generated for the respective OIDC provider for the ManagedControlPlaneV2.
The default OIDC provider, if configured, uses the name "default" in this mapping.
The "default" key is also used if the ClusterProvider does not support OIDC-based access and created a serviceaccount with a token instead.
type: object
Expand Down