Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
joshw123 authored Feb 21, 2024
2 parents c0a066f + c7ff935 commit eb815e1
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ verify: test build ## tests and builds version-checker

image: ## build docker image
GOARCH=$(ARCH) GOOS=linux CGO_ENABLED=0 go build -o ./bin/version-checker-linux ./cmd/.
docker build -t quay.io/jetstack/version-checker:v0.4.0 .
docker build -t quay.io/jetstack/version-checker:v0.5.0 .

clean: ## clean up created files
rm -rf \
Expand Down
4 changes: 2 additions & 2 deletions deploy/charts/version-checker/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
appVersion: "v0.4.0"
version: "v0.4.0"
appVersion: "v0.5.0"
version: "v0.5.0"
description: A Helm chart for version-checker
home: https://github.com/jetstack/version-checker
name: version-checker
Expand Down
2 changes: 1 addition & 1 deletion deploy/yaml/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
spec:
serviceAccountName: version-checker
containers:
- image: quay.io/jetstack/version-checker:v0.4.0
- image: quay.io/jetstack/version-checker:v0.5.0
imagePullPolicy: Always
ports:
- containerPort: 8080
Expand Down
3 changes: 2 additions & 1 deletion pkg/client/acr/acr.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ type ACRManifestResponse struct {

func New(opts Options) (*Client, error) {
client := &http.Client{
Timeout: time.Second * 5,
Timeout: time.Second * 5,
Transport: &http.Transport{Proxy: http.ProxyFromEnvironment},
}

if len(opts.RefreshToken) > 0 &&
Expand Down
3 changes: 2 additions & 1 deletion pkg/client/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ type Image struct {

func New(ctx context.Context, opts Options) (*Client, error) {
client := &http.Client{
Timeout: time.Second * 10,
Timeout: time.Second * 10,
Transport: &http.Transport{Proxy: http.ProxyFromEnvironment},
}

// Setup Auth if username and password used.
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/ecr/ecr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package ecr
import (
"context"
"fmt"
"net/http"
"sync"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -102,6 +103,8 @@ func (c *Client) getClient(region string) (*ecr.ECR, error) {
return nil, err
}
}
// Try and use an HTTP(S) Proxies defined within Environment variables.
client.Config.WithHTTPClient(&http.Client{Transport: &http.Transport{Proxy: http.ProxyFromEnvironment}})

c.cachedRegionClients[region] = client
return client, nil
Expand Down
9 changes: 6 additions & 3 deletions pkg/client/gcr/gcr.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ type ManifestItem struct {
}

func New(opts Options) *Client {
client := &http.Client{
Timeout: time.Second * 5,
Transport: &http.Transport{Proxy: http.ProxyFromEnvironment},
}

return &Client{
Options: opts,
Client: &http.Client{
Timeout: time.Second * 5,
},
Client: client,
}
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/client/ghcr/ghcr.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ func New(opts Options) *Client {
return &Client{
Options: opts,
Client: &http.Client{
Timeout: time.Second * 5,
Timeout: time.Second * 5,
Transport: &http.Transport{Proxy: http.ProxyFromEnvironment},
},
}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/client/quay/quay.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type responseManifestDataItem struct {

func New(opts Options) *Client {
client := retryablehttp.NewClient()
client.HTTPClient.Transport = &http.Transport{Proxy: http.ProxyFromEnvironment}
client.RetryMax = 10
client.Logger = nil

Expand Down

0 comments on commit eb815e1

Please sign in to comment.