Skip to content

Commit

Permalink
refactor(yurt-manager): 更新 CRD 分类并移除 YurtAppDaemon 相关代码
Browse files Browse the repository at this point in the history
- 将 CRD 的 categories 从 "all" 修改为 "yurt",以更好地组织 OpenYurt 资源
- 移除了 YurtAppDaemon 相关的控制器和类型定义
- 更新了所有受影响的 CRD 文件和 Go 源码文件
  • Loading branch information
luc99hen committed Feb 14, 2025
1 parent 2a40449 commit 8dcf8eb
Show file tree
Hide file tree
Showing 22 changed files with 20 additions and 159 deletions.
2 changes: 1 addition & 1 deletion charts/yurt-manager/crds/apps.openyurt.io_nodebuckets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
group: apps.openyurt.io
names:
categories:
- all
- yurt
kind: NodeBucket
listKind: NodeBucketList
plural: nodebuckets
Expand Down
2 changes: 1 addition & 1 deletion charts/yurt-manager/crds/apps.openyurt.io_nodepools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
group: apps.openyurt.io
names:
categories:
- all
- yurt
kind: NodePool
listKind: NodePoolList
plural: nodepools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
group: apps.openyurt.io
names:
categories:
- all
- yurt
kind: YurtAppDaemon
listKind: YurtAppDaemonList
plural: yurtappdaemons
Expand Down
2 changes: 1 addition & 1 deletion charts/yurt-manager/crds/apps.openyurt.io_yurtappsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
group: apps.openyurt.io
names:
categories:
- all
- yurt
kind: YurtAppSet
listKind: YurtAppSetList
plural: yurtappsets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
group: iot.openyurt.io
names:
categories:
- all
- yurt
kind: PlatformAdmin
listKind: PlatformAdminList
plural: platformadmins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
group: network.openyurt.io
names:
categories:
- all
- yurt
kind: PoolService
listKind: PoolServiceList
plural: poolservices
Expand Down
2 changes: 1 addition & 1 deletion charts/yurt-manager/crds/raven.openyurt.io_gateways.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
group: raven.openyurt.io
names:
categories:
- all
- yurt
kind: Gateway
listKind: GatewayList
plural: gateways
Expand Down
2 changes: 0 additions & 2 deletions cmd/yurt-manager/names/controller_names.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const (
ServiceTopologyEndpointsController = "service-topology-endpoints-controller"
ServiceTopologyEndpointSliceController = "service-topology-endpointslice-controller"
YurtAppSetController = "yurt-app-set-controller"
YurtAppDaemonController = "yurt-app-daemon-controller"
YurtStaticSetController = "yurt-static-set-controller"
YurtCoordinatorCertController = "yurt-coordinator-cert-controller"
DelegateLeaseController = "delegate-lease-controller"
Expand All @@ -50,7 +49,6 @@ func YurtManagerControllerAliases() map[string]string {
"servicetopologyendpoints": ServiceTopologyEndpointsController,
"servicetopologyendpointslices": ServiceTopologyEndpointSliceController,
"yurtappset": YurtAppSetController,
"yurtappdaemon": YurtAppDaemonController,
"yurtstaticset": YurtStaticSetController,
"yurtcoordinatorcert": YurtCoordinatorCertController,
"delegatelease": DelegateLeaseController,
Expand Down
2 changes: 1 addition & 1 deletion hack/make-rules/add_controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ type ${KIND_FIRST_UPPER}Status struct {
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=${SCOPE},path=${KIND_PLURAL},shortName=${SHORTNAME},categories=all
// +kubebuilder:resource:scope=${SCOPE},path=${KIND_PLURAL},shortName=${SHORTNAME},categories=yurt
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."
// ${KIND_FIRST_UPPER} is the Schema for the samples API
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/apps/v1alpha1/nodebucket_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Node struct {
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,path=nodebuckets,shortName=nb,categories=all
// +kubebuilder:resource:scope=Cluster,path=nodebuckets,shortName=nb,categories=yurt
// +kubebuilder:printcolumn:name="NUM-NODES",type="integer",JSONPath=".numNodes",description="NumNodes represents the number of nodes in the NodeBucket."
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/apps/v1alpha1/nodepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type NodePoolStatus struct {

// +genclient:nonNamespaced
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster,path=nodepools,shortName=np,categories=all
// +kubebuilder:resource:scope=Cluster,path=nodepools,shortName=np,categories=yurt
// +kubebuilder:subresource:status
// +kubebuilder:deprecatedversion:warning="apps.openyurt.io/v1alpha1 NodePool is deprecated in v1.0.0+; use apps.openyurt.io/v1beta1 NodePool"
// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type",description="The type of nodepool"
Expand Down
137 changes: 0 additions & 137 deletions pkg/apis/apps/v1alpha1/yurtappdaemon_types.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/apis/apps/v1alpha1/yurtappset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ type YurtAppSetCondition struct {

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=yas,categories=all
// +kubebuilder:resource:shortName=yas,categories=yurt
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyReplicas",description="The number of pods ready."
// +kubebuilder:printcolumn:name="WorkloadTemplate",type="string",JSONPath=".status.templateType",description="The WorkloadTemplate Type."
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/apps/v1beta1/nodepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type NodePoolStatus struct {

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster,path=nodepools,shortName=np,categories=all
// +kubebuilder:resource:scope=Cluster,path=nodepools,shortName=np,categories=yurt
// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type",description="The type of nodepool"
// +kubebuilder:printcolumn:name="ReadyNodes",type="integer",JSONPath=".status.readyNodeNum",description="The number of ready nodes in the pool"
// +kubebuilder:printcolumn:name="NotReadyNodes",type="integer",JSONPath=".status.unreadyNodeNum"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/apps/v1beta1/yurtappset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ type YurtAppSetCondition struct {

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=yas,categories=all
// +kubebuilder:resource:shortName=yas,categories=yurt
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="TOTAL",type="integer",JSONPath=".status.totalWorkloads",description="The total number of workloads."
// +kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyWorkloads",description="The number of workloads ready."
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/apps/v1beta2/nodepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ type NodePoolCondition struct {

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster,path=nodepools,shortName=np,categories=all
// +kubebuilder:resource:scope=Cluster,path=nodepools,shortName=np,categories=yurt
// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type",description="The type of nodepool"
// +kubebuilder:printcolumn:name="ReadyNodes",type="integer",JSONPath=".status.readyNodeNum",description="The number of ready nodes in the pool"
// +kubebuilder:printcolumn:name="NotReadyNodes",type="integer",JSONPath=".status.unreadyNodeNum"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/iot/v1alpha1/platformadmin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type PlatformAdminCondition struct {
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Namespaced,path=platformadmins,shortName=pa,categories=all
// +kubebuilder:resource:scope=Namespaced,path=platformadmins,shortName=pa,categories=yurt
// +kubebuilder:printcolumn:name="READY",type="boolean",JSONPath=".status.ready",description="The platform ready status"
// +kubebuilder:printcolumn:name="Service",type="integer",JSONPath=".status.serviceReplicas",description="The Service Replica."
// +kubebuilder:printcolumn:name="ReadyService",type="integer",JSONPath=".status.serviceReadyReplicas",description="The Ready Service Replica."
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/iot/v1alpha2/platformadmin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type PlatformAdminCondition struct {
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Namespaced,path=platformadmins,shortName=pa,categories=all
// +kubebuilder:resource:scope=Namespaced,path=platformadmins,shortName=pa,categories=yurt
// +kubebuilder:printcolumn:name="READY",type="boolean",JSONPath=".status.ready",description="The platformadmin ready status"
// +kubebuilder:printcolumn:name="ReadyComponentNum",type="integer",JSONPath=".status.readyComponentNum",description="The Ready Component."
// +kubebuilder:printcolumn:name="UnreadyComponentNum",type="integer",JSONPath=".status.unreadyComponentNum",description="The Unready Component."
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/iot/v1beta1/platformadmin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type PlatformAdminCondition struct {
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Namespaced,path=platformadmins,shortName=pa,categories=all
// +kubebuilder:resource:scope=Namespaced,path=platformadmins,shortName=pa,categories=yurt
// +kubebuilder:printcolumn:name="READY",type="boolean",JSONPath=".status.ready",description="The platformadmin ready status"
// +kubebuilder:printcolumn:name="ReadyComponentNum",type="integer",JSONPath=".status.readyComponentNum",description="The Ready Component."
// +kubebuilder:printcolumn:name="UnreadyComponentNum",type="integer",JSONPath=".status.unreadyComponentNum",description="The Unready Component."
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/network/v1alpha1/poolservice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type PoolServiceStatus struct {
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Namespaced,path=poolservices,shortName=ps,categories=all
// +kubebuilder:resource:scope=Namespaced,path=poolservices,shortName=ps,categories=yurt
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."

// PoolService is the Schema for the samples API
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/raven/v1alpha1/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type GatewayStatus struct {
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,path=gateways,shortName=gw,categories=all
// +kubebuilder:resource:scope=Cluster,path=gateways,shortName=gw,categories=yurt
//+kubebuilder:printcolumn:name="ActiveEndpoint",type=string,JSONPath=`.status.activeEndpoint.nodeName`

// Gateway is the Schema for the gateways API
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/raven/v1beta1/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ type GatewayStatus struct {
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,path=gateways,shortName=gw,categories=all
// +kubebuilder:resource:scope=Cluster,path=gateways,shortName=gw,categories=yurt
// +kubebuilder:storageversion

// Gateway is the Schema for the gateways API
Expand Down

0 comments on commit 8dcf8eb

Please sign in to comment.