summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/argocd/update_test.go2
-rw-r--r--pkg/metrics/metrics.go2
-rw-r--r--pkg/registry/client.go4
-rw-r--r--pkg/registry/endpoints.go6
4 files changed, 7 insertions, 7 deletions
diff --git a/pkg/argocd/update_test.go b/pkg/argocd/update_test.go
index 3b64d40..cd70391 100644
--- a/pkg/argocd/update_test.go
+++ b/pkg/argocd/update_test.go
@@ -845,7 +845,7 @@ func Test_UpdateApplication(t *testing.T) {
assert.Equal(t, 0, res.NumImagesUpdated)
})
- t.Run("Update from infered registry", func(t *testing.T) {
+ t.Run("Update from inferred registry", func(t *testing.T) {
mockClientFn := func(endpoint *registry.RegistryEndpoint, username, password string) (registry.RegistryClient, error) {
regMock := regmock.RegistryClient{}
regMock.On("NewRepository", mock.Anything).Return(nil)
diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go
index 3b657cd..34a09cd 100644
--- a/pkg/metrics/metrics.go
+++ b/pkg/metrics/metrics.go
@@ -155,7 +155,7 @@ func (apm *ApplicationMetrics) IncreaseImageUpdate(application string, by int) {
apm.imagesUpdatedTotal.WithLabelValues(application).Add(float64(by))
}
-// IncreaseUpdateErrors increases the number of errors for given application occured during update process
+// IncreaseUpdateErrors increases the number of errors for given application occurred during update process
func (apm *ApplicationMetrics) IncreaseUpdateErrors(application string, by int) {
apm.imagesUpdatedErrorsTotal.WithLabelValues(application).Add(float64(by))
}
diff --git a/pkg/registry/client.go b/pkg/registry/client.go
index 2c2ddde..e4f95ed 100644
--- a/pkg/registry/client.go
+++ b/pkg/registry/client.go
@@ -425,7 +425,7 @@ func TagInfoFromReferences(client *registryClient, opts *options.ManifestOptions
return ti, nil
}
-// Implementation of ping method to intialize the challenge list
+// Implementation of ping method to initialize the challenge list
// Without this, tokenHandler and AuthorizationHandler won't work
func ping(manager challenge.Manager, endpoint *RegistryEndpoint, versionHeader string) ([]auth.APIVersion, error) {
httpc := &http.Client{Transport: endpoint.GetTransport()}
@@ -435,7 +435,7 @@ func ping(manager challenge.Manager, endpoint *RegistryEndpoint, versionHeader s
return nil, err
}
defer resp.Body.Close()
- // Let's consider only HTTP 200 and 401 valid responses for the inital request
+ // Let's consider only HTTP 200 and 401 valid responses for the initial request
if resp.StatusCode != 200 && resp.StatusCode != 401 {
return nil, fmt.Errorf("endpoint %s does not seem to be a valid v2 Docker Registry API (received HTTP code %d for GET %s)", endpoint.RegistryAPI, resp.StatusCode, url)
}
diff --git a/pkg/registry/endpoints.go b/pkg/registry/endpoints.go
index 3d01811..61f8c10 100644
--- a/pkg/registry/endpoints.go
+++ b/pkg/registry/endpoints.go
@@ -91,8 +91,8 @@ type RegistryEndpoint struct {
}
// registryTweaks should contain a list of registries whose settings cannot be
-// infered by just looking at the image prefix. Prominent example here is the
-// Docker Hub registry, which is refered to as docker.io from the image, but
+// inferred by just looking at the image prefix. Prominent example here is the
+// Docker Hub registry, which is referred to as docker.io from the image, but
// its API endpoint is https://registry-1.docker.io (and not https://docker.io)
var registryTweaks map[string]*RegistryEndpoint = map[string]*RegistryEndpoint{
"docker.io": {
@@ -172,7 +172,7 @@ func AddRegistryEndpoint(ep *RegistryEndpoint) error {
}
// inferRegistryEndpointFromPrefix returns a registry endpoint with the API
-// URL infered from the prefix and adds it to the list of the configured
+// URL inferred from the prefix and adds it to the list of the configured
// registries.
func inferRegistryEndpointFromPrefix(prefix string) *RegistryEndpoint {
apiURL := "https://" + prefix