mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-27 07:28:14 +00:00
Implements Service Internal Traffic Policy
1. Add API definitions; 2. Add feature gate and drops the field when feature gate is not on; 3. Set default values for the field; 4. Add API Validation 5. add kube-proxy iptables and ipvs implementations 6. add tests Kubernetes-commit: 7ed2f1d94d694c6c4fdb4629638c38b1cbda7288
This commit is contained in:
parent
fa8f4cc307
commit
9baafcd261
@ -44,6 +44,7 @@ type ServiceSpecApplyConfiguration struct {
|
||||
IPFamilyPolicy *corev1.IPFamilyPolicyType `json:"ipFamilyPolicy,omitempty"`
|
||||
AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty"`
|
||||
LoadBalancerClass *string `json:"loadBalancerClass,omitempty"`
|
||||
InternalTrafficPolicy *corev1.ServiceInternalTrafficPolicyType `json:"internalTrafficPolicy,omitempty"`
|
||||
}
|
||||
|
||||
// ServiceSpecApplyConfiguration constructs an declarative configuration of the ServiceSpec type for use with
|
||||
@ -224,3 +225,11 @@ func (b *ServiceSpecApplyConfiguration) WithLoadBalancerClass(value string) *Ser
|
||||
b.LoadBalancerClass = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInternalTrafficPolicy sets the InternalTrafficPolicy 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 InternalTrafficPolicy field is set to the value of the last call.
|
||||
func (b *ServiceSpecApplyConfiguration) WithInternalTrafficPolicy(value corev1.ServiceInternalTrafficPolicyType) *ServiceSpecApplyConfiguration {
|
||||
b.InternalTrafficPolicy = &value
|
||||
return b
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user