Skip to content

Commit

Permalink
Updating to OCI Go SDK v65.56.0
Browse files Browse the repository at this point in the history
  • Loading branch information
l-technicore committed Feb 1, 2024
1 parent 6669486 commit 3c6a65e
Show file tree
Hide file tree
Showing 1,729 changed files with 8,358 additions and 2,030 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${GITHUB_ACTOR,,} --password-stdin

- name: Build Image
run: OSS_REGISTRY="ghcr.io/oracle" VERSION="${{ github.ref_name }}" make image
run: OSS_REGISTRY="ghcr.io/${GITHUB_ACTOR,,}" VERSION="${{ github.ref_name }}" make image

- name: Push Image
run: OSS_REGISTRY="ghcr.io/oracle" VERSION="${{ github.ref_name }}" make docker-push-all
run: OSS_REGISTRY="ghcr.io/${GITHUB_ACTOR,,}" VERSION="${{ github.ref_name }}" make docker-push-all
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ require (
github.com/kubernetes-csi/external-snapshotter/client/v6 v6.2.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.24.1
github.com/oracle/oci-go-sdk/v65 v65.49.2
github.com/oracle/oci-go-sdk/v65 v65.56.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.14.0
github.com/spf13/cobra v1.6.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU=
github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
github.com/oracle/oci-go-sdk/v65 v65.49.2 h1:optOfjGIVmZZMT3a/8ri/CVV1loDG0ab1p2tEpNW5ro=
github.com/oracle/oci-go-sdk/v65 v65.49.2/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
github.com/oracle/oci-go-sdk/v65 v65.56.0 h1:o5na2VTSoH6LDLDrIB81XAjgtok6utLrixNO1TySN7c=
github.com/oracle/oci-go-sdk/v65 v65.56.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ=
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
Expand Down
54 changes: 1 addition & 53 deletions pkg/oci/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ package client

import (
"context"
"crypto/tls"
"crypto/x509"
"io/ioutil"
"net"
"net/http"
"net/url"
"os"
"time"

"github.com/oracle/oci-go-sdk/v65/common"
Expand Down Expand Up @@ -170,6 +163,7 @@ type client struct {

// New constructs an OCI API client.
func New(logger *zap.SugaredLogger, cp common.ConfigurationProvider, opRateLimiter *RateLimiter) (Interface, error) {

compute, err := core.NewComputeClientWithConfigurationProvider(cp)
if err != nil {
return nil, errors.Wrap(err, "NewComputeClientWithConfigurationProvider")
Expand Down Expand Up @@ -361,51 +355,5 @@ func (c *client) FSS() FileStorageInterface {
}

func configureCustomTransport(logger *zap.SugaredLogger, baseClient *common.BaseClient) error {
httpClient := baseClient.HTTPClient.(*http.Client)

var transport *http.Transport
if httpClient.Transport == nil {
transport = &http.Transport{
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
DualStack: true,
}).DialContext,
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
}
} else {
transport = httpClient.Transport.(*http.Transport)
}

ociProxy := os.Getenv("OCI_PROXY")
if ociProxy != "" {
proxyURL, err := url.Parse(ociProxy)
if err != nil {
return errors.Wrapf(err, "failed to parse OCI proxy url: %s", ociProxy)
}
transport.Proxy = func(req *http.Request) (*url.URL, error) {
return proxyURL, nil
}
}

trustedCACertPath := os.Getenv("TRUSTED_CA_CERT_PATH")
if trustedCACertPath != "" {
logger.With("path", trustedCACertPath).Infof("Configuring OCI client with a new trusted ca")
trustedCACert, err := ioutil.ReadFile(trustedCACertPath)
if err != nil {
return errors.Wrapf(err, "failed to read root certificate: %s", trustedCACertPath)
}
caCertPool := x509.NewCertPool()
ok := caCertPool.AppendCertsFromPEM(trustedCACert)
if !ok {
return errors.Wrapf(err, "failed to parse root certificate: %s", trustedCACertPath)
}
transport.TLSClientConfig = &tls.Config{RootCAs: caCertPool}
}

httpClient.Transport = transport
return nil
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/oracle/oci-go-sdk/v65/common/auth/jwt.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 52 additions & 40 deletions vendor/github.com/oracle/oci-go-sdk/v65/common/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3c6a65e

Please sign in to comment.