mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 07:03:31 +00:00
Don't use pointers for session affinity
This commit is contained in:
@@ -134,9 +134,10 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var affinityType api.AffinityType = api.AffinityTypeNone
|
||||
if service.Spec.SessionAffinity != nil {
|
||||
affinityType = *service.Spec.SessionAffinity
|
||||
// TODO: We should be able to rely on valid input, and not do defaulting here.
|
||||
var affinityType api.AffinityType = service.Spec.SessionAffinity
|
||||
if affinityType == "" {
|
||||
affinityType = api.AffinityTypeNone
|
||||
}
|
||||
if len(service.Spec.PublicIPs) > 0 {
|
||||
for _, publicIP := range service.Spec.PublicIPs {
|
||||
|
Reference in New Issue
Block a user