mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-27 15:39:39 +00:00
Adding Hints to EndpointSlice API
Kubernetes-commit: 11f0944dbc70089e005f55b43d6507503a0491c5
This commit is contained in:
parent
67d8c554b3
commit
9c787714aa
@ -32,6 +32,7 @@ type EndpointApplyConfiguration struct {
|
||||
DeprecatedTopology map[string]string `json:"deprecatedTopology,omitempty"`
|
||||
NodeName *string `json:"nodeName,omitempty"`
|
||||
Zone *string `json:"zone,omitempty"`
|
||||
Hints *EndpointHintsApplyConfiguration `json:"hints,omitempty"`
|
||||
}
|
||||
|
||||
// EndpointApplyConfiguration constructs an declarative configuration of the Endpoint type for use with
|
||||
@ -103,3 +104,11 @@ func (b *EndpointApplyConfiguration) WithZone(value string) *EndpointApplyConfig
|
||||
b.Zone = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHints sets the Hints field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Hints field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithHints(value *EndpointHintsApplyConfiguration) *EndpointApplyConfiguration {
|
||||
b.Hints = value
|
||||
return b
|
||||
}
|
||||
|
44
applyconfigurations/discovery/v1/endpointhints.go
Normal file
44
applyconfigurations/discovery/v1/endpointhints.go
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// EndpointHintsApplyConfiguration represents an declarative configuration of the EndpointHints type for use
|
||||
// with apply.
|
||||
type EndpointHintsApplyConfiguration struct {
|
||||
ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"`
|
||||
}
|
||||
|
||||
// EndpointHintsApplyConfiguration constructs an declarative configuration of the EndpointHints type for use with
|
||||
// apply.
|
||||
func EndpointHints() *EndpointHintsApplyConfiguration {
|
||||
return &EndpointHintsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithForZones adds the given value to the ForZones field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ForZones field.
|
||||
func (b *EndpointHintsApplyConfiguration) WithForZones(values ...*ForZoneApplyConfiguration) *EndpointHintsApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithForZones")
|
||||
}
|
||||
b.ForZones = append(b.ForZones, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
39
applyconfigurations/discovery/v1/forzone.go
Normal file
39
applyconfigurations/discovery/v1/forzone.go
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ForZoneApplyConfiguration represents an declarative configuration of the ForZone type for use
|
||||
// with apply.
|
||||
type ForZoneApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// ForZoneApplyConfiguration constructs an declarative configuration of the ForZone type for use with
|
||||
// apply.
|
||||
func ForZone() *ForZoneApplyConfiguration {
|
||||
return &ForZoneApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ForZoneApplyConfiguration) WithName(value string) *ForZoneApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
@ -31,6 +31,7 @@ type EndpointApplyConfiguration struct {
|
||||
TargetRef *v1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"`
|
||||
Topology map[string]string `json:"topology,omitempty"`
|
||||
NodeName *string `json:"nodeName,omitempty"`
|
||||
Hints *EndpointHintsApplyConfiguration `json:"hints,omitempty"`
|
||||
}
|
||||
|
||||
// EndpointApplyConfiguration constructs an declarative configuration of the Endpoint type for use with
|
||||
@ -94,3 +95,11 @@ func (b *EndpointApplyConfiguration) WithNodeName(value string) *EndpointApplyCo
|
||||
b.NodeName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHints sets the Hints field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Hints field is set to the value of the last call.
|
||||
func (b *EndpointApplyConfiguration) WithHints(value *EndpointHintsApplyConfiguration) *EndpointApplyConfiguration {
|
||||
b.Hints = value
|
||||
return b
|
||||
}
|
||||
|
44
applyconfigurations/discovery/v1beta1/endpointhints.go
Normal file
44
applyconfigurations/discovery/v1beta1/endpointhints.go
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
// EndpointHintsApplyConfiguration represents an declarative configuration of the EndpointHints type for use
|
||||
// with apply.
|
||||
type EndpointHintsApplyConfiguration struct {
|
||||
ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"`
|
||||
}
|
||||
|
||||
// EndpointHintsApplyConfiguration constructs an declarative configuration of the EndpointHints type for use with
|
||||
// apply.
|
||||
func EndpointHints() *EndpointHintsApplyConfiguration {
|
||||
return &EndpointHintsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithForZones adds the given value to the ForZones field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ForZones field.
|
||||
func (b *EndpointHintsApplyConfiguration) WithForZones(values ...*ForZoneApplyConfiguration) *EndpointHintsApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithForZones")
|
||||
}
|
||||
b.ForZones = append(b.ForZones, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
39
applyconfigurations/discovery/v1beta1/forzone.go
Normal file
39
applyconfigurations/discovery/v1beta1/forzone.go
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
// ForZoneApplyConfiguration represents an declarative configuration of the ForZone type for use
|
||||
// with apply.
|
||||
type ForZoneApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// ForZoneApplyConfiguration constructs an declarative configuration of the ForZone type for use with
|
||||
// apply.
|
||||
func ForZone() *ForZoneApplyConfiguration {
|
||||
return &ForZoneApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ForZoneApplyConfiguration) WithName(value string) *ForZoneApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
@ -777,20 +777,28 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationsdiscoveryv1.EndpointApplyConfiguration{}
|
||||
case discoveryv1.SchemeGroupVersion.WithKind("EndpointConditions"):
|
||||
return &applyconfigurationsdiscoveryv1.EndpointConditionsApplyConfiguration{}
|
||||
case discoveryv1.SchemeGroupVersion.WithKind("EndpointHints"):
|
||||
return &applyconfigurationsdiscoveryv1.EndpointHintsApplyConfiguration{}
|
||||
case discoveryv1.SchemeGroupVersion.WithKind("EndpointPort"):
|
||||
return &applyconfigurationsdiscoveryv1.EndpointPortApplyConfiguration{}
|
||||
case discoveryv1.SchemeGroupVersion.WithKind("EndpointSlice"):
|
||||
return &applyconfigurationsdiscoveryv1.EndpointSliceApplyConfiguration{}
|
||||
case discoveryv1.SchemeGroupVersion.WithKind("ForZone"):
|
||||
return &applyconfigurationsdiscoveryv1.ForZoneApplyConfiguration{}
|
||||
|
||||
// Group=discovery.k8s.io, Version=v1beta1
|
||||
case discoveryv1beta1.SchemeGroupVersion.WithKind("Endpoint"):
|
||||
return &applyconfigurationsdiscoveryv1beta1.EndpointApplyConfiguration{}
|
||||
case discoveryv1beta1.SchemeGroupVersion.WithKind("EndpointConditions"):
|
||||
return &applyconfigurationsdiscoveryv1beta1.EndpointConditionsApplyConfiguration{}
|
||||
case discoveryv1beta1.SchemeGroupVersion.WithKind("EndpointHints"):
|
||||
return &applyconfigurationsdiscoveryv1beta1.EndpointHintsApplyConfiguration{}
|
||||
case discoveryv1beta1.SchemeGroupVersion.WithKind("EndpointPort"):
|
||||
return &applyconfigurationsdiscoveryv1beta1.EndpointPortApplyConfiguration{}
|
||||
case discoveryv1beta1.SchemeGroupVersion.WithKind("EndpointSlice"):
|
||||
return &applyconfigurationsdiscoveryv1beta1.EndpointSliceApplyConfiguration{}
|
||||
case discoveryv1beta1.SchemeGroupVersion.WithKind("ForZone"):
|
||||
return &applyconfigurationsdiscoveryv1beta1.ForZoneApplyConfiguration{}
|
||||
|
||||
// Group=events.k8s.io, Version=v1
|
||||
case eventsv1.SchemeGroupVersion.WithKind("Event"):
|
||||
|
Loading…
Reference in New Issue
Block a user