From 6aaad9390851d2796696c0a30db9d6a26fb66390 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowak Date: Thu, 8 Sep 2016 13:45:31 +0200 Subject: [PATCH] Typos and englishify federation --- federation/apis/core/register.go | 4 ++-- federation/apis/federation/register.go | 4 ++-- federation/apis/federation/types.go | 4 ++-- federation/apis/federation/v1beta1/generated.proto | 2 +- federation/apis/federation/v1beta1/types.go | 2 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../providers/aws/route53/stubs/route53api.go | 6 +++--- .../google/clouddns/internal/stubs/clouddns.go | 2 +- .../internal/stubs/managed_zones_delete_call.go | 2 +- .../internal/stubs/managed_zones_get_call.go | 4 ++-- .../internal/stubs/managed_zones_list_call.go | 4 ++-- .../ingress/ingress_controller.go | 14 +++++++------- .../namespace/namespace_controller.go | 14 +++++++------- .../replicaset/planner/planner.go | 2 +- .../secret/secret_controller.go | 14 +++++++------- .../pkg/federation-controller/service/dns.go | 4 ++-- .../pkg/federation-controller/util/cluster_util.go | 6 +++--- .../util/federated_informer_test.go | 2 +- 18 files changed, 46 insertions(+), 46 deletions(-) diff --git a/federation/apis/core/register.go b/federation/apis/core/register.go index e66c7b5adf3..13269045081 100644 --- a/federation/apis/core/register.go +++ b/federation/apis/core/register.go @@ -42,12 +42,12 @@ var Unversioned = unversioned.GroupVersion{Group: "", Version: "v1"} // ParameterCodec handles versioning of objects that are converted to query parameters. var ParameterCodec = runtime.NewParameterCodec(Scheme) -// Kind takes an unqualified kind and returns back a Group qualified GroupKind +// Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) unversioned.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } -// Resource takes an unqualified resource and returns back a Group qualified GroupResource +// Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) unversioned.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } diff --git a/federation/apis/federation/register.go b/federation/apis/federation/register.go index 4e19b94013b..b8542792500 100644 --- a/federation/apis/federation/register.go +++ b/federation/apis/federation/register.go @@ -28,12 +28,12 @@ const GroupName = "federation" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} -// Kind takes an unqualified kind and returns back a Group qualified GroupKind +// Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) unversioned.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } -// Resource takes an unqualified resource and returns back a Group qualified GroupResource +// Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) unversioned.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } diff --git a/federation/apis/federation/types.go b/federation/apis/federation/types.go index 7e3c66348c7..e8943887ff9 100644 --- a/federation/apis/federation/types.go +++ b/federation/apis/federation/types.go @@ -75,7 +75,7 @@ type ClusterCondition struct { type ClusterStatus struct { // Conditions is an array of current cluster conditions. Conditions []ClusterCondition `json:"conditions,omitempty"` - // Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. + // Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. // These will always be in the same region. Zones []string `json:"zones,omitempty"` // Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'. @@ -109,7 +109,7 @@ type ClusterList struct { Items []Cluster `json:"items"` } -// Temporary/alpha stuctures to support custom replica assignments within FederatedReplicaSet. +// Temporary/alpha structures to support custom replica assignments within FederatedReplicaSet. // A set of preferences that can be added to federated version of ReplicaSet as a json-serialized annotation. // The preferences allow the user to express in which culsters he wants to put his replicas within the diff --git a/federation/apis/federation/v1beta1/generated.proto b/federation/apis/federation/v1beta1/generated.proto index 2eef53fe7e4..30c5533c2d1 100644 --- a/federation/apis/federation/v1beta1/generated.proto +++ b/federation/apis/federation/v1beta1/generated.proto @@ -95,7 +95,7 @@ message ClusterStatus { // Conditions is an array of current cluster conditions. repeated ClusterCondition conditions = 1; - // Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. + // Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. // These will always be in the same region. repeated string zones = 5; diff --git a/federation/apis/federation/v1beta1/types.go b/federation/apis/federation/v1beta1/types.go index a69608b204c..f9853bfab34 100644 --- a/federation/apis/federation/v1beta1/types.go +++ b/federation/apis/federation/v1beta1/types.go @@ -75,7 +75,7 @@ type ClusterCondition struct { type ClusterStatus struct { // Conditions is an array of current cluster conditions. Conditions []ClusterCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` - // Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. + // Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. // These will always be in the same region. Zones []string `json:"zones,omitempty" protobuf:"bytes,5,rep,name=zones"` // Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'. diff --git a/federation/apis/federation/v1beta1/types_swagger_doc_generated.go b/federation/apis/federation/v1beta1/types_swagger_doc_generated.go index 7c49777fb98..55985fcb8ce 100644 --- a/federation/apis/federation/v1beta1/types_swagger_doc_generated.go +++ b/federation/apis/federation/v1beta1/types_swagger_doc_generated.go @@ -75,7 +75,7 @@ func (ClusterSpec) SwaggerDoc() map[string]string { var map_ClusterStatus = map[string]string{ "": "ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.", "conditions": "Conditions is an array of current cluster conditions.", - "zones": "Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. These will always be in the same region.", + "zones": "Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. These will always be in the same region.", "region": "Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.", } diff --git a/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go b/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go index 2ec39801b08..82d4f6eb4fd 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go @@ -37,7 +37,7 @@ type Route53API interface { // Route53APIStub is a minimal implementation of Route53API, used primarily for unit testing. // See http://http://docs.aws.amazon.com/sdk-for-go/api/service/route53.html for descriptions -// of all of it's methods. +// of all of its methods. type Route53APIStub struct { zones map[string]*route53.HostedZone recordSets map[string]map[string][]*route53.ResourceRecordSet @@ -86,7 +86,7 @@ func (r *Route53APIStub) ChangeResourceRecordSets(input *route53.ChangeResourceR recordSets[key] = append(recordSets[key], change.ResourceRecordSet) case route53.ChangeActionDelete: if _, found := recordSets[key]; !found { - return nil, fmt.Errorf("Attempt to delete non-existant rrset %s", key) // TODO: Check other fields too + return nil, fmt.Errorf("Attempt to delete non-existent rrset %s", key) // TODO: Check other fields too } delete(recordSets, key) case route53.ChangeActionUpsert: @@ -94,7 +94,7 @@ func (r *Route53APIStub) ChangeResourceRecordSets(input *route53.ChangeResourceR } } r.recordSets[*input.HostedZoneId] = recordSets - return output, nil // TODO: We should ideally return status etc, but we dont' use that yet. + return output, nil // TODO: We should ideally return status etc, but we don't' use that yet. } func (r *Route53APIStub) ListHostedZonesPages(input *route53.ListHostedZonesInput, fn func(p *route53.ListHostedZonesOutput, lastPage bool) (shouldContinue bool)) error { diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/clouddns.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/clouddns.go index e89e9dda7cf..e870ee4091e 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/clouddns.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/clouddns.go @@ -25,7 +25,7 @@ package stubs import dns "google.golang.org/api/dns/v1" type ( - // TODO: We dont' need these yet, so they remain unimplemented. Add later as required. + // TODO: We don't need these yet, so they remain unimplemented. Add later as required. Project struct{ impl *dns.Project } ProjectsGetCall struct{ impl *dns.ProjectsGetCall } ProjectsService struct{ impl *dns.ProjectsService } diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_delete_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_delete_call.go index 57bedf4df94..15674b41f67 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_delete_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_delete_call.go @@ -30,7 +30,7 @@ type ManagedZonesDeleteCall struct { Service *ManagedZonesService Project string ZoneName string - Error *error // Use this to overide response for testing if required + Error *error // Use this to override response for testing if required } func (call ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error { diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_get_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_get_call.go index 0b6750f6631..e85c43be844 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_get_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_get_call.go @@ -28,8 +28,8 @@ type ManagedZonesGetCall struct { Service *ManagedZonesService Project string ZoneName string - Response interfaces.ManagedZone // Use this to overide response if required - Error *error // Use this to overide response if required + Response interfaces.ManagedZone // Use this to override response if required + Error *error // Use this to override response if required DnsName_ string } diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_call.go index 9aeed9decea..79a87da1356 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_call.go @@ -29,8 +29,8 @@ var _ interfaces.ManagedZonesListCall = &ManagedZonesListCall{} type ManagedZonesListCall struct { Service *ManagedZonesService Project string - Response *interfaces.ManagedZonesListResponse // Use this to overide response if required - Error *error // Use this to overide response if required + Response *interfaces.ManagedZonesListResponse // Use this to override response if required + Error *error // Use this to override response if required DnsName_ string } diff --git a/federation/pkg/federation-controller/ingress/ingress_controller.go b/federation/pkg/federation-controller/ingress/ingress_controller.go index 53f7cb2d359..a1182f6a9dc 100644 --- a/federation/pkg/federation-controller/ingress/ingress_controller.go +++ b/federation/pkg/federation-controller/ingress/ingress_controller.go @@ -45,12 +45,12 @@ const ( ) type IngressController struct { - // For triggering single ingress reconcilation. This is used when there is an + // For triggering single ingress reconciliation. This is used when there is an // add/update/delete operation on an ingress in either federated API server or // in some member of the federation. ingressDeliverer *util.DelayingDeliverer - // For triggering reconcilation of all ingresses. This is used when + // For triggering reconciliation of all ingresses. This is used when // a new cluster becomes available. clusterDeliverer *util.DelayingDeliverer @@ -94,7 +94,7 @@ func NewIngressController(client federation_release_1_4.Interface) *IngressContr eventRecorder: recorder, } - // Build deliverers for triggering reconcilations. + // Build deliverers for triggering reconciliations. ic.ingressDeliverer = util.NewDelayingDeliverer() ic.clusterDeliverer = util.NewDelayingDeliverer() @@ -131,8 +131,8 @@ func NewIngressController(client federation_release_1_4.Interface) *IngressContr }, &extensions_v1beta1.Ingress{}, controller.NoResyncPeriodFunc(), - // Trigger reconcilation whenever something in federated cluster is changed. In most cases it - // would be just confirmation that some ingress operation suceeded. + // Trigger reconciliation whenever something in federated cluster is changed. In most cases it + // would be just confirmation that some ingress operation succeeded. util.NewTriggerOnAllChanges( func(obj pkg_runtime.Object) { ic.deliverIngressObj(obj, ic.ingressReviewDelay, false) @@ -219,7 +219,7 @@ func (ic *IngressController) deliverIngress(ingress types.NamespacedName, delay } // Check whether all data stores are in sync. False is returned if any of the informer/stores is not yet -// synced with the coresponding api server. +// synced with the corresponding api server. func (ic *IngressController) isSynced() bool { if !ic.ingressFederatedInformer.ClustersSynced() { glog.V(2).Infof("Cluster list not synced") @@ -238,7 +238,7 @@ func (ic *IngressController) isSynced() bool { return true } -// The function triggers reconcilation of all federated ingresses. +// The function triggers reconciliation of all federated ingresses. func (ic *IngressController) reconcileIngressesOnClusterChange() { glog.V(4).Infof("Reconciling ingresses on cluster change") if !ic.isSynced() { diff --git a/federation/pkg/federation-controller/namespace/namespace_controller.go b/federation/pkg/federation-controller/namespace/namespace_controller.go index b8296bc449f..9cff882c66a 100644 --- a/federation/pkg/federation-controller/namespace/namespace_controller.go +++ b/federation/pkg/federation-controller/namespace/namespace_controller.go @@ -46,12 +46,12 @@ const ( ) type NamespaceController struct { - // For triggering single namespace reconcilation. This is used when there is an + // For triggering single namespace reconciliation. This is used when there is an // add/update/delete operation on a namespace in either federated API server or // in some member of the federation. namespaceDeliverer *util.DelayingDeliverer - // For triggering all namespaces reconcilation. This is used when + // For triggering all namespaces reconciliation. This is used when // a new cluster becomes available. clusterDeliverer *util.DelayingDeliverer @@ -95,7 +95,7 @@ func NewNamespaceController(client federation_release_1_4.Interface) *NamespaceC eventRecorder: recorder, } - // Build delivereres for triggering reconcilations. + // Build delivereres for triggering reconciliations. nc.namespaceDeliverer = util.NewDelayingDeliverer() nc.clusterDeliverer = util.NewDelayingDeliverer() @@ -128,8 +128,8 @@ func NewNamespaceController(client federation_release_1_4.Interface) *NamespaceC }, &api_v1.Namespace{}, controller.NoResyncPeriodFunc(), - // Trigger reconcilation whenever something in federated cluster is changed. In most cases it - // would be just confirmation that some namespace opration suceeded. + // Trigger reconciliation whenever something in federated cluster is changed. In most cases it + // would be just confirmation that some namespace opration succeeded. util.NewTriggerOnMetaAndSpecChanges( func(obj pkg_runtime.Object) { nc.deliverNamespaceObj(obj, nc.namespaceReviewDelay, false) }, )) @@ -204,7 +204,7 @@ func (nc *NamespaceController) deliverNamespace(namespace string, delay time.Dur } // Check whether all data stores are in sync. False is returned if any of the informer/stores is not yet -// synced with the coresponding api server. +// synced with the corresponding api server. func (nc *NamespaceController) isSynced() bool { if !nc.namespaceFederatedInformer.ClustersSynced() { glog.V(2).Infof("Cluster list not synced") @@ -221,7 +221,7 @@ func (nc *NamespaceController) isSynced() bool { return true } -// The function triggers reconcilation of all federated namespaces. +// The function triggers reconciliation of all federated namespaces. func (nc *NamespaceController) reconcileNamespacesOnClusterChange() { if !nc.isSynced() { nc.clusterDeliverer.DeliverAfter(allClustersKey, nil, nc.clusterAvailableDelay) diff --git a/federation/pkg/federation-controller/replicaset/planner/planner.go b/federation/pkg/federation-controller/replicaset/planner/planner.go index f13281808ac..38204c23f0d 100644 --- a/federation/pkg/federation-controller/replicaset/planner/planner.go +++ b/federation/pkg/federation-controller/replicaset/planner/planner.go @@ -54,7 +54,7 @@ func NewPlanner(preferences *fed_api.FederatedReplicaSetPreferences) *Planner { } // Distribute the desired number of replicas among the given cluster according to the planner preferences. -// The function tries its best to assign each cluster the prefered number of replicas, however if +// The function tries its best to assign each cluster the preferred number of replicas, however if // sum of MinReplicas for all cluster is bigger thant replicasToDistribute then some cluster will not // have all of the replicas assigned. In such case a cluster with higher weight has priority over // cluster with lower weight (or with lexicographically smaller name in case of draw). diff --git a/federation/pkg/federation-controller/secret/secret_controller.go b/federation/pkg/federation-controller/secret/secret_controller.go index 8326658a612..fe92e3db091 100644 --- a/federation/pkg/federation-controller/secret/secret_controller.go +++ b/federation/pkg/federation-controller/secret/secret_controller.go @@ -44,12 +44,12 @@ const ( ) type SecretController struct { - // For triggering single secret reconcilation. This is used when there is an + // For triggering single secret reconciliation. This is used when there is an // add/update/delete operation on a secret in either federated API server or // in some member of the federation. secretDeliverer *util.DelayingDeliverer - // For triggering all secrets reconcilation. This is used when + // For triggering all secrets reconciliation. This is used when // a new cluster becomes available. clusterDeliverer *util.DelayingDeliverer @@ -93,7 +93,7 @@ func NewSecretController(client federation_release_1_4.Interface) *SecretControl eventRecorder: recorder, } - // Build delivereres for triggering reconcilations. + // Build delivereres for triggering reconciliations. secretcontroller.secretDeliverer = util.NewDelayingDeliverer() secretcontroller.clusterDeliverer = util.NewDelayingDeliverer() @@ -126,8 +126,8 @@ func NewSecretController(client federation_release_1_4.Interface) *SecretControl }, &api_v1.Secret{}, controller.NoResyncPeriodFunc(), - // Trigger reconcilation whenever something in federated cluster is changed. In most cases it - // would be just confirmation that some secret opration suceeded. + // Trigger reconciliation whenever something in federated cluster is changed. In most cases it + // would be just confirmation that some secret opration succeeded. util.NewTriggerOnAllChanges( func(obj pkg_runtime.Object) { secretcontroller.deliverSecretObj(obj, secretcontroller.secretReviewDelay, false) @@ -216,7 +216,7 @@ func (secretcontroller *SecretController) deliverSecret(namespace string, name s } // Check whether all data stores are in sync. False is returned if any of the informer/stores is not yet -// synced with the coresponding api server. +// synced with the corresponding api server. func (secretcontroller *SecretController) isSynced() bool { if !secretcontroller.secretFederatedInformer.ClustersSynced() { glog.V(2).Infof("Cluster list not synced") @@ -233,7 +233,7 @@ func (secretcontroller *SecretController) isSynced() bool { return true } -// The function triggers reconcilation of all federated secrets. +// The function triggers reconciliation of all federated secrets. func (secretcontroller *SecretController) reconcileSecretsOnClusterChange() { if !secretcontroller.isSynced() { secretcontroller.clusterDeliverer.DeliverAt(allClustersKey, nil, time.Now().Add(secretcontroller.clusterAvailableDelay)) diff --git a/federation/pkg/federation-controller/service/dns.go b/federation/pkg/federation-controller/service/dns.go index 81f29cd6636..ba91ccc8d23 100644 --- a/federation/pkg/federation-controller/service/dns.go +++ b/federation/pkg/federation-controller/service/dns.go @@ -126,7 +126,7 @@ func getRrset(dnsName string, rrsetsInterface dnsprovider.ResourceRecordSets) (d return returnVal, nil } -/* getResolvedEndpoints perfoms DNS resolution on the provided slice of endpoints (which might be DNS names or IPv4 addresses) +/* getResolvedEndpoints performs DNS resolution on the provided slice of endpoints (which might be DNS names or IPv4 addresses) and returns a list of IPv4 addresses. If any of the endpoints are neither valid IPv4 addresses nor resolvable DNS names, non-nil error is also returned (possibly along with a partially complete list of resolved endpoints. */ @@ -135,7 +135,7 @@ func getResolvedEndpoints(endpoints []string) ([]string, error) { for _, endpoint := range endpoints { if net.ParseIP(endpoint) == nil { // It's not a valid IP address, so assume it's a DNS name, and try to resolve it, - // replacing it's DNS name with it's IP addresses in expandedEndpoints + // replacing its DNS name with its IP addresses in expandedEndpoints ipAddrs, err := net.LookupHost(endpoint) if err != nil { return resolvedEndpoints, err diff --git a/federation/pkg/federation-controller/util/cluster_util.go b/federation/pkg/federation-controller/util/cluster_util.go index 7aafcf9b057..2fe504e3399 100644 --- a/federation/pkg/federation-controller/util/cluster_util.go +++ b/federation/pkg/federation-controller/util/cluster_util.go @@ -62,7 +62,7 @@ func BuildClusterConfig(c *federation_v1beta1.Cluster) (*restclient.Config, erro } if serverAddress != "" { if c.Spec.SecretRef == nil { - glog.Infof("didnt find secretRef for cluster %s. Trying insecure access", c.Name) + glog.Infof("didn't find secretRef for cluster %s. Trying insecure access", c.Name) clusterConfig, err = clientcmd.BuildConfigFromFlags(serverAddress, "") } else { kubeconfigGetter := KubeconfigGetterForCluster(c) @@ -78,14 +78,14 @@ func BuildClusterConfig(c *federation_v1beta1.Cluster) (*restclient.Config, erro } // This is to inject a different kubeconfigGetter in tests. -// We dont use the standard one which calls NewInCluster in tests to avoid having to setup service accounts and mount files with secret tokens. +// We don't use the standard one which calls NewInCluster in tests to avoid having to setup service accounts and mount files with secret tokens. var KubeconfigGetterForCluster = func(c *federation_v1beta1.Cluster) clientcmd.KubeconfigGetter { return func() (*clientcmdapi.Config, error) { secretRefName := "" if c.Spec.SecretRef != nil { secretRefName = c.Spec.SecretRef.Name } else { - glog.Infof("didnt find secretRef for cluster %s. Trying insecure access", c.Name) + glog.Infof("didn't find secretRef for cluster %s. Trying insecure access", c.Name) } return KubeconfigGetterForSecret(secretRefName)() } diff --git a/federation/pkg/federation-controller/util/federated_informer_test.go b/federation/pkg/federation-controller/util/federated_informer_test.go index e7d0bed2d62..fa341ef7248 100644 --- a/federation/pkg/federation-controller/util/federated_informer_test.go +++ b/federation/pkg/federation-controller/util/federated_informer_test.go @@ -36,7 +36,7 @@ import ( ) // Basic test for Federated Informer. Checks whether the subinformer are added and deleted -// when the corresponding cluster entries appear and dissapear from etcd. +// when the corresponding cluster entries appear and disappear from etcd. func TestFederatedInformer(t *testing.T) { fakeFederationClient := &fake_federation_release_1_4.Clientset{}