From d2161c21d710b9c312cf851b14aa18caf1c33952 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowak Date: Tue, 4 Oct 2016 17:51:14 +0200 Subject: [PATCH] Fix typos and englishify plugin/pkg --- plugin/pkg/admission/initialresources/data_source.go | 6 +++--- plugin/pkg/admission/resourcequota/controller.go | 4 ++-- plugin/pkg/auth/authenticator/token/oidc/oidc.go | 4 ++-- .../pkg/scheduler/algorithm/predicates/predicates_test.go | 2 +- plugin/pkg/scheduler/algorithm/priorities/priorities.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugin/pkg/admission/initialresources/data_source.go b/plugin/pkg/admission/initialresources/data_source.go index d97415d005c..5fd6c118fb1 100644 --- a/plugin/pkg/admission/initialresources/data_source.go +++ b/plugin/pkg/admission/initialresources/data_source.go @@ -25,11 +25,11 @@ import ( ) var ( - influxdbHost = flag.String("ir-influxdb-host", "localhost:8080/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb:api", "Address of InfluxDB which contains metrics requred by InitialResources") + influxdbHost = flag.String("ir-influxdb-host", "localhost:8080/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb:api", "Address of InfluxDB which contains metrics required by InitialResources") user = flag.String("ir-user", "root", "User used for connecting to InfluxDB") // TODO: figure out how to better pass password here password = flag.String("ir-password", "root", "Password used for connecting to InfluxDB") - db = flag.String("ir-dbname", "k8s", "InfluxDB database name which contains metrics requred by InitialResources") + db = flag.String("ir-dbname", "k8s", "InfluxDB database name which contains metrics required by InitialResources") hawkularConfig = flag.String("ir-hawkular", "", "Hawkular configuration URL") ) @@ -37,7 +37,7 @@ var ( // that dataSource will be moved to Heapster some time in the future and possibly rewritten. type dataSource interface { // Returns th of sample values which represent usage of for containers running , - // withing time range (start, end), number of samples considered and error if occured. + // within time range (start, end), number of samples considered and error if occurred. // If then take only samples that concern the same image (both name and take are the same), // otherwise consider also samples with the same image a possibly different tag. GetUsagePercentile(kind api.ResourceName, perc int64, image, namespace string, exactMatch bool, start, end time.Time) (usage int64, samples int64, err error) diff --git a/plugin/pkg/admission/resourcequota/controller.go b/plugin/pkg/admission/resourcequota/controller.go index bddba3d4bed..dbb050c3567 100644 --- a/plugin/pkg/admission/resourcequota/controller.go +++ b/plugin/pkg/admission/resourcequota/controller.go @@ -315,7 +315,7 @@ func copyQuotas(in []api.ResourceQuota) ([]api.ResourceQuota, error) { return out, nil } -// checkRequest verifies that the request does not exceed any quota constraint. it returns back a copy of quotas not yet persisted +// checkRequest verifies that the request does not exceed any quota constraint. it returns a copy of quotas not yet persisted // that capture what the usage would be if the request succeeded. It return an error if the is insufficient quota to satisfy the request func (e *quotaEvaluator) checkRequest(quotas []api.ResourceQuota, a admission.Attributes) ([]api.ResourceQuota, error) { namespace := a.GetNamespace() @@ -360,7 +360,7 @@ func (e *quotaEvaluator) checkRequest(quotas []api.ResourceQuota, a admission.At return quotas, nil } - // Usage of some resources cannot be counted in isolation. For example when + // Usage of some resources cannot be counted in isolation. For example, when // the resource represents a number of unique references to external // resource. In such a case an evaluator needs to process other objects in // the same namespace which needs to be known. diff --git a/plugin/pkg/auth/authenticator/token/oidc/oidc.go b/plugin/pkg/auth/authenticator/token/oidc/oidc.go index 21d38d8f89c..c0ea2242161 100644 --- a/plugin/pkg/auth/authenticator/token/oidc/oidc.go +++ b/plugin/pkg/auth/authenticator/token/oidc/oidc.go @@ -72,7 +72,7 @@ type OIDCOptions struct { UsernameClaim string // GroupsClaim, if specified, causes the OIDCAuthenticator to try to populate the user's - // groups with a ID Token field. If the GrouppClaim field is present in a ID Token the value + // groups with an ID Token field. If the GrouppClaim field is present in an ID Token the value // must be a string or list of strings. GroupsClaim string } @@ -206,7 +206,7 @@ func (a *OIDCAuthenticator) client() (*oidc.Client, error) { return client, nil } -// AuthenticateToken decodes and verifies a ID Token using the OIDC client, if the verification succeeds, +// AuthenticateToken decodes and verifies an ID Token using the OIDC client, if the verification succeeds, // then it will extract the user info from the JWT claims. func (a *OIDCAuthenticator) AuthenticateToken(value string) (user.Info, bool, error) { jwt, err := jose.ParseJWT(value) diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go index 47a1ea714b0..4e222bf3c6f 100755 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go @@ -2022,7 +2022,7 @@ func TestInterPodAffinity(t *testing.T) { pods: []*api.Pod{{Spec: api.PodSpec{NodeName: "machine1"}, ObjectMeta: api.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: false, - test: "The labelSelector requirements(items of matchExpressions) are ANDed, the pod cannot schedule onto the node becasue one of the matchExpression item don't match.", + test: "The labelSelector requirements(items of matchExpressions) are ANDed, the pod cannot schedule onto the node because one of the matchExpression item don't match.", }, { pod: &api.Pod{ diff --git a/plugin/pkg/scheduler/algorithm/priorities/priorities.go b/plugin/pkg/scheduler/algorithm/priorities/priorities.go index 52b92c8c4d7..55b175e8f55 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/priorities.go +++ b/plugin/pkg/scheduler/algorithm/priorities/priorities.go @@ -297,7 +297,7 @@ func calculateBalancedResourceAllocation(pod *api.Pod, podRequests *schedulercac memoryFraction := fractionOfCapacity(totalResources.Memory, allocatableResources.Memory) score := int(0) if cpuFraction >= 1 || memoryFraction >= 1 { - // if requested >= capacity, the corresponding host should never be preferrred. + // if requested >= capacity, the corresponding host should never be preferred. score = 0 } else { // Upper and lower boundary of difference between cpuFraction and memoryFraction are -1 and 1