Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename crd category from all to yurt #2320

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
22 changes: 0 additions & 22 deletions pkg/apis/apps/v1alpha1/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,28 +223,6 @@ func SetDefaultsYurtStaticSet(obj *YurtStaticSet) {
obj.Spec.Template.Namespace = obj.Namespace
}

// SetDefaultsYurtAppDaemon set default values for YurtAppDaemon.
func SetDefaultsYurtAppDaemon(obj *YurtAppDaemon) {

if obj.Spec.RevisionHistoryLimit == nil {
obj.Spec.RevisionHistoryLimit = utilpointer.To[int32](10)
}

if obj.Spec.WorkloadTemplate.StatefulSetTemplate != nil {
SetDefaultPodSpec(&obj.Spec.WorkloadTemplate.StatefulSetTemplate.Spec.Template.Spec)
for i := range obj.Spec.WorkloadTemplate.StatefulSetTemplate.Spec.VolumeClaimTemplates {
a := &obj.Spec.WorkloadTemplate.StatefulSetTemplate.Spec.VolumeClaimTemplates[i]
v1.SetDefaults_PersistentVolumeClaim(a)
v1.SetDefaults_ResourceList(&a.Spec.Resources.Limits)
v1.SetDefaults_ResourceList(&a.Spec.Resources.Requests)
v1.SetDefaults_ResourceList(&a.Status.Capacity)
}
}
if obj.Spec.WorkloadTemplate.DeploymentTemplate != nil {
SetDefaultPodSpec(&obj.Spec.WorkloadTemplate.DeploymentTemplate.Spec.Template.Spec)
}
}

// SetDefaultsNodeBucket set default values for NodeBucket.
func SetDefaultsNodeBucket(obj *NodeBucket) {
// example for set default value for NodeBucket
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
Loading
Loading