You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// RelatedResourceSpec describes a single related resource, which might point to
199
+
// any number of actual Kubernetes objects.
200
+
//
201
+
// (in the following rule, group is optional becaue core/v1 is represented by group="")
202
+
// +kubebuilder:validation:XValidation:rule="has(self.kind) != (has(self.version) || has(self.resource))",message="must specify either kind (deprecated) or group, version, resource"
203
+
// +kubebuilder:validation:XValidation:rule="has(self.resource) == has(self.version)",message="resource and version must be configured together or not at all"
204
+
// +kubebuilder:validation:XValidation:rule="!has(self.group) || (has(self.resource) && has(self.version))",message="configuring a group also requires a version and resource"
205
+
// group is included here because when an identityHash is used, core/v1 cannot possible be targetted
206
+
// +kubebuilder:validation:XValidation:rule="!has(self.identityHash) || (has(self.group) && has(self.version) && has(self.resource))",message="identity hashes can only be used with GVRs"
198
207
typeRelatedResourceSpecstruct {
199
208
// Identifier is a unique name for this related resource. The name must be unique within one
200
209
// PublishedResource and is the key by which consumers (end users) can identify and consume the
@@ -220,6 +229,8 @@ type RelatedResourceSpec struct {
220
229
//
221
230
// Deprecated: Use "Resource" instead. This field is limited to "ConfigMap" and "Secret" and will
222
231
// be removed in the future. Kind and Resource cannot be specified at the same time.
232
+
//
233
+
// +kubebuilder:validation:Enum=ConfigMap;Secret
223
234
Kindstring`json:"kind,omitempty"`
224
235
225
236
// IdentityHash is the identity hash of a kcp APIExport, in case the given Kind is
0 commit comments