Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for air gapped registry #146

Merged
merged 40 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
cd5c2c0
adding registrySettings factory and default implementation
iamayushm May 8, 2024
fd1b88e
wire updated
iamayushm May 8, 2024
a5e22d4
updating chart name
iamayushm May 8, 2024
572b100
trimming scheme from url
iamayushm May 9, 2024
83f68da
updating trimmed function
iamayushm May 9, 2024
79c7329
fixing url trim logic
iamayushm May 9, 2024
397eeba
updating login options
iamayushm May 9, 2024
dcd435c
making CreateCertificateFile function public
iamayushm May 9, 2024
123b674
updating common lib
iamayushm May 9, 2024
8df6e61
updating tls config
iamayushm May 9, 2024
f874db1
updating adapter
iamayushm May 9, 2024
e40fdb9
adding missing error logs
iamayushm May 9, 2024
52da98c
moving code to common lib
iamayushm May 11, 2024
4f4db00
changing helmLib path name
iamayushm May 12, 2024
799667f
wip: common lib changes
iamayushm May 12, 2024
acbe446
wip: fixing registry config panic
iamayushm May 12, 2024
8846cf0
wip: changing registryConfig
iamayushm May 12, 2024
70a8eee
updating common lib
iamayushm May 13, 2024
9fd0323
common lib upgrade
iamayushm May 14, 2024
4e26a70
common lib upgrade
iamayushm May 14, 2024
f450b9d
wip: updating file create dunction
iamayushm May 20, 2024
6c5449a
adding remote connection config column
iamayushm May 20, 2024
6faf8e8
updating sql query
iamayushm May 20, 2024
45cc3a7
wip: fixing remote connection config
iamayushm May 20, 2024
88b05d6
adding direct connection method
iamayushm May 21, 2024
468fda5
lib-sync
iamayushm May 21, 2024
99698d9
updating common lib
iamayushm May 23, 2024
9caa93d
updating common lib
iamayushm May 23, 2024
d6856dd
updating delete call
iamayushm May 23, 2024
d9a6610
common lib update
iamayushm May 29, 2024
36f1824
common lib and main update
iamayushm May 29, 2024
99caef7
updating common lib
iamayushm May 29, 2024
a8bce2c
common lib upgrade
iamayushm May 30, 2024
02e53f1
url parse logic
iamayushm May 30, 2024
f07cd51
updating common lib
iamayushm May 31, 2024
7a4e92e
lib update
iamayushm May 31, 2024
412c576
wip: check for chart repo
iamayushm Jun 3, 2024
b1fb79d
check for registry config
iamayushm Jun 3, 2024
5dfee1d
fix-wrong-path
iamayushm Jun 3, 2024
99d382e
common lib update
iamayushm Jun 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions Wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package main

import (
"github.com/devtron-labs/authenticator/client"
"github.com/devtron-labs/common-lib/helmLib/registry"
"github.com/devtron-labs/common-lib/monitoring"
"github.com/devtron-labs/common-lib/utils/k8s"
"github.com/devtron-labs/kubelink/api/router"
Expand Down Expand Up @@ -61,6 +62,12 @@ func InitializeApp() (*App, error) {
//cache.NewClusterCacheImpl,
//wire.Bind(new(cache.ClusterCache), new(*cache.ClusterCacheImpl)),
//cache.GetClusterCacheConfig,
registry.NewSettingsFactoryImpl,
wire.Bind(new(registry.SettingsFactory), new(*registry.SettingsFactoryImpl)),

registry.NewDefaultSettingsGetter,
wire.Bind(new(registry.DefaultSettingsGetter), new(*registry.DefaultSettingsGetterImpl)),

monitoring.NewMonitoringRouter,
)
return &App{}, nil
Expand Down
20 changes: 10 additions & 10 deletions bean/Bean.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package bean

import (
"github.com/devtron-labs/common-lib/utils/remoteConnection/bean"
remoteConnectionBean "github.com/devtron-labs/common-lib/utils/remoteConnection/bean"
client "github.com/devtron-labs/kubelink/grpc"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down Expand Up @@ -224,13 +224,13 @@ type EphemeralContainerStatusesInfo struct {
}

type ClusterInfo struct {
ClusterId int `json:"clusterId"`
ClusterName string `json:"clusterName"`
BearerToken string `json:"bearerToken"`
ServerUrl string `json:"serverUrl"`
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify"`
KeyData string `json:"-"`
CertData string `json:"-"`
CAData string `json:"-"`
RemoteConnectionConfig *bean.RemoteConnectionConfigBean
ClusterId int `json:"clusterId"`
ClusterName string `json:"clusterName"`
BearerToken string `json:"bearerToken"`
ServerUrl string `json:"serverUrl"`
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify"`
KeyData string `json:"-"`
CertData string `json:"-"`
CAData string `json:"-"`
RemoteConnectionConfig *remoteConnectionBean.RemoteConnectionConfigBean `json:"remoteConnectionConfig"`
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ go 1.21

require (
//github.com/argoproj/gitops-engine v0.7.1-0.20231013183858-f15cf615b814
github.com/aws/aws-sdk-go v1.44.285
github.com/aws/aws-sdk-go v1.44.285 // indirect
github.com/caarlos0/env v3.5.0+incompatible
github.com/devtron-labs/common-lib v0.0.18-0.20240524141543-f4ed1281e694
github.com/devtron-labs/common-lib v0.0.19-0.20240603142207-287a5e876a52
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible
github.com/go-pg/pg v6.15.1+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/devtron-labs/authenticator v0.4.31 h1:CEMLek3JnMuH9ULsC6BHNJr+NiyGzBd4lgdSxH2IGnc=
github.com/devtron-labs/authenticator v0.4.31/go.mod h1:ozNfT8WcruiSgnUbyp48WVfc41++W6xYXhKFp67lNTU=
github.com/devtron-labs/common-lib v0.0.18-0.20240524141543-f4ed1281e694 h1:lUcMarRvAKzsLpmuYwFgOsKLJQpHsJuvbKG+we/dI58=
github.com/devtron-labs/common-lib v0.0.18-0.20240524141543-f4ed1281e694/go.mod h1:deAcJ5IjUjM6ozZQLJEgPWDUA0mKa632LBsKx8uM9TE=
github.com/devtron-labs/common-lib v0.0.19-0.20240603142207-287a5e876a52 h1:7Bpn80KXfZHScF1aStQT6Tv3lZZ6dx3fQWIHq44/LkI=
github.com/devtron-labs/common-lib v0.0.19-0.20240603142207-287a5e876a52/go.mod h1:UgYkD75M0rsC4UBPBnUE87H0JIZ7n3P+u5yXsWIkoi0=
github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc=
github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI=
github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY=
Expand Down
491 changes: 270 additions & 221 deletions grpc/applist.pb.go

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions grpc/applist.proto
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,16 @@ message RegistryCredential {
string RegistryType = 7;
string RepoName = 8;
bool IsPublic = 9;
RemoteConnectionConfig RemoteConnectionConfig = 10;
string Connection = 11;
string RegistryName = 12;
string RegistryCertificate = 13;
}

enum RemoteConnectionMethod {
PROXY = 0;
SSH = 1;
DIRECT = 2 ;
}

message ProxyConfig {
Expand Down
Loading