Skip to content

Commit 903c078

Browse files
authored
Merge pull request #1184 from gianlucam76/referenced-resource-template
Update CRD descriptions
2 parents 445199b + 5a3ef2b commit 903c078

5 files changed

Lines changed: 61 additions & 136 deletions

File tree

api/v1beta1/spec.go

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,12 @@ type ValueFrom struct {
125125
// For ClusterProfile namespace can be left empty. In such a case, namespace will
126126
// be implicit set to cluster's namespace.
127127
// For Profile namespace must be left empty. The Profile namespace will be used.
128+
// Namespace can be expressed as a template and instantiate using any cluster field.
128129
// +optional
129130
Namespace string `json:"namespace,omitempty"`
130131

131132
// Name of the referenced resource.
132-
// Name can be expressed as a template and instantiate using
133-
// - cluster namespace: .Cluster.metadata.namespace
134-
// - cluster name: .Cluster.metadata.name
135-
// - cluster type: .Cluster.kind
133+
// Name can be expressed as a template and instantiate using any cluster field.
136134
// +kubebuilder:validation:MinLength=1
137135
Name string `json:"name"`
138136

@@ -464,13 +462,11 @@ type KustomizationRef struct {
464462
// For ClusterProfile namespace can be left empty. In such a case, namespace will
465463
// be implicit set to cluster's namespace.
466464
// For Profile namespace must be left empty. The Profile namespace will be used.
465+
// Namespace can be expressed as a template and instantiate using any cluster field.
467466
Namespace string `json:"namespace"`
468467

469468
// Name of the referenced resource.
470-
// Name can be expressed as a template and instantiate using
471-
// - cluster namespace: .Cluster.metadata.namespace
472-
// - cluster name: .Cluster.metadata.name
473-
// - cluster type: .Cluster.kind
469+
// Name can be expressed as a template and instantiate using any cluster field.
474470
// +kubebuilder:validation:MinLength=1
475471
Name string `json:"name"`
476472

@@ -557,10 +553,7 @@ type TemplateResourceRef struct {
557553
// cluster to fetch and use during template instantiation.
558554
// For ClusterProfile namespace can be left empty. In such a case, namespace will
559555
// be implicit set to cluster's namespace.
560-
// Name and namespace can be expressed as a template and instantiate using
561-
// - cluster namespace: .Cluster.metadata.namespace
562-
// - cluster name: .Cluster.metadata.name
563-
// - cluster type: .Cluster.kind
556+
// Name and namespace can be expressed as a template and instantiate using any cluster field.
564557
Resource corev1.ObjectReference `json:"resource"`
565558

566559
// Identifier is how the resource will be referred to in the
@@ -573,14 +566,12 @@ type PolicyRef struct {
573566
// For ClusterProfile namespace can be left empty. In such a case, namespace will
574567
// be implicit set to cluster's namespace.
575568
// For Profile namespace must be left empty. Profile namespace will be used.
569+
// Namespace can be expressed as a template and instantiate using any cluster field.
576570
// +optional
577571
Namespace string `json:"namespace,omitempty"`
578572

579573
// Name of the referenced resource.
580-
// Name can be expressed as a template and instantiate using
581-
// - cluster namespace: .Cluster.metadata.namespace
582-
// - cluster name: .Cluster.metadata.name
583-
// - cluster type: .Cluster.kind
574+
// Name can be expressed as a template and instantiate using any cluster field.
584575
// +kubebuilder:validation:MinLength=1
585576
Name string `json:"name"`
586577

config/crd/bases/config.projectsveltos.io_clusterprofiles.yaml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,7 @@ spec:
573573
name:
574574
description: |-
575575
Name of the referenced resource.
576-
Name can be expressed as a template and instantiate using
577-
- cluster namespace: .Cluster.metadata.namespace
578-
- cluster name: .Cluster.metadata.name
579-
- cluster type: .Cluster.kind
576+
Name can be expressed as a template and instantiate using any cluster field.
580577
minLength: 1
581578
type: string
582579
namespace:
@@ -585,6 +582,7 @@ spec:
585582
For ClusterProfile namespace can be left empty. In such a case, namespace will
586583
be implicit set to cluster's namespace.
587584
For Profile namespace must be left empty. The Profile namespace will be used.
585+
Namespace can be expressed as a template and instantiate using any cluster field.
588586
type: string
589587
required:
590588
- kind
@@ -647,10 +645,7 @@ spec:
647645
name:
648646
description: |-
649647
Name of the referenced resource.
650-
Name can be expressed as a template and instantiate using
651-
- cluster namespace: .Cluster.metadata.namespace
652-
- cluster name: .Cluster.metadata.name
653-
- cluster type: .Cluster.kind
648+
Name can be expressed as a template and instantiate using any cluster field.
654649
minLength: 1
655650
type: string
656651
namespace:
@@ -659,6 +654,7 @@ spec:
659654
For ClusterProfile namespace can be left empty. In such a case, namespace will
660655
be implicit set to cluster's namespace.
661656
For Profile namespace must be left empty. The Profile namespace will be used.
657+
Namespace can be expressed as a template and instantiate using any cluster field.
662658
type: string
663659
path:
664660
description: |-
@@ -725,10 +721,7 @@ spec:
725721
name:
726722
description: |-
727723
Name of the referenced resource.
728-
Name can be expressed as a template and instantiate using
729-
- cluster namespace: .Cluster.metadata.namespace
730-
- cluster name: .Cluster.metadata.name
731-
- cluster type: .Cluster.kind
724+
Name can be expressed as a template and instantiate using any cluster field.
732725
minLength: 1
733726
type: string
734727
namespace:
@@ -737,6 +730,7 @@ spec:
737730
For ClusterProfile namespace can be left empty. In such a case, namespace will
738731
be implicit set to cluster's namespace.
739732
For Profile namespace must be left empty. The Profile namespace will be used.
733+
Namespace can be expressed as a template and instantiate using any cluster field.
740734
type: string
741735
required:
742736
- kind
@@ -867,10 +861,7 @@ spec:
867861
name:
868862
description: |-
869863
Name of the referenced resource.
870-
Name can be expressed as a template and instantiate using
871-
- cluster namespace: .Cluster.metadata.namespace
872-
- cluster name: .Cluster.metadata.name
873-
- cluster type: .Cluster.kind
864+
Name can be expressed as a template and instantiate using any cluster field.
874865
minLength: 1
875866
type: string
876867
namespace:
@@ -879,6 +870,7 @@ spec:
879870
For ClusterProfile namespace can be left empty. In such a case, namespace will
880871
be implicit set to cluster's namespace.
881872
For Profile namespace must be left empty. Profile namespace will be used.
873+
Namespace can be expressed as a template and instantiate using any cluster field.
882874
type: string
883875
path:
884876
description: |-
@@ -959,10 +951,7 @@ spec:
959951
cluster to fetch and use during template instantiation.
960952
For ClusterProfile namespace can be left empty. In such a case, namespace will
961953
be implicit set to cluster's namespace.
962-
Name and namespace can be expressed as a template and instantiate using
963-
- cluster namespace: .Cluster.metadata.namespace
964-
- cluster name: .Cluster.metadata.name
965-
- cluster type: .Cluster.kind
954+
Name and namespace can be expressed as a template and instantiate using any cluster field.
966955
properties:
967956
apiVersion:
968957
description: API version of the referent.

config/crd/bases/config.projectsveltos.io_clustersummaries.yaml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -611,10 +611,7 @@ spec:
611611
name:
612612
description: |-
613613
Name of the referenced resource.
614-
Name can be expressed as a template and instantiate using
615-
- cluster namespace: .Cluster.metadata.namespace
616-
- cluster name: .Cluster.metadata.name
617-
- cluster type: .Cluster.kind
614+
Name can be expressed as a template and instantiate using any cluster field.
618615
minLength: 1
619616
type: string
620617
namespace:
@@ -623,6 +620,7 @@ spec:
623620
For ClusterProfile namespace can be left empty. In such a case, namespace will
624621
be implicit set to cluster's namespace.
625622
For Profile namespace must be left empty. The Profile namespace will be used.
623+
Namespace can be expressed as a template and instantiate using any cluster field.
626624
type: string
627625
required:
628626
- kind
@@ -685,10 +683,7 @@ spec:
685683
name:
686684
description: |-
687685
Name of the referenced resource.
688-
Name can be expressed as a template and instantiate using
689-
- cluster namespace: .Cluster.metadata.namespace
690-
- cluster name: .Cluster.metadata.name
691-
- cluster type: .Cluster.kind
686+
Name can be expressed as a template and instantiate using any cluster field.
692687
minLength: 1
693688
type: string
694689
namespace:
@@ -697,6 +692,7 @@ spec:
697692
For ClusterProfile namespace can be left empty. In such a case, namespace will
698693
be implicit set to cluster's namespace.
699694
For Profile namespace must be left empty. The Profile namespace will be used.
695+
Namespace can be expressed as a template and instantiate using any cluster field.
700696
type: string
701697
path:
702698
description: |-
@@ -763,10 +759,7 @@ spec:
763759
name:
764760
description: |-
765761
Name of the referenced resource.
766-
Name can be expressed as a template and instantiate using
767-
- cluster namespace: .Cluster.metadata.namespace
768-
- cluster name: .Cluster.metadata.name
769-
- cluster type: .Cluster.kind
762+
Name can be expressed as a template and instantiate using any cluster field.
770763
minLength: 1
771764
type: string
772765
namespace:
@@ -775,6 +768,7 @@ spec:
775768
For ClusterProfile namespace can be left empty. In such a case, namespace will
776769
be implicit set to cluster's namespace.
777770
For Profile namespace must be left empty. The Profile namespace will be used.
771+
Namespace can be expressed as a template and instantiate using any cluster field.
778772
type: string
779773
required:
780774
- kind
@@ -905,10 +899,7 @@ spec:
905899
name:
906900
description: |-
907901
Name of the referenced resource.
908-
Name can be expressed as a template and instantiate using
909-
- cluster namespace: .Cluster.metadata.namespace
910-
- cluster name: .Cluster.metadata.name
911-
- cluster type: .Cluster.kind
902+
Name can be expressed as a template and instantiate using any cluster field.
912903
minLength: 1
913904
type: string
914905
namespace:
@@ -917,6 +908,7 @@ spec:
917908
For ClusterProfile namespace can be left empty. In such a case, namespace will
918909
be implicit set to cluster's namespace.
919910
For Profile namespace must be left empty. Profile namespace will be used.
911+
Namespace can be expressed as a template and instantiate using any cluster field.
920912
type: string
921913
path:
922914
description: |-
@@ -997,10 +989,7 @@ spec:
997989
cluster to fetch and use during template instantiation.
998990
For ClusterProfile namespace can be left empty. In such a case, namespace will
999991
be implicit set to cluster's namespace.
1000-
Name and namespace can be expressed as a template and instantiate using
1001-
- cluster namespace: .Cluster.metadata.namespace
1002-
- cluster name: .Cluster.metadata.name
1003-
- cluster type: .Cluster.kind
992+
Name and namespace can be expressed as a template and instantiate using any cluster field.
1004993
properties:
1005994
apiVersion:
1006995
description: API version of the referent.

config/crd/bases/config.projectsveltos.io_profiles.yaml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,7 @@ spec:
573573
name:
574574
description: |-
575575
Name of the referenced resource.
576-
Name can be expressed as a template and instantiate using
577-
- cluster namespace: .Cluster.metadata.namespace
578-
- cluster name: .Cluster.metadata.name
579-
- cluster type: .Cluster.kind
576+
Name can be expressed as a template and instantiate using any cluster field.
580577
minLength: 1
581578
type: string
582579
namespace:
@@ -585,6 +582,7 @@ spec:
585582
For ClusterProfile namespace can be left empty. In such a case, namespace will
586583
be implicit set to cluster's namespace.
587584
For Profile namespace must be left empty. The Profile namespace will be used.
585+
Namespace can be expressed as a template and instantiate using any cluster field.
588586
type: string
589587
required:
590588
- kind
@@ -647,10 +645,7 @@ spec:
647645
name:
648646
description: |-
649647
Name of the referenced resource.
650-
Name can be expressed as a template and instantiate using
651-
- cluster namespace: .Cluster.metadata.namespace
652-
- cluster name: .Cluster.metadata.name
653-
- cluster type: .Cluster.kind
648+
Name can be expressed as a template and instantiate using any cluster field.
654649
minLength: 1
655650
type: string
656651
namespace:
@@ -659,6 +654,7 @@ spec:
659654
For ClusterProfile namespace can be left empty. In such a case, namespace will
660655
be implicit set to cluster's namespace.
661656
For Profile namespace must be left empty. The Profile namespace will be used.
657+
Namespace can be expressed as a template and instantiate using any cluster field.
662658
type: string
663659
path:
664660
description: |-
@@ -725,10 +721,7 @@ spec:
725721
name:
726722
description: |-
727723
Name of the referenced resource.
728-
Name can be expressed as a template and instantiate using
729-
- cluster namespace: .Cluster.metadata.namespace
730-
- cluster name: .Cluster.metadata.name
731-
- cluster type: .Cluster.kind
724+
Name can be expressed as a template and instantiate using any cluster field.
732725
minLength: 1
733726
type: string
734727
namespace:
@@ -737,6 +730,7 @@ spec:
737730
For ClusterProfile namespace can be left empty. In such a case, namespace will
738731
be implicit set to cluster's namespace.
739732
For Profile namespace must be left empty. The Profile namespace will be used.
733+
Namespace can be expressed as a template and instantiate using any cluster field.
740734
type: string
741735
required:
742736
- kind
@@ -867,10 +861,7 @@ spec:
867861
name:
868862
description: |-
869863
Name of the referenced resource.
870-
Name can be expressed as a template and instantiate using
871-
- cluster namespace: .Cluster.metadata.namespace
872-
- cluster name: .Cluster.metadata.name
873-
- cluster type: .Cluster.kind
864+
Name can be expressed as a template and instantiate using any cluster field.
874865
minLength: 1
875866
type: string
876867
namespace:
@@ -879,6 +870,7 @@ spec:
879870
For ClusterProfile namespace can be left empty. In such a case, namespace will
880871
be implicit set to cluster's namespace.
881872
For Profile namespace must be left empty. Profile namespace will be used.
873+
Namespace can be expressed as a template and instantiate using any cluster field.
882874
type: string
883875
path:
884876
description: |-
@@ -959,10 +951,7 @@ spec:
959951
cluster to fetch and use during template instantiation.
960952
For ClusterProfile namespace can be left empty. In such a case, namespace will
961953
be implicit set to cluster's namespace.
962-
Name and namespace can be expressed as a template and instantiate using
963-
- cluster namespace: .Cluster.metadata.namespace
964-
- cluster name: .Cluster.metadata.name
965-
- cluster type: .Cluster.kind
954+
Name and namespace can be expressed as a template and instantiate using any cluster field.
966955
properties:
967956
apiVersion:
968957
description: API version of the referent.

0 commit comments

Comments
 (0)