Skip to content

Commit

Permalink
modify poolservice api.
Browse files Browse the repository at this point in the history
  • Loading branch information
zyjhtangtang committed Apr 7, 2024
1 parent 9769ab2 commit 6af818b
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: poolservices.net.openyurt.io
name: poolservices.network.openyurt.io
spec:
group: net.openyurt.io
group: network.openyurt.io
names:
categories:
- all
Expand Down Expand Up @@ -48,11 +48,6 @@ spec:
properties:
loadBalancerClass:
type: string
poolName:
type: string
renewTime:
format: date-time
type: string
type: object
status:
description: PoolServiceStatus defines the observed state of PoolService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package apis

import (
version "github.com/openyurtio/openyurt/pkg/apis/net/v1alpha1"
version "github.com/openyurtio/openyurt/pkg/apis/network/v1alpha1"
)

func init() {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "net.openyurt.io", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "network.openyurt.io", Version: "v1alpha1"}

SchemeGroupVersion = GroupVersion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,8 @@ import (

// PoolServiceSpec defines the desired state of PoolService
type PoolServiceSpec struct {
// Specify the name of the nodepool to identifies the nodepool to which the PoolService belongs.
PoolName string `json:"poolName,omitempty"`

// When the service corresponding to poolService is updated, the RenewTime will be refreshed.
RenewTime *metav1.MicroTime `json:"renewTime,omitempty"`

// Inherited from service annotations service.beta.kubernetes.io/class.
LoadBalancerClass string `json:"loadBalancerClass,omitempty"`
// Inherited from service spec.LoadBalancerClass
LoadBalancerClass *string `json:"loadBalancerClass,omitempty"`
}

// PoolServiceStatus defines the observed state of PoolService
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/apis/network/well_known_labels_annotations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package network

const (
LabelServiceName = "openyurt.io/service-name"
LabelNodePoolName = "openyurt.io/pool-name"
AnnotationNodePoolSelector = "service.openyurt.io/nodepool-labelselector"
AggregateAnnotationsKeyPrefix = "service.openyurt.io"
)
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

appconfig "github.com/openyurtio/openyurt/cmd/yurt-manager/app/config"
"github.com/openyurtio/openyurt/cmd/yurt-manager/names"
netv1alpha1 "github.com/openyurtio/openyurt/pkg/apis/net/v1alpha1"
netv1alpha1 "github.com/openyurtio/openyurt/pkg/apis/network/v1alpha1"
"github.com/openyurtio/openyurt/pkg/yurtmanager/controller/poolservice/config"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"

"github.com/openyurtio/openyurt/pkg/apis/net/v1alpha1"
"github.com/openyurtio/openyurt/pkg/apis/network/v1alpha1"
)

// Default satisfies the defaulting webhook interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
"sigs.k8s.io/controller-runtime/pkg/webhook"

"github.com/openyurtio/openyurt/pkg/apis/net/v1alpha1"
"github.com/openyurtio/openyurt/pkg/apis/network/v1alpha1"
"github.com/openyurtio/openyurt/pkg/yurtmanager/webhook/util"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/klog/v2"

"github.com/openyurtio/openyurt/pkg/apis/net/v1alpha1"
"github.com/openyurtio/openyurt/pkg/apis/network/v1alpha1"
)

// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
Expand Down

0 comments on commit 6af818b

Please sign in to comment.