From 57e85cad06a628fee331eba63034daac58d4276b Mon Sep 17 00:00:00 2001 From: jannfis Date: Tue, 11 Aug 2020 22:56:59 +0200 Subject: chore: Fix typos (#40) --- README.md | 4 ++-- cmd/main.go | 4 ++-- docs/configuration/images.md | 4 ++-- docs/index.md | 4 ++-- docs/install/start.md | 4 ++-- pkg/argocd/argocd.go | 10 +++++----- pkg/image/image.go | 4 ++-- pkg/log/log.go | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1cd7324..a79d087 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ to indicate all breaking changes (and how to un-break them) in the ## Contributing You are welcome to contribute to this project by means of raising issues for -bugs, sending & discussing enhancment ideas or by contributing code via pull +bugs, sending & discussing enhancement ideas or by contributing code via pull requests. In any case, please be sure that you have read & understood the currently known @@ -104,7 +104,7 @@ this feature in the meanwhile, but don't expect it before the v1.0 release. **How does it persist the changes then?** -The Argo CD Image Updater leverages the Argo CD API to set application paramaters, +The Argo CD Image Updater leverages the Argo CD API to set application parameters, and Argo CD will then persist the change in the application's manifest. This is something Argo CD will not overwrite upon the next manual (or automatic) sync, except when the overrides are explicitly set in the manifest. diff --git a/cmd/main.go b/cmd/main.go index d87e93d..de9a0ad 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -60,7 +60,7 @@ func updateApplication(argoClient *argocd.ArgoCD, kubeClient *client.KubernetesC result.NumApplicationsProcessed += 1 // Loop through all images of current application, and check whether one of - // its images is egilible for updating. + // its images is eligible for updating. // // Whether an image qualifies for update is dependent on semantic version // constraints which are part of the application's annotation values. @@ -440,7 +440,7 @@ func newRunCommand() *cobra.Command { runCmd.Flags().StringVar(&cfg.LogLevel, "loglevel", "info", "set the loglevel to one of trace|debug|info|warn|error") runCmd.Flags().StringVar(&kubeConfig, "kubeconfig", "", "full path to kubernetes client configuration, i.e. ~/.kube/config") runCmd.Flags().IntVar(&cfg.HealthPort, "health-port", 8080, "port to start the health server on, 0 to disable") - runCmd.Flags().BoolVar(&once, "once", false, "run only once, same as specifying --interval=0 and --healt-port=0") + runCmd.Flags().BoolVar(&once, "once", false, "run only once, same as specifying --interval=0 and --health-port=0") runCmd.Flags().StringVar(&cfg.RegistriesConf, "registries-conf-path", "", "path to registries configuration file") runCmd.Flags().BoolVar(&disableKubernetes, "disable-kubernetes", false, "do not create and use a Kubernetes client") runCmd.Flags().IntVar(&cfg.MaxConcurrency, "max-concurrency", 10, "maximum number of update threads to run concurrently") diff --git a/docs/configuration/images.md b/docs/configuration/images.md index 0b0a22c..7cdda49 100644 --- a/docs/configuration/images.md +++ b/docs/configuration/images.md @@ -34,7 +34,7 @@ argocd-image-updater.argoproj.io/image-list: nginx The above example would specify to update the image `nginx` to it's most recent version found in the container registry, without taking any version constraints -into cosideration. +into consideration. This is most likely not what you want, because you could pull in some breaking changes when `nginx` releases a new major version and the image gets updated. @@ -185,7 +185,7 @@ argocd-image-updater.argoproj.io/image-list: nginx:~1.19 ### Always deploy the latest build -*Scenario:* Your CI regulary pushes images built from the latest source, using +*Scenario:* Your CI regularly pushes images built from the latest source, using some identifier (i.e. the hash of the Git commit) in the tag. *Solution:* diff --git a/docs/index.md b/docs/index.md index db9c0a6..9782e69 100644 --- a/docs/index.md +++ b/docs/index.md @@ -29,7 +29,7 @@ manner. Usage is simple: You annotate your Argo CD `Application` resources with a list of images to be considered for update, along with a version constraint to restrict the maximum allowed new version for each image. Argo CD Image Updater -then regulary polls the configured applications from Argo CD and queries the +then regularly polls the configured applications from Argo CD and queries the corresponding container registry for possible new versions. If a new version of the image is found in the registry, and the version constraint is met, Argo CD Image Updater instructs Argo CD to update the application with the new image. @@ -63,5 +63,5 @@ requests or bug reports related to the following: Otherwise, current known limitations are: * Image pull secrets must exist in the same Kubernetes cluster where Argo CD - Image Updater is running in (or has accesst to). It is currently not possible + Image Updater is running in (or has access to). It is currently not possible to fetch those secrets from other clusters. diff --git a/docs/install/start.md b/docs/install/start.md index 8a9cca9..4379615 100644 --- a/docs/install/start.md +++ b/docs/install/start.md @@ -89,7 +89,7 @@ kubectl create ns argocd-image-updater kubectl apply -n argocd-image-updater -f manifests/install.yaml ``` -!!!note "A word on high availabilty" +!!!note "A word on high availability" It is not advised to run multiple replicas of the same Argo CD Image Updater instance. Just leave the number of replicas at 1, otherwise weird side effects could occur. @@ -167,7 +167,7 @@ export ARGOCD_TOKEN= ``` Note: The `--once` flag disables the health server and the check interval, so -the tool will not regulary check for updates but exit after the first run. +the tool will not regularly check for updates but exit after the first run. Check `argocd-image-updater --help` for a list of valid command line flags, or consult the appropriate section of the documentation. diff --git a/pkg/argocd/argocd.go b/pkg/argocd/argocd.go index d4bd869..227cec1 100644 --- a/pkg/argocd/argocd.go +++ b/pkg/argocd/argocd.go @@ -280,21 +280,21 @@ func (client *ArgoCD) SetKustomizeImage(app *v1alpha1.Application, newImage *ima return fmt.Errorf("cannot set Kustomize image on non-Kustomize application") } - var ksImageParm string + var ksImageParam string ksImageName := newImage.GetParameterKustomizeImageName(app.Annotations) if ksImageName != "" { - ksImageParm = fmt.Sprintf("%s=%s", ksImageName, newImage.GetFullNameWithTag()) + ksImageParam = fmt.Sprintf("%s=%s", ksImageName, newImage.GetFullNameWithTag()) } else { - ksImageParm = newImage.GetFullNameWithTag() + ksImageParam = newImage.GetFullNameWithTag() } - log.Tracef("Setting Kustomize parameter %s", ksImageParm) + log.Tracef("Setting Kustomize parameter %s", ksImageParam) if app.Spec.Source.Kustomize == nil { app.Spec.Source.Kustomize = &v1alpha1.ApplicationSourceKustomize{} } - app.Spec.Source.Kustomize.MergeImage(v1alpha1.KustomizeImage(ksImageParm)) + app.Spec.Source.Kustomize.MergeImage(v1alpha1.KustomizeImage(ksImageParam)) _, err = appClient.UpdateSpec(context.TODO(), &application.ApplicationUpdateSpecRequest{Name: &appName, Spec: app.Spec}) if err != nil { diff --git a/pkg/image/image.go b/pkg/image/image.go index ab72c14..47ba6c1 100644 --- a/pkg/image/image.go +++ b/pkg/image/image.go @@ -103,7 +103,7 @@ func (list *ContainerImageList) ContainsImage(img *ContainerImage, checkVersion return nil } -// String Returns the name of all images as a string, seperated using comma +// String Returns the name of all images as a string, separated using comma func (list *ContainerImageList) String() string { imgNameList := make([]string, 0) for _, image := range *list { @@ -134,7 +134,7 @@ func getImageTagFromIdentifier(identifier string) (string, string, *tag.ImageTag var imageString string var sourceName string - // The original name is prepended to the image name, seperated by = + // The original name is prepended to the image name, separated by = comp := strings.Split(identifier, "=") if len(comp) == 2 { sourceName = comp[0] diff --git a/pkg/log/log.go b/pkg/log/log.go index 83ab043..0c6490d 100644 --- a/pkg/log/log.go +++ b/pkg/log/log.go @@ -4,7 +4,7 @@ package log // different output streams for error and non-error messages. // // Does not wrap every method of logrus package. If you need direct access, -// use log.Log() to get the actuall logrus logger object. +// use log.Log() to get the actual logrus logger object. // // It might seem redundant, but we really want the different output streams. -- cgit v1.2.3