Skip to content

Commit 969adc3

Browse files
committed
address comments
Signed-off-by: Ryan Zhang <[email protected]>
1 parent 6c54711 commit 969adc3

11 files changed

+18
-18
lines changed

apis/placement/v1beta1/binding_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const (
3737
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
3838

3939
// ClusterResourceBinding represents a scheduling decision that binds a group of resources to a cluster.
40-
// It MUST have a label named `PlacementTrackingLabel` that points to the cluster resource policy that creates it.
40+
// It MUST have a label named `CRPTrackingLabel` that points to the cluster resource policy that creates it.
4141
type ClusterResourceBinding struct {
4242
metav1.TypeMeta `json:",inline"`
4343
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -221,7 +221,7 @@ type ClusterResourceBindingList struct {
221221
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
222222

223223
// ResourceBinding represents a scheduling decision that binds a group of resources to a cluster.
224-
// It MUST have a label named `PlacementTrackingLabel` that points to the resource placement that creates it.
224+
// It MUST have a label named `CRPTrackingLabel` that points to the resource placement that creates it.
225225
type ResourceBinding struct {
226226
metav1.TypeMeta `json:",inline"`
227227
metav1.ObjectMeta `json:"metadata,omitempty"`

apis/placement/v1beta1/clusterresourceplacement_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ type ResourcePlacement struct {
13361336
}
13371337

13381338
// ResourcePlacementList contains a list of ResourcePlacement.
1339-
// +kubebuilder:resource:scope="Cluster"
1339+
// +kubebuilder:resource:scope="Namespaced"
13401340
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
13411341
type ResourcePlacementList struct {
13421342
metav1.TypeMeta `json:",inline"`

apis/placement/v1beta1/policysnapshot_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const (
4747
// The naming convention of a ClusterSchedulingPolicySnapshot is {CRPName}-{PolicySnapshotIndex}.
4848
// PolicySnapshotIndex will begin with 0.
4949
// Each snapshot must have the following labels:
50-
// - `PlacementTrackingLabel` which points to its owner CRP.
50+
// - `CRPTrackingLabel` which points to its owner CRP.
5151
// - `PolicyIndexLabel` which is the index of the policy snapshot.
5252
// - `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.
5353
type ClusterSchedulingPolicySnapshot struct {
@@ -183,7 +183,7 @@ func (m *ClusterSchedulingPolicySnapshot) GetCondition(conditionType string) *me
183183
// +genclient
184184
// +genclient:Namespaced
185185
// +kubebuilder:object:root=true
186-
// +kubebuilder:resource:scope="Namespace",shortName=sps,categories={fleet,fleet-placement}
186+
// +kubebuilder:resource:scope="Namespaced",shortName=sps,categories={fleet,fleet-placement}
187187
// +kubebuilder:subresource:status
188188
// +kubebuilder:storageversion
189189
// +kubebuilder:printcolumn:JSONPath=`.metadata.generation`,name="Gen",type=string
@@ -195,7 +195,7 @@ func (m *ClusterSchedulingPolicySnapshot) GetCondition(conditionType string) *me
195195
// The naming convention of a SchedulingPolicySnapshot is {RPName}-{PolicySnapshotIndex}.
196196
// PolicySnapshotIndex will begin with 0.
197197
// Each snapshot must have the following labels:
198-
// - `PlacementTrackingLabel` which points to its placement owner.
198+
// - `CRPTrackingLabel` which points to its placement owner.
199199
// - `PolicyIndexLabel` which is the index of the policy snapshot.
200200
// - `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.
201201
type SchedulingPolicySnapshot struct {
@@ -212,7 +212,7 @@ type SchedulingPolicySnapshot struct {
212212
}
213213

214214
// SchedulingPolicySnapshotList contains a list of SchedulingPolicySnapshotList.
215-
// +kubebuilder:resource:scope="Namespace"
215+
// +kubebuilder:resource:scope="Namespaced"
216216
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
217217
type SchedulingPolicySnapshotList struct {
218218
metav1.TypeMeta `json:",inline"`

apis/placement/v1beta1/resourcesnapshot_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const (
6464
// where the name of the first snapshot of a group has no subindex part so its name is {CRPName}-{resourceIndex}-snapshot.
6565
// resourceIndex will begin with 0.
6666
// Each snapshot MUST have the following labels:
67-
// - `PlacementTrackingLabel` which points to its owner CRP.
67+
// - `CRPTrackingLabel` which points to its owner CRP.
6868
// - `ResourceIndexLabel` which is the index of the snapshot group.
6969
// - `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.
7070
//
@@ -140,7 +140,7 @@ type ClusterResourceSnapshotList struct {
140140
// where the name of the first snapshot of a group has no subindex part so its name is {RPName}-{resourceIndex}-snapshot.
141141
// resourceIndex will begin with 0.
142142
// Each snapshot MUST have the following labels:
143-
// - `PlacementTrackingLabel` which points to its owner resource placement.
143+
// - `CRPTrackingLabel` which points to its owner resource placement.
144144
// - `ResourceIndexLabel` which is the index of the snapshot group.
145145
// - `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.
146146
//

config/crd/bases/placement.kubernetes-fleet.io_clusterresourcebindings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ spec:
390390
openAPIV3Schema:
391391
description: |-
392392
ClusterResourceBinding represents a scheduling decision that binds a group of resources to a cluster.
393-
It MUST have a label named `PlacementTrackingLabel` that points to the cluster resource policy that creates it.
393+
It MUST have a label named `CRPTrackingLabel` that points to the cluster resource policy that creates it.
394394
properties:
395395
apiVersion:
396396
description: |-

config/crd/bases/placement.kubernetes-fleet.io_clusterresourcesnapshots.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ spec:
174174
where the name of the first snapshot of a group has no subindex part so its name is {CRPName}-{resourceIndex}-snapshot.
175175
resourceIndex will begin with 0.
176176
Each snapshot MUST have the following labels:
177-
- `PlacementTrackingLabel` which points to its owner CRP.
177+
- `CRPTrackingLabel` which points to its owner CRP.
178178
- `ResourceIndexLabel` which is the index of the snapshot group.
179179
- `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.
180180

config/crd/bases/placement.kubernetes-fleet.io_clusterschedulingpolicysnapshots.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ spec:
651651
The naming convention of a ClusterSchedulingPolicySnapshot is {CRPName}-{PolicySnapshotIndex}.
652652
PolicySnapshotIndex will begin with 0.
653653
Each snapshot must have the following labels:
654-
- `PlacementTrackingLabel` which points to its owner CRP.
654+
- `CRPTrackingLabel` which points to its owner CRP.
655655
- `PolicyIndexLabel` which is the index of the policy snapshot.
656656
- `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.
657657
properties:

config/crd/bases/placement.kubernetes-fleet.io_resourcebindings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
openAPIV3Schema:
3939
description: |-
4040
ResourceBinding represents a scheduling decision that binds a group of resources to a cluster.
41-
It MUST have a label named `PlacementTrackingLabel` that points to the resource policy that creates it.
41+
It MUST have a label named `CRPTrackingLabel` that points to the resource placement that creates it.
4242
properties:
4343
apiVersion:
4444
description: |-

config/crd/bases/placement.kubernetes-fleet.io_resourceplacements.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ spec:
5656
description: |-
5757
ResourcePlacement is used to select namespace scoped resources, including built-in resources and custom resources,
5858
and placement them onto selected member clusters in a fleet.
59-
`SchedulingPolicySnapshot`, `ResourceSnapshot` and `ResourceBinding` objects are created in the same namespace when there are changes in the
60-
system to keep the history of the changes affecting a `ResourcePlacement`.
59+
`SchedulingPolicySnapshot` and `ResourceSnapshot` objects are created in the same namespace when there are changes in the
60+
system to keep the history of the changes affecting a `ResourcePlacement`. We will also create `ResourceBinding` objects in the same namespace.
6161
properties:
6262
apiVersion:
6363
description: |-

config/crd/bases/placement.kubernetes-fleet.io_resourcesnapshots.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
where the name of the first snapshot of a group has no subindex part so its name is {RPName}-{resourceIndex}-snapshot.
3939
resourceIndex will begin with 0.
4040
Each snapshot MUST have the following labels:
41-
- `PlacementTrackingLabel` which points to its owner RP.
41+
- `CRPTrackingLabel` which points to its owner resource placement.
4242
- `ResourceIndexLabel` which is the index of the snapshot group.
4343
- `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.
4444

0 commit comments

Comments
 (0)