Spell fixes across code (#2288)

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2021-12-28 18:40:07 +05:30
committed by GitHub
parent 37609ad7ec
commit 327275d1a4
23 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ var (
func Run(ctx context.Context, logger *zap.Logger) {
flag.Usage = fetcherUsage
collectorEndpoint := flag.String("jaeger-collector-endpoint", "", "")
specializeOnStart := flag.Bool("specialize-on-startup", false, "Flag to activate specialize process at pod starup")
specializeOnStart := flag.Bool("specialize-on-startup", false, "Flag to activate specialize process at pod startup")
specializePayload := flag.String("specialize-request", "", "JSON payload for specialize request")
secretDir := flag.String("secret-dir", "", "Path to shared secrets directory")
configDir := flag.String("cfgmap-dir", "", "Path to shared configmap directory")
+1 -1
View File
@@ -457,7 +457,7 @@ func (config IngressConfig) Validate() error {
// In Ingress, to accept requests from all host, the host field will
// be an empty string instead of "*" shown in kubectl. The router replaces
// the asterisk with "" when creating/updateing the Ingress, so here we
// the asterisk with "" when creating/updating the Ingress, so here we
// skip the check if the Host is equal to "*".
if len(config.Host) > 0 && config.Host != "*" {
if strings.Contains(config.Host, "*") {
+1 -1
View File
@@ -165,7 +165,7 @@ func (pkgw *packageWatcher) build(ctx context.Context, srcpkg *fv1.Package) {
}
// Add the package getter rolebinding to builder sa
// we continue here if role binding was not setup successfully. this is because without this, the fetcher wont be able to fetch the source pkg into the container and
// we continue here if role binding was not setup successfully. this is because without this, the fetcher won't be able to fetch the source pkg into the container and
// the build will fail eventually
err := utils.SetupRoleBinding(ctx, pkgw.logger, pkgw.k8sClient, fv1.PackageGetterRB, pkg.ObjectMeta.Namespace, fv1.PackageGetterCR, fv1.ClusterRole, fv1.FissionBuilderSA, builderNs)
if err != nil {
+3 -3
View File
@@ -77,7 +77,7 @@ func MakeCanaryConfigMgr(logger *zap.Logger, fissionClient *crd.FissionClient, k
_, err := url.Parse(prometheusSvc)
if err != nil {
return nil, errors.Errorf("prometheus service url not found/invalid, cant create canary config manager: %v", prometheusSvc)
return nil, errors.Errorf("prometheus service url not found/invalid, can't create canary config manager: %v", prometheusSvc)
}
promClient, err := MakePrometheusClient(logger, prometheusSvc)
@@ -140,7 +140,7 @@ func (canaryCfgMgr *canaryConfigMgr) addCanaryConfig(canaryConfig *fv1.CanaryCon
// for each canary config, create a ticker with increment interval
interval, err := time.ParseDuration(canaryConfig.Spec.WeightIncrementDuration)
if err != nil {
canaryCfgMgr.logger.Error("error parsing duration - cant proceed with this canaryConfig",
canaryCfgMgr.logger.Error("error parsing duration - can't proceed with this canaryConfig",
zap.Error(err),
zap.String("duration", canaryConfig.Spec.WeightIncrementDuration),
zap.String("name", canaryConfig.ObjectMeta.Name),
@@ -351,7 +351,7 @@ func (canaryCfgMgr *canaryConfigMgr) RollForwardOrBack(canaryConfig *fv1.CanaryC
err = canaryCfgMgr.updateCanaryConfigStatusWithRetries(canaryConfig.ObjectMeta.Name, canaryConfig.ObjectMeta.Namespace,
fv1.CanaryConfigStatusSucceeded)
if err != nil {
// cant do much after max retries other than logging it.
// can't do much after max retries other than logging it.
canaryCfgMgr.logger.Error("error updating canary config after max retries",
zap.Error(err),
zap.String("name", canaryConfig.ObjectMeta.Name),
+1 -1
View File
@@ -134,7 +134,7 @@ func (a *API) WatchApiCreate(w http.ResponseWriter, r *http.Request) {
}
// TODO check for duplicate watches
// TODO check for duplicate watches -> we probably wont need it?
// TODO check for duplicate watches -> we probably won't need it?
// check if namespace exists, if not create it.
err = a.createNsIfNotExists(r.Context(), watch.ObjectMeta.Namespace)
if err != nil {
+3 -3
View File
@@ -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))
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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{})
+1 -1
View File
@@ -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{
+1 -1
View File
@@ -113,7 +113,7 @@ func (cfg *Config) NewSpecializeRequest(fn *fv1.Function, env *fv1.Environment)
if env.Spec.AllowedFunctionsPerContainer == fv1.AllowedFunctionsPerContainerInfinite {
// workflow loads multiple functions into one function pod,
// we have to use a Function UID to separate the function code
// to avoid overwritting.
// to avoid overwriting.
targetFilename = string(fn.ObjectMeta.UID)
} else {
// set target file name to fix pattern for
+1 -1
View File
@@ -62,7 +62,7 @@ type (
// to "/".
URL string `json:"url"`
// Metatdata
// Metadata
FunctionMetadata *metav1.ObjectMeta
EnvVersion int `json:"envVersion"`
+2 -2
View File
@@ -45,7 +45,7 @@ type (
Usage string
DefaultValue interface{}
// If a flag is marked as deprecated, it will hided from
// If a flag is marked as deprecated, it will hidden from
// the help message automatically. Hence, a flag cannot be
// marked as hidden and deprecated at the same time.
Hidden bool
@@ -200,7 +200,7 @@ var (
SpecDelete = Flag{Type: Bool, Name: flagkey.SpecDelete, Usage: "Allow apply to delete resources that no longer exist in the specification"}
SpecDry = Flag{Type: Bool, Name: flagkey.SpecDry, Usage: "View the generated specs"}
SpecValidation = Flag{Type: String, Name: flagkey.SpecValidate, Usage: "Turns server side validations of Fission objects on/off"}
SpecIgnore = Flag{Type: String, Name: flagkey.SpecIgnore, Usage: fmt.Sprintf("File containing specs to be ingored inside --specdir, defaults to %v", util.SPEC_IGNORE_FILE)}
SpecIgnore = Flag{Type: String, Name: flagkey.SpecIgnore, Usage: fmt.Sprintf("File containing specs to be ignored inside --specdir, defaults to %v", util.SPEC_IGNORE_FILE)}
SupportOutput = Flag{Type: String, Name: flagkey.SupportOutput, Short: "o", Usage: "Output directory to save dump archive/files", DefaultValue: flagkey.DefaultSpecOutputDir}
SupportNoZip = Flag{Type: Bool, Name: flagkey.SupportNoZip, Usage: "Save dump information into multiple files instead of single zip file"}
+1 -1
View File
@@ -137,7 +137,7 @@ func (c *Cache) service() {
}
if value.activeRequests == 0 {
if debugLevel {
otelUtils.LoggerWithTraceID(req.ctx, c.logger).Debug("Function service with no acitve requests", zap.String("function", key1.(string)), zap.String("address", key2.(string)), zap.Int("activeRequests", value.activeRequests))
otelUtils.LoggerWithTraceID(req.ctx, c.logger).Debug("Function service with no active requests", zap.String("function", key1.(string)), zap.String("address", key2.(string)), zap.Int("activeRequests", value.activeRequests))
}
vals = append(vals, value.val)
}
+1 -1
View File
@@ -152,7 +152,7 @@ func (w *fakeCloseReadCloser) RealClose() error {
// In such a case, the RoundTripper will retry requests against the new address and give up after maxRetries.
// However, the subsequent http call for this function will ensure the cache is invalidated.
//
// If GetServiceForFunction returns an error or if RoundTripper exits with an error, it get's translated into 502
// If GetServiceForFunction returns an error or if RoundTripper exits with an error, it gets translated into 502
// inside ServeHttp function of the reverseProxy.
// Earlier, GetServiceForFunction was called inside handler function and fission explicitly set http status code to 500
// if it returned an error.
+1 -1
View File
@@ -37,7 +37,7 @@ type (
storage Storage
}
//StowClient is the wraper client for stow (Cloud storage abstraction package)
//StowClient is the wrapper client for stow (Cloud storage abstraction package)
StowClient struct {
logger *zap.Logger
config *storageConfig
+1 -1
View File
@@ -211,7 +211,7 @@ func RemoveSAFromRoleBindingWithRetries(ctx context.Context, logger *zap.Logger,
rbObj.Subjects = newSubjects
// cant use patch for deletes, the results become in-deterministic, so using update.
// can't use patch for deletes, the results become in-deterministic, so using update.
_, err = k8sClient.RbacV1().RoleBindings(rbObj.Namespace).Update(ctx, rbObj, metav1.UpdateOptions{})
switch {
case err == nil:
+1 -1
View File
@@ -218,7 +218,7 @@ pool_mgr_test_1() {
main() {
# extract the test-id generated for this CI test run, so that they can be suffixed to namespaces created as part of
# this test and namespaces wont clash when fission CI tests are run in parallel in the future.
# this test and namespaces won't clash when fission CI tests are run in parallel in the future.
id=`echo $FISSION_NAMESPACE| cut -d"-" -f2`
echo "test_id : $id"
+1 -1
View File
@@ -41,7 +41,7 @@ func main() {
Short: "Generate docs for fission-cli",
Long: "Generate docs for fission-cli",
Run: func(cmd *cobra.Command, args []string) {
log.Printf("Generting docs in directory %s", outdir)
log.Printf("Generating docs in directory %s", outdir)
fissionApp := app.App()
fissionApp.DisableAutoGenTag = true
fissionApp.Short = "Serverless framework for Kubernetes"