Skip to content

Commit eaa8f8d

Browse files
committed
Merge remote-tracking branch 'cncf/main' into syncRepo
2 parents 0ced682 + 491abff commit eaa8f8d

107 files changed

Lines changed: 6018 additions & 1112 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
paths-ignore: [docs/**, "**.md", "**.mdx", "**.png", "**.jpg"]
1414

1515
env:
16-
GO_VERSION: '1.23.6'
16+
GO_VERSION: '1.23.8'
1717

1818
jobs:
1919
detect-noop:

.github/workflows/code-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
env:
1616
# Common versions
17-
GO_VERSION: '1.23.6'
17+
GO_VERSION: '1.23.8'
1818

1919
jobs:
2020

.github/workflows/trivy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
MEMBER_AGENT_IMAGE_NAME: member-agent
1919
REFRESH_TOKEN_IMAGE_NAME: refresh-token
2020

21-
GO_VERSION: '1.23.6'
21+
GO_VERSION: '1.23.8'
2222

2323
jobs:
2424
export-registry:

.github/workflows/upgrade.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
paths-ignore: [docs/**, "**.md", "**.mdx", "**.png", "**.jpg"]
2121

2222
env:
23-
GO_VERSION: '1.23.6'
23+
GO_VERSION: '1.23.8'
2424

2525
jobs:
2626
detect-noop:

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
run:
22
timeout: 15m
3-
go: '1.23.6'
3+
go: '1.23.8'
44

55
linters-settings:
66
stylecheck:

apis/placement/v1/binding_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
// +kubebuilder:object:root=true
25-
// +kubebuilder:resource:scope=Cluster,categories={fleet,fleet-placement},shortName=rb
25+
// +kubebuilder:resource:scope=Cluster,categories={fleet,fleet-placement},shortName=crb
2626
// +kubebuilder:subresource:status
2727
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="WorkSynchronized")].status`,name="WorkSynchronized",type=string
2828
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Applied")].status`,name="ResourcesApplied",type=string

apis/placement/v1/clusterresourceplacement_types.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ import (
2323
"k8s.io/apimachinery/pkg/util/intstr"
2424
)
2525

26-
const (
27-
// ClusterResourcePlacementCleanupFinalizer is a finalizer added by the CRP controller to all CRPs, to make sure
28-
// that the CRP controller can react to CRP deletions if necessary.
29-
ClusterResourcePlacementCleanupFinalizer = fleetPrefix + "crp-cleanup"
30-
31-
// SchedulerCRPCleanupFinalizer is a finalizer added by the scheduler to CRPs, to make sure
32-
// that all bindings derived from a CRP can be cleaned up after the CRP is deleted.
33-
SchedulerCRPCleanupFinalizer = fleetPrefix + "scheduler-cleanup"
34-
)
35-
3626
// +genclient
3727
// +genclient:nonNamespaced
3828
// +kubebuilder:object:root=true

apis/placement/v1/commons.go

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -16,80 +16,6 @@ limitations under the License.
1616

1717
package v1
1818

19-
const (
20-
ClusterResourcePlacementKind = "ClusterResourcePlacement"
21-
ClusterResourcePlacementResource = "clusterresourceplacements"
22-
ClusterResourceBindingKind = "ClusterResourceBinding"
23-
ClusterResourceSnapshotKind = "ClusterResourceSnapshot"
24-
ClusterSchedulingPolicySnapshotKind = "ClusterSchedulingPolicySnapshot"
25-
WorkKind = "Work"
26-
AppliedWorkKind = "AppliedWork"
27-
)
28-
29-
const (
30-
// Unprefixed labels/annotations are reserved for end-users
31-
// we will add a kubernetes-fleet.io to designate these labels/annotations as official fleet labels/annotations.
32-
// See https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions
33-
fleetPrefix = "kubernetes-fleet.io/"
34-
35-
// MemberClusterFinalizer is used to make sure that we handle gc of all the member cluster resources on the hub cluster.
36-
MemberClusterFinalizer = fleetPrefix + "membercluster-finalizer"
37-
38-
// WorkFinalizer is used by the work generator to make sure that the binding is not deleted until the work objects
39-
// it generates are all deleted, or used by the work controller to make sure the work has been deleted in the member
40-
// cluster.
41-
WorkFinalizer = fleetPrefix + "work-cleanup"
42-
43-
// CRPTrackingLabel is the label that points to the cluster resource policy that creates a resource binding.
44-
CRPTrackingLabel = fleetPrefix + "parent-CRP"
45-
46-
// IsLatestSnapshotLabel tells if the snapshot is the latest one.
47-
IsLatestSnapshotLabel = fleetPrefix + "is-latest-snapshot"
48-
49-
// FleetResourceLabelKey is that label that indicates the resource is a fleet resource.
50-
FleetResourceLabelKey = fleetPrefix + "is-fleet-resource"
51-
52-
// FirstWorkNameFmt is the format of the name of the work generated with first resource snapshot .
53-
// The name of the first work is {crpName}-work.
54-
FirstWorkNameFmt = "%s-work"
55-
56-
// WorkNameWithSubindexFmt is the format of the name of a work generated with resource snapshot with subindex.
57-
// The name of the first work is {crpName}-{subindex}.
58-
WorkNameWithSubindexFmt = "%s-%d"
59-
60-
// WorkNameWithConfigEnvelopeFmt is the format of the name of a work generated with config envelop.
61-
// The format is {workPrefix}-configMap-uuid
62-
WorkNameWithConfigEnvelopeFmt = "%s-configmap-%s"
63-
64-
// ParentResourceSnapshotIndexLabel is the label applied to work that contains the index of the resource snapshot that generates the work.
65-
ParentResourceSnapshotIndexLabel = fleetPrefix + "parent-resource-snapshot-index"
66-
67-
// ParentBindingLabel is the label applied to work that contains the name of the binding that generates the work.
68-
ParentBindingLabel = fleetPrefix + "parent-resource-binding"
69-
70-
// CRPGenerationAnnotation is the annotation that indicates the generation of the CRP from
71-
// which an object is derived or last updated.
72-
CRPGenerationAnnotation = fleetPrefix + "CRP-generation"
73-
74-
// EnvelopeConfigMapAnnotation is the annotation that indicates the configmap is an envelope configmap that contains resources
75-
// we need to apply to the member cluster instead of the configMap itself.
76-
EnvelopeConfigMapAnnotation = fleetPrefix + "envelope-configmap"
77-
78-
// EnvelopeTypeLabel is the label that marks the work object as generated from an envelope object.
79-
// The value of the annotation is the type of the envelope object.
80-
EnvelopeTypeLabel = fleetPrefix + "envelope-work"
81-
82-
// EnvelopeNamespaceLabel is the label that contains the namespace of the envelope object that the work is generated from.
83-
EnvelopeNamespaceLabel = fleetPrefix + "envelope-namespace"
84-
85-
// EnvelopeNameLabel is the label that contains the name of the envelope object that the work is generated from.
86-
EnvelopeNameLabel = fleetPrefix + "envelope-name"
87-
88-
// PreviousBindingStateAnnotation is the annotation that records the previous state of a binding.
89-
// This is used to remember if an "unscheduled" binding was moved from a "bound" state or a "scheduled" state.
90-
PreviousBindingStateAnnotation = fleetPrefix + "previous-binding-state"
91-
)
92-
9319
// NamespacedName comprises a resource name, with a mandatory namespace.
9420
type NamespacedName struct {
9521
// Name is the name of the namespaced scope resource.

apis/placement/v1/policysnapshot_types.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,10 @@ import (
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2222
)
2323

24-
const (
25-
// PolicyIndexLabel is the label that indicate the policy snapshot index of a cluster policy.
26-
PolicyIndexLabel = fleetPrefix + "policy-index"
27-
28-
// PolicySnapshotNameFmt is clusterPolicySnapshot name format: {CRPName}-{PolicySnapshotIndex}.
29-
PolicySnapshotNameFmt = "%s-%d"
30-
31-
// NumberOfClustersAnnotation is the annotation that indicates how many clusters should be selected for selectN placement type.
32-
NumberOfClustersAnnotation = fleetPrefix + "number-of-clusters"
33-
)
34-
3524
// +genclient
3625
// +genclient:nonNamespaced
3726
// +kubebuilder:object:root=true
38-
// +kubebuilder:resource:scope="Cluster",shortName=pss,categories={fleet,fleet-placement}
27+
// +kubebuilder:resource:scope="Cluster",shortName=csps,categories={fleet,fleet-placement}
3928
// +kubebuilder:subresource:status
4029
// +kubebuilder:printcolumn:JSONPath=`.metadata.generation`,name="Gen",type=string
4130
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date

apis/placement/v1/resourcesnapshot_types.go

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,10 @@ import (
2222
"k8s.io/apimachinery/pkg/runtime"
2323
)
2424

25-
const (
26-
// ResourceIndexLabel is the label that indicate the resource snapshot index of a cluster resource snapshot.
27-
ResourceIndexLabel = fleetPrefix + "resource-index"
28-
29-
// ResourceGroupHashAnnotation is the annotation that contains the value of the sha-256 hash
30-
// value of all the snapshots belong to the same snapshot index.
31-
ResourceGroupHashAnnotation = fleetPrefix + "resource-hash"
32-
33-
// NumberOfEnvelopedObjectsAnnotation is the annotation that contains the number of the enveloped objects in the resource snapshot group.
34-
NumberOfEnvelopedObjectsAnnotation = fleetPrefix + "number-of-enveloped-object"
35-
36-
// NumberOfResourceSnapshotsAnnotation is the annotation that contains the total number of resource snapshots.
37-
NumberOfResourceSnapshotsAnnotation = fleetPrefix + "number-of-resource-snapshots"
38-
39-
// SubindexOfResourceSnapshotAnnotation is the annotation to store the subindex of resource snapshot in the group.
40-
SubindexOfResourceSnapshotAnnotation = fleetPrefix + "subindex-of-resource-snapshot"
41-
42-
// ResourceSnapshotNameFmt is resourcePolicySnapshot name format: {CRPName}-{resourceIndex}-snapshot.
43-
ResourceSnapshotNameFmt = "%s-%d-snapshot"
44-
45-
// ResourceSnapshotNameWithSubindexFmt is resourcePolicySnapshot name with subindex format: {CRPName}-{resourceIndex}-{subindex}.
46-
ResourceSnapshotNameWithSubindexFmt = "%s-%d-%d"
47-
)
48-
4925
// +genclient
5026
// +genclient:nonNamespaced
5127
// +kubebuilder:object:root=true
52-
// +kubebuilder:resource:scope="Cluster",shortName=rss,categories={fleet,fleet-placement}
28+
// +kubebuilder:resource:scope="Cluster",shortName=crs,categories={fleet,fleet-placement}
5329
// +kubebuilder:subresource:status
5430
// +kubebuilder:printcolumn:JSONPath=`.metadata.generation`,name="Gen",type=string
5531
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date

0 commit comments

Comments
 (0)