Skip to content

Commit 056c495

Browse files
committed
bugfix: replace Endpoins of GlobalServiceSpec with Endpoint struct
1 parent a64713b commit 056c495

File tree

3 files changed

+8
-54
lines changed

3 files changed

+8
-54
lines changed

deploy/crd/dns.fabedge.io_globalservices.yaml

Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -62,34 +62,6 @@ spec:
6262
type: string
6363
type: array
6464
x-kubernetes-list-type: set
65-
conditions:
66-
description: conditions contains information about the current
67-
status of the endpoint.
68-
properties:
69-
ready:
70-
description: ready indicates that this endpoint is prepared
71-
to receive traffic, according to whatever system is managing
72-
the endpoint. A nil value indicates an unknown state. In
73-
most cases consumers should interpret this unknown state
74-
as ready. For compatibility reasons, ready should never
75-
be "true" for terminating endpoints.
76-
type: boolean
77-
serving:
78-
description: serving is identical to ready except that it
79-
is set regardless of the terminating state of endpoints.
80-
This condition should be set to true for a ready endpoint
81-
that is terminating. If nil, consumers should defer to the
82-
ready condition. This field can be enabled with the EndpointSliceTerminatingCondition
83-
feature gate.
84-
type: boolean
85-
terminating:
86-
description: terminating indicates that this endpoint is terminating.
87-
A nil value indicates an unknown state. Consumers should
88-
interpret this unknown state to mean that the endpoint is
89-
not terminating. This field can be enabled with the EndpointSliceTerminatingCondition
90-
feature gate.
91-
type: boolean
92-
type: object
9365
hostname:
9466
description: hostname of this endpoint. This field may be used
9567
by consumers of endpoints to distinguish endpoints from each
@@ -98,11 +70,9 @@ spec:
9870
values in DNS). Must be lowercase and pass DNS Label (RFC 1123)
9971
validation.
10072
type: string
101-
nodeName:
102-
description: nodeName represents the name of the Node hosting
103-
this endpoint. This can be used to determine endpoints local
104-
to a Node. This field can be enabled with the EndpointSliceNodeName
105-
feature gate.
73+
region:
74+
description: Region indicates the region where the endpoint is
75+
located
10676
type: string
10777
targetRef:
10878
description: targetRef is a reference to a Kubernetes object that
@@ -141,23 +111,9 @@ spec:
141111
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
142112
type: string
143113
type: object
144-
topology:
145-
additionalProperties:
146-
type: string
147-
description: 'topology contains arbitrary topology information
148-
associated with the endpoint. These key/value pairs must conform
149-
with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
150-
Topology may include a maximum of 16 key/value pairs. This includes,
151-
but is not limited to the following well known keys: * kubernetes.io/hostname:
152-
the value indicates the hostname of the node where the endpoint
153-
is located. This should match the corresponding node label.
154-
* topology.kubernetes.io/zone: the value indicates the zone
155-
where the endpoint is located. This should match the corresponding
156-
node label. * topology.kubernetes.io/region: the value indicates
157-
the region where the endpoint is located. This should match
158-
the corresponding node label. This field is deprecated and will
159-
be removed in future api versions.'
160-
type: object
114+
zone:
115+
description: Zone indicates the zone where the endpoint is located
116+
type: string
161117
required:
162118
- addresses
163119
type: object

pkg/apis/v1alpha1/global_service_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package v1alpha1
22

33
import (
44
corev1 "k8s.io/api/core/v1"
5-
discoveryv1 "k8s.io/api/discovery/v1beta1"
65
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
76
)
87

@@ -35,7 +34,7 @@ type GlobalServiceSpec struct {
3534

3635
Ports []ServicePort `json:"ports,omitempty"`
3736

38-
Endpoints []discoveryv1.Endpoint `json:"endpoints,omitempty"`
37+
Endpoints []Endpoint `json:"endpoints,omitempty"`
3938
}
4039

4140
// Endpoint represents a single logical "backend" implementing a service.

pkg/apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)