func (strategy svcStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) {
	service := obj.(*api.Service)
	service.Status = api.ServiceStatus{}

	if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && service.Spec.IPFamily == nil {
		family := strategy.ipFamilies[0]
		service.Spec.IPFamily = &family
	}

	dropServiceDisabledFields(service, nil)
}
// PrepareForCreate sets contextual defaults and clears fields that are not allowed to be set by end users on creation.
PrepareForCreate sets contextual defaults and clears fields that are not allowed to be set by end users on creation.
// PrepareForCreate sets contextual defaults and clears fields that are not allowed to be set by end users on creation .
func (strategy svcStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) {
	service := obj.(*api.Service)
	service.Status = api.ServiceStatus{}
	if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && service.Spec.IPFamily == nil {
		family := strategy.ipFamilies[0]
		service.Spec.IPFamily = &family
	}
	dropServiceDisabledFields(service, nil)
}
func ( strategy svcStrategy ) PrepareForCreate ( ctx context . Context , obj runtime . Object ) { service := obj . ( * api . Service ) service . Status = api . ServiceStatus { } if utilfeature . DefaultFeatureGate . Enabled ( features . IPv6DualStack ) && service . Spec . IPFamily == nil { family := strategy . ipFamilies [ 0 ] service . Spec . IPFamily = & family } dropServiceDisabledFields ( service , nil ) }
PrepareForCreate sets contextual defaults and clears fields that are not allowed to be set by end users on creation.
PrepareForCreate sets contextual defaults and clears fields that are not allowed to be set by end users on creation .