Spell fixes across code (#2288)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -299,7 +299,7 @@ func StartExecutor(ctx context.Context, logger *zap.Logger, functionNamespace st
|
||||
funcInformer, pkgInformer, envInformer,
|
||||
gpmPodInformer, gpmRsInformer)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "pool manager creation faied")
|
||||
return errors.Wrap(err, "pool manager creation failed")
|
||||
}
|
||||
|
||||
ndmInformerFactory, err := utils.GetInformerFactoryByExecutor(kubernetesClient, fv1.ExecutorTypeNewdeploy, time.Minute*30)
|
||||
@@ -315,7 +315,7 @@ func StartExecutor(ctx context.Context, logger *zap.Logger, functionNamespace st
|
||||
funcInformer, envInformer,
|
||||
ndmDeplInformer, ndmSvcInformer)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "new deploy manager creation faied")
|
||||
return errors.Wrap(err, "new deploy manager creation failed")
|
||||
}
|
||||
|
||||
cnmInformerFactory, err := utils.GetInformerFactoryByExecutor(kubernetesClient, fv1.ExecutorTypeContainer, time.Minute*30)
|
||||
@@ -330,7 +330,7 @@ func StartExecutor(ctx context.Context, logger *zap.Logger, functionNamespace st
|
||||
functionNamespace, executorInstanceID, funcInformer,
|
||||
cnmDeplInformer, cnmSvcInformer)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "container manager creation faied")
|
||||
return errors.Wrap(err, "container manager creation failed")
|
||||
}
|
||||
|
||||
executorTypes := make(map[fv1.ExecutorType]executortype.ExecutorType)
|
||||
|
||||
@@ -664,7 +664,7 @@ func (caaf *Container) getObjName(fn *fv1.Function) string {
|
||||
functionMetadata = functionMetadata + "-" + fn.ObjectMeta.Namespace
|
||||
}
|
||||
}
|
||||
// contructed name should be 63 characters long, as it is a valid k8s name
|
||||
// constructed name should be 63 characters long, as it is a valid k8s name
|
||||
// functionMetadata should be 35 characters long, as we take 17 characters from functionUid
|
||||
// with newdeploy 10 character prefix
|
||||
return strings.ToLower(fmt.Sprintf("container-%s-%s", functionMetadata, uid))
|
||||
|
||||
@@ -123,7 +123,7 @@ func (cn *Container) updateDeployment(ctx context.Context, deployment *appsv1.De
|
||||
|
||||
func (cn *Container) deleteDeployment(ctx context.Context, ns string, name string) error {
|
||||
// DeletePropagationBackground deletes the object immediately and dependent are deleted later
|
||||
// DeletePropagationForeground not advisable; it marks for deleteion and API can still serve those objects
|
||||
// DeletePropagationForeground not advisable; it marks for deletion and API can still serve those objects
|
||||
deletePropagation := metav1.DeletePropagationBackground
|
||||
return cn.kubernetesClient.AppsV1().Deployments(ns).Delete(ctx, name, metav1.DeleteOptions{
|
||||
PropagationPolicy: &deletePropagation,
|
||||
|
||||
@@ -174,7 +174,7 @@ func (deploy *NewDeploy) updateDeployment(ctx context.Context, deployment *appsv
|
||||
|
||||
func (deploy *NewDeploy) deleteDeployment(ctx context.Context, ns string, name string) error {
|
||||
// DeletePropagationBackground deletes the object immediately and dependent are deleted later
|
||||
// DeletePropagationForeground not advisable; it marks for deleteion and API can still serve those objects
|
||||
// DeletePropagationForeground not advisable; it marks for deletion and API can still serve those objects
|
||||
deletePropagation := metav1.DeletePropagationBackground
|
||||
return deploy.kubernetesClient.AppsV1().Deployments(ns).Delete(ctx, name, metav1.DeleteOptions{
|
||||
PropagationPolicy: &deletePropagation,
|
||||
|
||||
@@ -712,7 +712,7 @@ func (deploy *NewDeploy) getObjName(fn *fv1.Function) string {
|
||||
functionMetadata = functionMetadata + "-" + fn.ObjectMeta.Namespace
|
||||
}
|
||||
}
|
||||
// contructed name should be 63 characters long, as it is a valid k8s name
|
||||
// constructed name should be 63 characters long, as it is a valid k8s name
|
||||
// functionMetadata should be 35 characters long, as we take 17 characters from functionUid
|
||||
// with newdeploy 10 character prefix
|
||||
return strings.ToLower(fmt.Sprintf("newdeploy-%s-%s", functionMetadata, uid))
|
||||
|
||||
@@ -174,7 +174,7 @@ func (gp *GenericPool) getDeployAnnotations(env *fv1.Environment) map[string]str
|
||||
func (gp *GenericPool) checkMetricsApi() bool {
|
||||
apiGroups, err := gp.metricsClient.DiscoveryClient.ServerGroups()
|
||||
if err != nil {
|
||||
gp.logger.Error("faied to discover API groups", zap.Error(err))
|
||||
gp.logger.Error("failed to discover API groups", zap.Error(err))
|
||||
return false
|
||||
}
|
||||
return utils.SupportedMetricsAPIVersionAvailable(apiGroups)
|
||||
|
||||
@@ -690,7 +690,7 @@ func (gpm *GenericPoolManager) WebsocketStartEventChecker(kubeClient *kubernetes
|
||||
if fsvc, ok := gpm.fsCache.PodToFsvc.Load(strings.TrimSuffix(podName[0], ".")); ok {
|
||||
fsvc, ok := fsvc.(*fscache.FuncSvc)
|
||||
if !ok {
|
||||
gpm.logger.Error("could not covert item from PodToFsvc")
|
||||
gpm.logger.Error("could not convert item from PodToFsvc")
|
||||
return
|
||||
}
|
||||
gpm.fsCache.WebsocketFsvc.Store(fsvc.Name, true)
|
||||
@@ -731,7 +731,7 @@ func (gpm *GenericPoolManager) NoActiveConnectionEventChecker(kubeClient *kubern
|
||||
if fsvc, ok := gpm.fsCache.PodToFsvc.Load(strings.TrimSuffix(podName[0], ".")); ok {
|
||||
fsvc, ok := fsvc.(*fscache.FuncSvc)
|
||||
if !ok {
|
||||
gpm.logger.Error("could not covert value from PodToFsvc")
|
||||
gpm.logger.Error("could not convert value from PodToFsvc")
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
|
||||
@@ -174,7 +174,7 @@ func (p *PoolPodController) handleRSDelete(obj interface{}) {
|
||||
if !ok {
|
||||
tombstone, ok := obj.(k8sCache.DeletedFinalStateUnknown)
|
||||
if !ok {
|
||||
p.logger.Error("couldnt get object from tombstone", zap.Any("obj", obj))
|
||||
p.logger.Error("couldn't get object from tombstone", zap.Any("obj", obj))
|
||||
return
|
||||
}
|
||||
rs, ok = tombstone.Obj.(*apps.ReplicaSet)
|
||||
@@ -411,7 +411,7 @@ func (p *PoolPodController) spCleanupPodQueueProcessFunc() bool {
|
||||
p.gpm.fsCache.DeleteFunctionSvc(ctx, fsvc)
|
||||
p.gpm.fsCache.DeleteEntry(fsvc)
|
||||
} else {
|
||||
p.logger.Error("could not covert item from PodToFsvc", zap.String("key", key))
|
||||
p.logger.Error("could not convert item from PodToFsvc", zap.String("key", key))
|
||||
}
|
||||
}
|
||||
err = p.kubernetesClient.CoreV1().Pods(p.namespace).Delete(context.TODO(), pod.Name, metav1.DeleteOptions{})
|
||||
|
||||
@@ -401,7 +401,7 @@ func (fsc *FunctionServiceCache) ListOld(age time.Duration) ([]*FuncSvc, error)
|
||||
return resp.objects, resp.error
|
||||
}
|
||||
|
||||
// ListOldForPool returns a list of aged function serices in cache for pooling.
|
||||
// ListOldForPool returns a list of aged function services in cache for pooling.
|
||||
func (fsc *FunctionServiceCache) ListOldForPool(age time.Duration) ([]*FuncSvc, error) {
|
||||
responseChannel := make(chan *fscResponse)
|
||||
fsc.requestChannel <- &fscRequest{
|
||||
|
||||
Reference in New Issue
Block a user