mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #88438 from taesunny/pkg/apis
Fix: pkg/apis Typos in comments, function name, error message
This commit is contained in:
commit
4624f7a422
@ -608,7 +608,7 @@ func TestSetDefaultReplicationControllerInitContainers(t *testing.T) {
|
|||||||
|
|
||||||
assertImagePullPolicy := func(got, expected *v1.Container) error {
|
assertImagePullPolicy := func(got, expected *v1.Container) error {
|
||||||
if got.ImagePullPolicy != expected.ImagePullPolicy {
|
if got.ImagePullPolicy != expected.ImagePullPolicy {
|
||||||
return fmt.Errorf("different image pull poicy: got <%v>, expected <%v>", got.ImagePullPolicy, expected.ImagePullPolicy)
|
return fmt.Errorf("different image pull policy: got <%v>, expected <%v>", got.ImagePullPolicy, expected.ImagePullPolicy)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -1375,7 +1375,7 @@ func TestSetDefaultPersistentVolumeClaim(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSetDefaulEndpointsProtocol(t *testing.T) {
|
func TestSetDefaultEndpointsProtocol(t *testing.T) {
|
||||||
in := &v1.Endpoints{Subsets: []v1.EndpointSubset{
|
in := &v1.Endpoints{Subsets: []v1.EndpointSubset{
|
||||||
{Ports: []v1.EndpointPort{{}, {Protocol: "UDP"}, {}}},
|
{Ports: []v1.EndpointPort{{}, {Protocol: "UDP"}, {}}},
|
||||||
}}
|
}}
|
||||||
@ -1397,7 +1397,7 @@ func TestSetDefaulEndpointsProtocol(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSetDefaulServiceTargetPort(t *testing.T) {
|
func TestSetDefaultServiceTargetPort(t *testing.T) {
|
||||||
in := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{Port: 1234}}}}
|
in := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{Port: 1234}}}}
|
||||||
obj := roundTrip(t, runtime.Object(in))
|
obj := roundTrip(t, runtime.Object(in))
|
||||||
out := obj.(*v1.Service)
|
out := obj.(*v1.Service)
|
||||||
@ -1457,7 +1457,7 @@ func TestSetDefaultServicePort(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSetDefaulServiceExternalTraffic(t *testing.T) {
|
func TestSetDefaultServiceExternalTraffic(t *testing.T) {
|
||||||
in := &v1.Service{}
|
in := &v1.Service{}
|
||||||
obj := roundTrip(t, runtime.Object(in))
|
obj := roundTrip(t, runtime.Object(in))
|
||||||
out := obj.(*v1.Service)
|
out := obj.(*v1.Service)
|
||||||
|
@ -33,7 +33,7 @@ func init() {
|
|||||||
localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs)
|
localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove these global varialbes
|
// TODO: remove these global variables
|
||||||
// GroupName is the group name use in this package
|
// GroupName is the group name use in this package
|
||||||
const GroupName = ""
|
const GroupName = ""
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ func ValidatePriorityLevelConfigurationSpec(spec *flowcontrol.PriorityLevelConfi
|
|||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateLimitedPriorityLevelConfiguration validates the configuration for an exeuction-limited priority level
|
// ValidateLimitedPriorityLevelConfiguration validates the configuration for an execution-limited priority level
|
||||||
func ValidateLimitedPriorityLevelConfiguration(lplc *flowcontrol.LimitedPriorityLevelConfiguration, fldPath *field.Path) field.ErrorList {
|
func ValidateLimitedPriorityLevelConfiguration(lplc *flowcontrol.LimitedPriorityLevelConfiguration, fldPath *field.Path) field.ErrorList {
|
||||||
var allErrs field.ErrorList
|
var allErrs field.ErrorList
|
||||||
if lplc.AssuredConcurrencyShares <= 0 {
|
if lplc.AssuredConcurrencyShares <= 0 {
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ResourceMatches returns the result of the rule.Resaurces matching.
|
// ResourceMatches returns the result of the rule.Resources matching.
|
||||||
func ResourceMatches(rule *PolicyRule, combinedRequestedResource, requestedSubresource string) bool {
|
func ResourceMatches(rule *PolicyRule, combinedRequestedResource, requestedSubresource string) bool {
|
||||||
for _, ruleResource := range rule.Resources {
|
for _, ruleResource := range rule.Resources {
|
||||||
// if everything is allowed, we match
|
// if everything is allowed, we match
|
||||||
|
Loading…
Reference in New Issue
Block a user