Skip to content

Commit 29ba3f1

Browse files
Merge pull request #302 from devtron-labs/main-sync-develop-23jun
sync: Main sync develop
2 parents fc7dd34 + 168dd64 commit 29ba3f1

37 files changed

Lines changed: 2019 additions & 3044 deletions

File tree

chart-sync/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.24.0
44

55
toolchain go1.24.3
66

7-
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795
7+
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6
88

99
require (
1010
github.com/caarlos0/env v3.5.0+incompatible

chart-sync/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
4343
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4444
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
4545
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
46-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795 h1:SNTBypFJqMFrQ0Wifdcr5adC44ydHKHhab9+AgTDIZk=
47-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
46+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6 h1:3B93GepgdZkTAcaM/65pBCzJop43qyGc9N+CllgP8y8=
47+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
4848
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
4949
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
5050
github.com/distribution/distribution/v3 v3.0.0 h1:q4R8wemdRQDClzoNNStftB2ZAfqOiN6UX90KJc4HjyM=

chart-sync/vendor/github.com/MakeNowJust/heredoc/README.md

Lines changed: 52 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chart-sync/vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ github.com/containerd/platforms
9595
# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
9696
## explicit
9797
github.com/davecgh/go-spew/spew
98-
# github.com/devtron-labs/common-lib v0.19.1 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795
98+
# github.com/devtron-labs/common-lib v0.19.1 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6
9999
## explicit; go 1.24.0
100100
github.com/devtron-labs/common-lib/constants
101101
github.com/devtron-labs/common-lib/fetchAllEnv
@@ -967,4 +967,4 @@ sigs.k8s.io/structured-merge-diff/v4/value
967967
sigs.k8s.io/yaml
968968
sigs.k8s.io/yaml/goyaml.v2
969969
sigs.k8s.io/yaml/goyaml.v3
970-
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795
970+
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6
Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
# Migration Guide
2-
3-
In version `v2`, ORAS Go library has been completely refreshed with:
4-
5-
- More unified interfaces
6-
- Notably fewer dependencies
7-
- Higher test coverage
8-
- Better documentation
9-
10-
**Besides, ORAS Go `v2` is now a registry client.**
11-
12-
## Major Changes in `v2`
13-
14-
- Moves `content.FileStore` to [file.Store](https://pkg.go.dev/oras.land/oras-go/v2/content/file#Store)
15-
- Moves `content.OCIStore` to [oci.Store](https://pkg.go.dev/oras.land/oras-go/v2/content/oci#Store)
16-
- Moves `content.MemoryStore` to [memory.Store](https://pkg.go.dev/oras.land/oras-go/v2/content/memory#Store)
17-
- Provides [SDK](https://pkg.go.dev/oras.land/oras-go/v2/registry/remote) to interact with OCI-compliant and Docker-compliant registries
18-
- Supports [Copy](https://pkg.go.dev/oras.land/oras-go/v2#Copy) with more flexible options
19-
- Supports [Extended Copy](https://pkg.go.dev/oras.land/oras-go/v2#ExtendedCopy) with options *(experimental)*
20-
- No longer supports `docker.Login` and `docker.Logout` (removes the dependency on `docker`); instead, provides authentication through [auth.Client](https://pkg.go.dev/oras.land/oras-go/v2/registry/remote/auth#Client)
21-
22-
Documentation and examples are available at [pkg.go.dev](https://pkg.go.dev/oras.land/oras-go/v2).
23-
24-
## Migrating from `v1` to `v2`
25-
26-
1. Get the `v2` package
27-
28-
```sh
29-
go get oras.land/oras-go/v2
30-
```
31-
32-
2. Import and use the `v2` package
33-
34-
```go
35-
import "oras.land/oras-go/v2"
36-
```
37-
38-
3. Run
39-
40-
```sh
41-
go mod tidy
42-
```
43-
44-
Since breaking changes are introduced in `v2`, code refactoring is required for migrating from `v1` to `v2`.
45-
The migration can be done in an iterative fashion, as `v1` and `v2` can be imported and used at the same time.
1+
# Migration Guide
2+
3+
In version `v2`, ORAS Go library has been completely refreshed with:
4+
5+
- More unified interfaces
6+
- Notably fewer dependencies
7+
- Higher test coverage
8+
- Better documentation
9+
10+
**Besides, ORAS Go `v2` is now a registry client.**
11+
12+
## Major Changes in `v2`
13+
14+
- Moves `content.FileStore` to [file.Store](https://pkg.go.dev/oras.land/oras-go/v2/content/file#Store)
15+
- Moves `content.OCIStore` to [oci.Store](https://pkg.go.dev/oras.land/oras-go/v2/content/oci#Store)
16+
- Moves `content.MemoryStore` to [memory.Store](https://pkg.go.dev/oras.land/oras-go/v2/content/memory#Store)
17+
- Provides [SDK](https://pkg.go.dev/oras.land/oras-go/v2/registry/remote) to interact with OCI-compliant and Docker-compliant registries
18+
- Supports [Copy](https://pkg.go.dev/oras.land/oras-go/v2#Copy) with more flexible options
19+
- Supports [Extended Copy](https://pkg.go.dev/oras.land/oras-go/v2#ExtendedCopy) with options *(experimental)*
20+
- No longer supports `docker.Login` and `docker.Logout` (removes the dependency on `docker`); instead, provides authentication through [auth.Client](https://pkg.go.dev/oras.land/oras-go/v2/registry/remote/auth#Client)
21+
22+
Documentation and examples are available at [pkg.go.dev](https://pkg.go.dev/oras.land/oras-go/v2).
23+
24+
## Migrating from `v1` to `v2`
25+
26+
1. Get the `v2` package
27+
28+
```sh
29+
go get oras.land/oras-go/v2
30+
```
31+
32+
2. Import and use the `v2` package
33+
34+
```go
35+
import "oras.land/oras-go/v2"
36+
```
37+
38+
3. Run
39+
40+
```sh
41+
go mod tidy
42+
```
43+
44+
Since breaking changes are introduced in `v2`, code refactoring is required for migrating from `v1` to `v2`.
45+
The migration can be done in an iterative fashion, as `v1` and `v2` can be imported and used at the same time.

chart-sync/wire_gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci-runner/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.24.0
44

55
toolchain go1.24.3
66

7-
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795
7+
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6
88

99
require (
1010
github.com/Knetic/govaluate v3.0.0+incompatible

ci-runner/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
114114
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
115115
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
116116
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
117-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795 h1:SNTBypFJqMFrQ0Wifdcr5adC44ydHKHhab9+AgTDIZk=
118-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
117+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6 h1:3B93GepgdZkTAcaM/65pBCzJop43qyGc9N+CllgP8y8=
118+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
119119
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
120120
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
121121
github.com/docker/cli v28.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k=

ci-runner/vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ github.com/cncf/xds/go/xds/type/v3
298298
# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
299299
## explicit
300300
github.com/davecgh/go-spew/spew
301-
# github.com/devtron-labs/common-lib v0.19.1 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795
301+
# github.com/devtron-labs/common-lib v0.19.1 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6
302302
## explicit; go 1.24.0
303303
github.com/devtron-labs/common-lib/blob-storage
304304
github.com/devtron-labs/common-lib/constants
@@ -1194,4 +1194,4 @@ sigs.k8s.io/structured-merge-diff/v4/value
11941194
## explicit; go 1.12
11951195
sigs.k8s.io/yaml
11961196
sigs.k8s.io/yaml/goyaml.v2
1197-
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250604122935-118e74f11795
1197+
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250619104711-cec22dd450d6

common-lib/utils/k8s/bean.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"errors"
2121
"fmt"
2222
"github.com/caarlos0/env"
23+
"github.com/devtron-labs/common-lib/utils"
2324
"github.com/devtron-labs/common-lib/utils/k8sObjectsUtil"
2425
"github.com/devtron-labs/common-lib/utils/remoteConnection/bean"
2526
v1 "k8s.io/api/core/v1"
@@ -43,10 +44,16 @@ type ClusterConfig struct {
4344
RemoteConnectionConfig *bean.RemoteConnectionConfigBean
4445
}
4546

47+
var logger, _ = utils.NewSugardLogger()
48+
4649
func (clusterConfig *ClusterConfig) PopulateTlsConfigurationsInto(restConfig *rest.Config) {
47-
restConfig.TLSClientConfig = rest.TLSClientConfig{Insecure: clusterConfig.InsecureSkipTLSVerify}
50+
serverName, err := GetServerNameFromServerUrl(clusterConfig.Host)
51+
if err != nil {
52+
// making it non-blocking to avoid blocking the flow
53+
logger.Errorw("Error parsing server URL:", "err", err, "clusterConfig.Host", clusterConfig.Host)
54+
}
55+
restConfig.TLSClientConfig = rest.TLSClientConfig{Insecure: clusterConfig.InsecureSkipTLSVerify, ServerName: serverName}
4856
if clusterConfig.InsecureSkipTLSVerify == false {
49-
restConfig.TLSClientConfig.ServerName = restConfig.ServerName
5057
restConfig.TLSClientConfig.KeyData = []byte(clusterConfig.KeyData)
5158
restConfig.TLSClientConfig.CertData = []byte(clusterConfig.CertData)
5259
restConfig.TLSClientConfig.CAData = []byte(clusterConfig.CAData)

0 commit comments

Comments
 (0)