kubernetes/pkg/registry/core/service/strategy.go

type svcStrategy

var Strategy

// NamespaceScoped is true for services.
func (svcStrategy) NamespaceScoped() bool {}

// GetResetFields returns the set of fields that get reset by the strategy
// and should not be modified by the user.
func (svcStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {}

// PrepareForCreate sets contextual defaults and clears fields that are not allowed to be set by end users on creation.
func (svcStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) {}

// PrepareForUpdate sets contextual defaults and clears fields that are not allowed to be set by end users on update.
func (svcStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) {}

// Validate validates a new service.
func (svcStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {}

// WarningsOnCreate returns warnings for the creation of the given object.
func (svcStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string {}

// Canonicalize normalizes the object after validation.
func (svcStrategy) Canonicalize(obj runtime.Object) {}

func (svcStrategy) AllowCreateOnUpdate() bool {}

func (strategy svcStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {}

// WarningsOnUpdate returns warnings for the given update.
func (svcStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string {}

func (svcStrategy) AllowUnconditionalUpdate() bool {}

// dropServiceDisabledFields drops fields that are not used if their associated feature gates
// are not enabled.  The typical pattern is:
//
//	if !utilfeature.DefaultFeatureGate.Enabled(features.MyFeature) && !myFeatureInUse(oldSvc) {
//	    newSvc.Spec.MyFeature = nil
//	}
func dropServiceDisabledFields(newSvc *api.Service, oldSvc *api.Service) {}

type serviceStatusStrategy

var StatusStrategy

// GetResetFields returns the set of fields that get reset by the strategy
// and should not be modified by the user.
func (serviceStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {}

// PrepareForUpdate clears fields that are not allowed to be set by end users on update of status
func (serviceStatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) {}

// ValidateUpdate is the default update validation for an end user updating status
func (serviceStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {}

// WarningsOnUpdate returns warnings for the given update.
func (serviceStatusStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string {}

// GetAttrs returns labels and fields of a given object for filtering purposes.
func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) {}

// Matcher returns a selection predicate for a given label and field selector.
func Matcher(label labels.Selector, field fields.Selector) pkgstorage.SelectionPredicate {}

// SelectableFields returns a field set that can be used for filter selection
func SelectableFields(service *api.Service) fields.Set {}

// dropServiceStatusDisabledFields drops fields that are not used if their associated feature gates
// are not enabled.  The typical pattern is:
//
//	if !utilfeature.DefaultFeatureGate.Enabled(features.MyFeature) && !myFeatureInUse(oldSvc) {
//	    newSvc.Status.MyFeature = nil
//	}
func dropServiceStatusDisabledFields(newSvc *api.Service, oldSvc *api.Service) {}

// returns true when the LoadBalancer Ingress IPMode fields are in use.
func loadbalancerIPModeInUse(svc *api.Service) bool {}

func sameStringSlice(a []string, b []string) bool {}

// This is an unusual case.  Service has a number of inter-related fields and
// in order to avoid breaking clients we try really hard to infer what users
// mean when they change them.
//
// Services are effectively a discriminated union, where `type` is the
// discriminator. Some fields just don't make sense with some types, so we
// clear them.
//
// As a rule, we almost never change user input.  This can get tricky when APIs
// evolve and new dependent fields are added.  This specific case includes
// fields that are allocated from a pool and need to be released.  Anyone who
// is contemplating copying this pattern should think REALLY hard about almost
// any other option.
func dropTypeDependentFields(newSvc *api.Service, oldSvc *api.Service) {}

func needsClusterIP(svc *api.Service) bool {}

func sameClusterIPs(oldSvc, newSvc *api.Service) bool {}

func sameIPFamilies(oldSvc, newSvc *api.Service) bool {}

func getIPFamilyPolicy(svc *api.Service) string {}

func sameIPFamilyPolicy(oldSvc, newSvc *api.Service) bool {}

func needsNodePort(svc *api.Service) bool {}

func sameNodePorts(oldSvc, newSvc *api.Service) bool {}

func needsHCNodePort(svc *api.Service) bool {}

func sameHCNodePort(oldSvc, newSvc *api.Service) bool {}

func canSetLoadBalancerClass(svc *api.Service) bool {}

func sameLoadBalancerClass(oldSvc, newSvc *api.Service) bool {}

func sameExternalTrafficPolicy(oldSvc, newSvc *api.Service) bool {}