From 5a3ef2bee3e021c47fe4f0e50d437385a9c69862 Mon Sep 17 00:00:00 2001 From: Gianluca Mardente Date: Wed, 7 May 2025 08:41:50 +0200 Subject: [PATCH] Update CRD descriptions Referenced resource namespace/name can be expressed as template and instantiated using any cluster field. This PR updates the descriptions of those field accordingly. --- api/v1beta1/spec.go | 23 ++--- ...fig.projectsveltos.io_clusterprofiles.yaml | 29 ++----- ...ig.projectsveltos.io_clustersummaries.yaml | 29 ++----- .../config.projectsveltos.io_profiles.yaml | 29 ++----- manifest/manifest.yaml | 87 ++++++------------- 5 files changed, 61 insertions(+), 136 deletions(-) diff --git a/api/v1beta1/spec.go b/api/v1beta1/spec.go index a318420b..841f3ecc 100644 --- a/api/v1beta1/spec.go +++ b/api/v1beta1/spec.go @@ -125,14 +125,12 @@ type ValueFrom struct { // For ClusterProfile namespace can be left empty. In such a case, namespace will // be implicit set to cluster's namespace. // For Profile namespace must be left empty. The Profile namespace will be used. + // Namespace can be expressed as a template and instantiate using any cluster field. // +optional Namespace string `json:"namespace,omitempty"` // Name of the referenced resource. - // Name can be expressed as a template and instantiate using - // - cluster namespace: .Cluster.metadata.namespace - // - cluster name: .Cluster.metadata.name - // - cluster type: .Cluster.kind + // Name can be expressed as a template and instantiate using any cluster field. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` @@ -464,13 +462,11 @@ type KustomizationRef struct { // For ClusterProfile namespace can be left empty. In such a case, namespace will // be implicit set to cluster's namespace. // For Profile namespace must be left empty. The Profile namespace will be used. + // Namespace can be expressed as a template and instantiate using any cluster field. Namespace string `json:"namespace"` // Name of the referenced resource. - // Name can be expressed as a template and instantiate using - // - cluster namespace: .Cluster.metadata.namespace - // - cluster name: .Cluster.metadata.name - // - cluster type: .Cluster.kind + // Name can be expressed as a template and instantiate using any cluster field. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` @@ -557,10 +553,7 @@ type TemplateResourceRef struct { // cluster to fetch and use during template instantiation. // For ClusterProfile namespace can be left empty. In such a case, namespace will // be implicit set to cluster's namespace. - // Name and namespace can be expressed as a template and instantiate using - // - cluster namespace: .Cluster.metadata.namespace - // - cluster name: .Cluster.metadata.name - // - cluster type: .Cluster.kind + // Name and namespace can be expressed as a template and instantiate using any cluster field. Resource corev1.ObjectReference `json:"resource"` // Identifier is how the resource will be referred to in the @@ -573,14 +566,12 @@ type PolicyRef struct { // For ClusterProfile namespace can be left empty. In such a case, namespace will // be implicit set to cluster's namespace. // For Profile namespace must be left empty. Profile namespace will be used. + // Namespace can be expressed as a template and instantiate using any cluster field. // +optional Namespace string `json:"namespace,omitempty"` // Name of the referenced resource. - // Name can be expressed as a template and instantiate using - // - cluster namespace: .Cluster.metadata.namespace - // - cluster name: .Cluster.metadata.name - // - cluster type: .Cluster.kind + // Name can be expressed as a template and instantiate using any cluster field. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` diff --git a/config/crd/bases/config.projectsveltos.io_clusterprofiles.yaml b/config/crd/bases/config.projectsveltos.io_clusterprofiles.yaml index 3f498c7d..1a6d4bcf 100644 --- a/config/crd/bases/config.projectsveltos.io_clusterprofiles.yaml +++ b/config/crd/bases/config.projectsveltos.io_clusterprofiles.yaml @@ -573,10 +573,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -585,6 +582,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -647,10 +645,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -659,6 +654,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -725,10 +721,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -737,6 +730,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -867,10 +861,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -879,6 +870,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -959,10 +951,7 @@ spec: cluster to fetch and use during template instantiation. For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. - Name and namespace can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name and namespace can be expressed as a template and instantiate using any cluster field. properties: apiVersion: description: API version of the referent. diff --git a/config/crd/bases/config.projectsveltos.io_clustersummaries.yaml b/config/crd/bases/config.projectsveltos.io_clustersummaries.yaml index 4de3dfb7..fe24c3c7 100644 --- a/config/crd/bases/config.projectsveltos.io_clustersummaries.yaml +++ b/config/crd/bases/config.projectsveltos.io_clustersummaries.yaml @@ -611,10 +611,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -623,6 +620,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -685,10 +683,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -697,6 +692,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -763,10 +759,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -775,6 +768,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -905,10 +899,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -917,6 +908,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -997,10 +989,7 @@ spec: cluster to fetch and use during template instantiation. For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. - Name and namespace can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name and namespace can be expressed as a template and instantiate using any cluster field. properties: apiVersion: description: API version of the referent. diff --git a/config/crd/bases/config.projectsveltos.io_profiles.yaml b/config/crd/bases/config.projectsveltos.io_profiles.yaml index bd7be278..b11a981f 100644 --- a/config/crd/bases/config.projectsveltos.io_profiles.yaml +++ b/config/crd/bases/config.projectsveltos.io_profiles.yaml @@ -573,10 +573,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -585,6 +582,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -647,10 +645,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -659,6 +654,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -725,10 +721,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -737,6 +730,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -867,10 +861,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -879,6 +870,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -959,10 +951,7 @@ spec: cluster to fetch and use during template instantiation. For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. - Name and namespace can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name and namespace can be expressed as a template and instantiate using any cluster field. properties: apiVersion: description: API version of the referent. diff --git a/manifest/manifest.yaml b/manifest/manifest.yaml index 06a00b4b..ca69b6ed 100644 --- a/manifest/manifest.yaml +++ b/manifest/manifest.yaml @@ -968,10 +968,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -980,6 +977,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -1042,10 +1040,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -1054,6 +1049,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -1120,10 +1116,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -1132,6 +1125,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -1262,10 +1256,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -1274,6 +1265,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -1354,10 +1346,7 @@ spec: cluster to fetch and use during template instantiation. For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. - Name and namespace can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name and namespace can be expressed as a template and instantiate using any cluster field. properties: apiVersion: description: API version of the referent. @@ -2634,10 +2623,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -2646,6 +2632,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -2708,10 +2695,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -2720,6 +2704,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -2786,10 +2771,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -2798,6 +2780,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -2928,10 +2911,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -2940,6 +2920,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -3020,10 +3001,7 @@ spec: cluster to fetch and use during template instantiation. For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. - Name and namespace can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name and namespace can be expressed as a template and instantiate using any cluster field. properties: apiVersion: description: API version of the referent. @@ -3902,10 +3880,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -3914,6 +3889,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -3976,10 +3952,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -3988,6 +3961,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -4054,10 +4028,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -4066,6 +4037,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. The Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string required: - kind @@ -4196,10 +4168,7 @@ spec: name: description: |- Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name can be expressed as a template and instantiate using any cluster field. minLength: 1 type: string namespace: @@ -4208,6 +4177,7 @@ spec: For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. For Profile namespace must be left empty. Profile namespace will be used. + Namespace can be expressed as a template and instantiate using any cluster field. type: string path: description: |- @@ -4288,10 +4258,7 @@ spec: cluster to fetch and use during template instantiation. For ClusterProfile namespace can be left empty. In such a case, namespace will be implicit set to cluster's namespace. - Name and namespace can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind + Name and namespace can be expressed as a template and instantiate using any cluster field. properties: apiVersion: description: API version of the referent.