Skip to content

Commit 8884791

Browse files
feat: add NamespacedName
1 parent 04fcb6f commit 8884791

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

api/clusters/v1alpha1/accessrequest_types.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
corev1 "k8s.io/api/core/v1"
55
rbacv1 "k8s.io/api/rbac/v1"
66
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
7-
apimachinery "k8s.io/apimachinery/pkg/types"
87
)
98

109
type RequestPhase string
@@ -93,7 +92,12 @@ func init() {
9392
}
9493

9594
// ObjectReference is a reference to an object in any namespace.
96-
type ObjectReference apimachinery.NamespacedName
95+
type ObjectReference struct {
96+
// Name is the name of the object.
97+
Name string `json:"name"`
98+
// Namespace is the namespace of the object.
99+
Namespace string `json:"namespace"`
100+
}
97101

98102
// LocalObjectReference is a reference to an object in the same namespace as the resource referencing it.
99103
type LocalObjectReference corev1.LocalObjectReference

api/clusters/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/clusters.openmcp.cloud_accessrequests.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ spec:
5252
ClusterRef is the reference to the Cluster for which access is requested.
5353
If set, requestRef will be ignored.
5454
This value is immutable.
55+
properties:
56+
name:
57+
description: Name is the name of the object.
58+
type: string
59+
namespace:
60+
description: Namespace is the namespace of the object.
61+
type: string
62+
required:
63+
- name
64+
- namespace
5565
type: object
5666
x-kubernetes-validations:
5767
- message: clusterRef is immutable
@@ -126,6 +136,16 @@ spec:
126136
RequestRef is the reference to the ClusterRequest for whose Cluster access is requested.
127137
Is ignored if clusterRef is set.
128138
This value is immutable.
139+
properties:
140+
name:
141+
description: Name is the name of the object.
142+
type: string
143+
namespace:
144+
description: Namespace is the namespace of the object.
145+
type: string
146+
required:
147+
- name
148+
- namespace
129149
type: object
130150
x-kubernetes-validations:
131151
- message: requestRef is immutable
@@ -213,8 +233,16 @@ spec:
213233
key:
214234
description: Key is the key in the secret to use.
215235
type: string
236+
name:
237+
description: Name is the name of the object.
238+
type: string
239+
namespace:
240+
description: Namespace is the namespace of the object.
241+
type: string
216242
required:
217243
- key
244+
- name
245+
- namespace
218246
type: object
219247
required:
220248
- phase

0 commit comments

Comments
 (0)