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

Link helm release #6432

Open
wants to merge 219 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
dcfd98b
wip:deployment config old data migration code
iamayushm Jan 16, 2025
104e62c
Merge remote-tracking branch 'origin/develop' into link-external-argocd
iamayushm Jan 16, 2025
6864e07
updating repo url get usage
iamayushm Jan 17, 2025
abc8fea
comments
iamayushm Jan 17, 2025
ca6fda7
adding comments
iamayushm Jan 17, 2025
a18b96f
wip: adding repo name in deployment config struct
iamayushm Jan 17, 2025
81ccd3a
migration files
iamayushm Jan 17, 2025
20e0b4d
migration update
iamayushm Jan 17, 2025
7303646
Merge remote-tracking branch 'origin/link-external-argocd' into feat-…
Ash-exp Jan 20, 2025
185178e
feat: updated the target revision
Ash-exp Jan 20, 2025
ecf84f1
review changes
iamayushm Jan 20, 2025
2f76843
nil handling
iamayushm Jan 20, 2025
8cf7ea6
dev testing bug fixes
iamayushm Jan 20, 2025
4d062a5
fixes
iamayushm Jan 20, 2025
fc43af7
value file name fix
iamayushm Jan 20, 2025
f842233
fixes
iamayushm Jan 20, 2025
6a5bf44
repo url function update
iamayushm Jan 20, 2025
2ba80d3
git repo url handing using code
iamayushm Jan 20, 2025
b302417
fixing import cycle
iamayushm Jan 20, 2025
afe491b
feat: dynamic chart loaction and valuesfile path
Ash-exp Jan 21, 2025
d535a6e
CRUD operations
iamayushm Jan 22, 2025
dc4c752
repo clone and env override create flow
iamayushm Jan 22, 2025
b642d6d
wip: self review changes
iamayushm Jan 22, 2025
e3bc523
feat: trigger flows updated
Ash-exp Jan 22, 2025
74837b4
self review changes
iamayushm Jan 22, 2025
a5a2680
refactoring
iamayushm Jan 22, 2025
416d0ac
Merge remote-tracking branch 'origin/develop' into link-external-argocd
iamayushm Jan 22, 2025
bd6ddf9
Merge remote-tracking branch 'origin/develop' into crud-deployment-co…
iamayushm Jan 22, 2025
2385dd2
self review fix: env override create
iamayushm Jan 22, 2025
6d87579
skipping checks
iamayushm Jan 22, 2025
be79f0e
feat: Skip GitOps config CRUD ACD operation if argo module is not ins…
Ash-exp Jan 22, 2025
1568f16
handling for IsGitOpsConfigured
Ash-exp Jan 22, 2025
d98d85d
feat: release mode data adaptor
Ash-exp Jan 22, 2025
92905f9
Merge remote-tracking branch 'origin/link-external-argocd' into feat-…
Ash-exp Jan 22, 2025
d0e08d5
validation api
iamayushm Jan 22, 2025
c0bbbd2
deployment status changes and application filter logic change
iamayushm Jan 23, 2025
f1223ae
self review changes
iamayushm Jan 23, 2025
801c175
develop merge
iamayushm Jan 23, 2025
8d6b58f
delete acd app handling
iamayushm Jan 23, 2025
7c3e250
adding route
iamayushm Jan 23, 2025
ef70a2c
parent branch merge
iamayushm Jan 23, 2025
5d1e2e6
modifying validate link request
iamayushm Jan 24, 2025
b319b1d
pipeline crud operation
iamayushm Jan 24, 2025
49485d5
dev testing fix
iamayushm Jan 24, 2025
3062e1a
wip: release config data type fix
iamayushm Jan 24, 2025
3fd0ef6
fixing check
iamayushm Jan 27, 2025
94d9aa7
Merge remote-tracking branch 'origin/link-external-argocd' into feat-…
Ash-exp Jan 28, 2025
e49dc71
updated wire gen
Ash-exp Jan 28, 2025
35a1076
added api /environment-variables
Ash-exp Jan 28, 2025
2e271d5
Merge remote-tracking branch 'origin/develop' into link-external-argocd
Ash-exp Jan 29, 2025
190bebd
Merge remote-tracking branch 'origin/link-external-argocd' into crud-…
Ash-exp Jan 29, 2025
a3e9ca8
Merge remote-tracking branch 'origin/link-external-argocd' into feat-…
Ash-exp Jan 29, 2025
e11e5f0
added releaseMode validation
Ash-exp Jan 29, 2025
d422424
fix: isGitOpsEnable flag
Ash-exp Jan 29, 2025
de8627a
updated EnvironmentVariableList response
Ash-exp Jan 29, 2025
86ae011
Merge remote-tracking branch 'origin/crud-deployment-config' into fea…
Ash-exp Jan 29, 2025
33af0c6
updated git repo validations
Ash-exp Jan 29, 2025
563654f
updated migration number
Ash-exp Jan 30, 2025
4d03ff6
fix: skip pipeline create validation
Ash-exp Jan 30, 2025
b32db8d
panic handler for cd pipeline creation
Ash-exp Jan 30, 2025
ba13f52
updated wire dep
Ash-exp Jan 30, 2025
3fdf4f8
fix: cd trigger panic fix
Ash-exp Jan 31, 2025
ffea203
fix: validation migrate cd pipeline api
Ash-exp Jan 31, 2025
4ccb1ee
updated ValidateGitOpsRepoUrl request for custom gitops logic
Ash-exp Jan 31, 2025
64a2e6c
fix: git clone logic for validate migration request
Ash-exp Jan 31, 2025
a179894
fix: updated API key
Ash-exp Jan 31, 2025
2df5316
chart name handling for migrate release
Ash-exp Jan 31, 2025
3c37ea3
fix: chart validation
Ash-exp Jan 31, 2025
0a6eb42
fix: chart validation
Ash-exp Jan 31, 2025
abaa1e9
fix: pipeline creation
Ash-exp Feb 1, 2025
737f255
feat: is gitops repo configured flag updated
Ash-exp Feb 3, 2025
bcb6de9
wip: trigger fix
iamayushm Feb 3, 2025
5920380
feat: filter external argo app list
Ash-exp Feb 3, 2025
a0d24b4
read service for circular import
iamayushm Feb 4, 2025
a95a2ef
Merge remote-tracking branch 'origin/feat-gitops-client-refactoring' …
iamayushm Feb 4, 2025
f63027f
fix nil poniter panic
Ash-exp Feb 4, 2025
13548fc
fix: empty argo app list
Ash-exp Feb 4, 2025
2965d1b
fix empty app name
iamayushm Feb 4, 2025
8c40b19
updated dep of DeploymentConfigService instead of DeploymentConfigRea…
Ash-exp Feb 4, 2025
b202c20
minor refactorings
Ash-exp Feb 4, 2025
5ce1b1b
replaced release app name from util function
Ash-exp Feb 4, 2025
bd2f597
validation and flag if config is for external helm release
iamayushm Feb 4, 2025
68883b9
Merge remote-tracking branch 'origin/feat-gitops-client-refactoring' …
iamayushm Feb 4, 2025
238a9a0
fix migrated from flag
iamayushm Feb 4, 2025
8223283
fix: resource tree api with scoop
Ash-exp Feb 5, 2025
4112dce
fix: error handling for GetResourceTree
Ash-exp Feb 5, 2025
f668521
fixing set chart location function
iamayushm Feb 5, 2025
f6ff259
updating config type
iamayushm Feb 5, 2025
3375e8e
fix: scoop argo_cd GetResourceTree
Ash-exp Feb 5, 2025
cc0df06
fix: updated validation error
Ash-exp Feb 5, 2025
1a7e90d
fix: updated BuildDeployedAppName references
Ash-exp Feb 6, 2025
f7cd451
fix: common wire set
Ash-exp Feb 6, 2025
618ecc2
updating chart location while delete
iamayushm Feb 6, 2025
7a1bcf1
fix user id
iamayushm Feb 6, 2025
ebc2ada
common function for url already present
iamayushm Feb 6, 2025
2b4e297
removing duplicate logic for pipeline filter
iamayushm Feb 6, 2025
41e4fc6
fix: nil checker issues
Ash-exp Feb 7, 2025
d3a77b1
updated global api
Ash-exp Feb 7, 2025
a094ceb
pg no rows handling
iamayushm Feb 7, 2025
401f332
manual sync mode fix for trigger/deployment statys
iamayushm Feb 7, 2025
bde0385
fix: resource tree
Ash-exp Feb 8, 2025
ff5ce6e
fix: panic handling
Ash-exp Feb 8, 2025
d7208d7
fix default namespace
iamayushm Feb 9, 2025
2fcc06c
wip
iamayushm Feb 9, 2025
c7eb21c
fix: pipeline delete flow
Ash-exp Feb 9, 2025
3a7f0fc
fix: delete apllication object
Ash-exp Feb 10, 2025
40a271e
fix: delete application object
Ash-exp Feb 10, 2025
39696ba
chore: refactored AppDetailsReadService
Ash-exp Feb 10, 2025
9bfaac0
added: vlaidation for link external release
Ash-exp Feb 10, 2025
0c66b84
review comment incorporated
Ash-exp Feb 10, 2025
e1501e6
fix: pointer datatype
Ash-exp Feb 10, 2025
181763d
added: EnforcedPolicyViolation validation
Ash-exp Feb 10, 2025
b7602af
Merge remote-tracking branch 'origin/develop' into feat-gitops-client…
Ash-exp Feb 10, 2025
6adaf88
fix app clone
iamayushm Feb 11, 2025
4bb383c
make fix
iamayushm Feb 11, 2025
8fa26b4
fix: workflow_execution_stage cloumn
Ash-exp Feb 11, 2025
8575a6d
added gitops adapter
Ash-exp Feb 11, 2025
95a0e19
helm deployment status fix
iamayushm Feb 11, 2025
c835099
updated deployment config queries
Ash-exp Feb 11, 2025
e785cfd
fix: generate manifest diff
Ash-exp Feb 12, 2025
a74e685
wire gen updated
Ash-exp Feb 12, 2025
4d108cf
updated feature flag name
Ash-exp Feb 12, 2025
5bbe9c0
updated env_gen.md file
Ash-exp Feb 12, 2025
1e639e4
feat: argocd resource tree support
Ash-exp Feb 12, 2025
69a88d8
fix: nil handling updated
Ash-exp Feb 13, 2025
e37f8e4
fix: context handling
Ash-exp Feb 13, 2025
f44a592
Merge remote-tracking branch 'origin/develop' into feat-gitops-client…
Ash-exp Feb 13, 2025
6d156f7
review changes
iamayushm Feb 13, 2025
1585ac6
chore: deployment config refactorings
Ash-exp Feb 16, 2025
8c5eb5d
fix: on-board argocd issues
Ash-exp Feb 16, 2025
188093e
updated updateArgoAppDeleteStatus func
Ash-exp Feb 16, 2025
74ad6ad
Merge remote-tracking branch 'origin/feat-gitops-client-refactoring' …
Ash-exp Feb 16, 2025
529a935
Merge pull request #6399 from devtron-labs/chore-deployment-config-re…
Ash-exp Feb 16, 2025
eb9c8b4
review changes
iamayushm Feb 16, 2025
ad4a7c3
make fix
iamayushm Feb 16, 2025
d2c1a34
delete argo app error handling fixes
iamayushm Feb 17, 2025
b0f9e5a
payload changes
iamayushm Feb 17, 2025
0926759
argo app listing api updated
Ash-exp Feb 17, 2025
f0f8364
updated wire_gen files
Ash-exp Feb 17, 2025
e082b02
Merge remote-tracking branch 'origin/feat-gitops-client-refactoring' …
Ash-exp Feb 17, 2025
5538bf7
Merge pull request #6401 from devtron-labs/feat-resource-tree-support
Ash-exp Feb 17, 2025
7ed9631
chore: Argocd dependabot fixes (#6402)
iamayushm Feb 17, 2025
b565250
Merge pull request #6316 from devtron-labs/feat-gitops-client-refacto…
Ash-exp Feb 17, 2025
41dc355
Merge pull request #6315 from devtron-labs/crud-deployment-config
Ash-exp Feb 17, 2025
2597330
develop merge
iamayushm Feb 17, 2025
0ee8a66
fix: link request
iamayushm Feb 17, 2025
ef1cc8e
updated migration script
Ash-exp Feb 17, 2025
fdd08e8
fix: GetDeploymentConfigMinForAppAndEnv for app stage api
Ash-exp Feb 17, 2025
a53fbbf
fix: helm app gitops target revision
Ash-exp Feb 17, 2025
79df35d
fix: cd pipeline create blocked if argo module not installed
Ash-exp Feb 17, 2025
261b336
setting repo url in new deployment config also
iamayushm Feb 18, 2025
6af3d53
default branch (backward compatibility) if branch is not passed
iamayushm Feb 18, 2025
035a492
updated target revision
Ash-exp Feb 18, 2025
45ef00d
fix: release config target revision
Ash-exp Feb 18, 2025
9d29f84
updated not deployed status to degraded
Ash-exp Feb 18, 2025
d4aaa1e
feat-gitops-client branch merge
iamayushm Feb 18, 2025
ee27457
go mod tidy
iamayushm Feb 18, 2025
0b256b1
helm list api moved from enterprise
iamayushm Feb 19, 2025
616574e
fix: app delete flow
Ash-exp Feb 19, 2025
3b1ff1d
listing api
iamayushm Feb 20, 2025
4715416
query fix
iamayushm Feb 20, 2025
17ee219
fix: git commit ref not found
Ash-exp Feb 20, 2025
70edd33
fix: git commit ref not found
Ash-exp Feb 20, 2025
df39ac0
fix: gitops branch pull error
Ash-exp Feb 20, 2025
8d492ab
validate api for external helm release
iamayushm Feb 20, 2025
32e5226
fix enum
iamayushm Feb 20, 2025
ba05130
Merge remote-tracking branch 'origin/develop' into link-external-argocd
Ash-exp Feb 21, 2025
fc13736
fix: removed unused import
Ash-exp Feb 21, 2025
d9eaabb
chore: func renamed
Ash-exp Feb 21, 2025
28955a9
rest handler update
iamayushm Feb 21, 2025
e64b583
updating chart location when base version is changed
iamayushm Feb 22, 2025
16c9c46
chart location update in deployment config
iamayushm Feb 26, 2025
4a33711
chart env override fix
iamayushm Feb 26, 2025
9c99261
wip: fixed pg no rows
iamayushm Feb 28, 2025
378dbfe
wip: bug fixes
iamayushm Feb 28, 2025
3c7a438
develop merge
iamayushm Mar 3, 2025
f1516aa
develop merge
iamayushm Mar 3, 2025
60aa140
fix empty env id
iamayushm Mar 3, 2025
dbad3fe
integration fixes
iamayushm Mar 3, 2025
8e87eba
is linkable true
iamayushm Mar 3, 2025
ece6647
fix chart name
iamayushm Mar 3, 2025
5cfa028
enterprise code moved
iamayushm Mar 3, 2025
f03822c
function rename
iamayushm Mar 4, 2025
5228751
merge parent branch
iamayushm Mar 4, 2025
7f9714c
fix empty cluster url
iamayushm Mar 4, 2025
8bd44a3
Merge branch 'link-external-argocd' into link-helm-release
iamayushm Mar 4, 2025
be2a4dd
namespace fix
iamayushm Mar 4, 2025
5b2537a
listing api fix
iamayushm Mar 4, 2025
4819369
wip: installed app query fix
iamayushm Mar 4, 2025
9b56ee2
fix for argo module not installed
iamayushm Mar 5, 2025
2d30bcc
wip: adding chart loaction
iamayushm Mar 5, 2025
03e296b
renaming
iamayushm Mar 5, 2025
0f28dc0
wip
iamayushm Mar 5, 2025
b7fb219
wip: head validation
iamayushm Mar 6, 2025
34d10f7
refactoring
iamayushm Mar 6, 2025
148c0d7
refactoring
iamayushm Mar 6, 2025
93cef5c
deployment app type change fix
iamayushm Mar 6, 2025
1290c4d
chart location heal
iamayushm Mar 6, 2025
774a749
wip: validation for linked pipeline in app change api
iamayushm Mar 6, 2025
8a589cf
fix deployment change api
iamayushm Mar 7, 2025
59e89f2
review changes
iamayushm Mar 7, 2025
6843583
Merge remote-tracking branch 'origin/develop' into link-external-argocd
iamayushm Mar 7, 2025
c61c4d5
migration update
iamayushm Mar 7, 2025
afecbed
wip: parent merge
iamayushm Mar 7, 2025
384ffb3
validation in create api
iamayushm Mar 7, 2025
59b195c
fixing issues
iamayushm Mar 9, 2025
a61b498
fix argo unsupported spec error parsingg
iamayushm Mar 9, 2025
697e7b5
zero time handling
iamayushm Mar 9, 2025
3f41da3
revert time parse
iamayushm Mar 9, 2025
2b32df0
empty createdAt handling
iamayushm Mar 9, 2025
b4409fc
develop merge
iamayushm Mar 9, 2025
f425d86
develop merge
iamayushm Mar 10, 2025
c0f134a
Merge remote-tracking branch 'origin/develop' into link-helm-release
iamayushm Mar 10, 2025
ea9f371
fixing messaging around gitOps
iamayushm Mar 11, 2025
76cc4b7
removing hard coding
iamayushm Mar 17, 2025
62e45f2
wip: deployment app name added
iamayushm Mar 17, 2025
46c1edf
fix cluster nil pointer
iamayushm Mar 17, 2025
7c43bfe
fix panic if values file is empty
iamayushm Mar 18, 2025
82503e6
renaming
iamayushm Mar 18, 2025
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
Prev Previous commit
Next Next commit
self review fix: env override create
iamayushm committed Jan 22, 2025
commit 2385dd2cf9569bb85a3881cf056b88a5ce7dfcbf
4 changes: 2 additions & 2 deletions client/argocdServer/ArgoClientWrapperService.go
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ type ApplicationClientWrapper interface {
// GetArgoAppByName fetches an argoCd app by its name
GetArgoAppByName(ctx context.Context, appName string) (*v1alpha1.Application, error)

GetArgoAppByNameWithK8s(ctx context.Context, clusterId int, namespace, appName string) (map[string]interface{}, error)
GetArgoAppByNameWithK8sClient(ctx context.Context, clusterId int, namespace, appName string) (map[string]interface{}, error)

// SyncArgoCDApplicationIfNeededAndRefresh - if ARGO_AUTO_SYNC_ENABLED=true, app will be refreshed to initiate refresh at argoCD side or else it will be synced and refreshed
SyncArgoCDApplicationIfNeededAndRefresh(context context.Context, argoAppName string) error
@@ -406,7 +406,7 @@ func (impl *ArgoClientWrapperServiceImpl) GetArgoAppByName(ctx context.Context,
return argoApplication, nil
}

func (impl *ArgoClientWrapperServiceImpl) GetArgoAppByNameWithK8s(ctx context.Context, clusterId int, namespace, appName string) (map[string]interface{}, error) {
func (impl *ArgoClientWrapperServiceImpl) GetArgoAppByNameWithK8sClient(ctx context.Context, clusterId int, namespace, appName string) (map[string]interface{}, error) {
k8sConfig, err := impl.acdConfigGetter.GetK8sConfigWithClusterIdAndNamespace(clusterId, namespace)
if err != nil {
impl.logger.Errorw("error in getting k8s config", "err", err)
2 changes: 1 addition & 1 deletion client/argocdServer/ArgoClientWrapperServiceEA.go
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ func (impl *ArgoClientWrapperServiceEAImpl) GetArgoAppByName(ctx context.Context
return nil, nil
}

func (impl *ArgoClientWrapperServiceEAImpl) GetArgoAppByNameWithK8s(ctx context.Context, clusterId int, namespace, appName string) (map[string]interface{}, error) {
func (impl *ArgoClientWrapperServiceEAImpl) GetArgoAppByNameWithK8sClient(ctx context.Context, clusterId int, namespace, appName string) (map[string]interface{}, error) {
impl.logger.Info("not implemented for EA mode")
return nil, nil
}
9 changes: 5 additions & 4 deletions pkg/app/AppService.go
Original file line number Diff line number Diff line change
@@ -40,7 +40,6 @@ import (
"github.com/devtron-labs/devtron/pkg/deployment/manifest/deploymentTemplate/read"
bean4 "github.com/devtron-labs/devtron/pkg/deployment/trigger/devtronApps/bean"
"net/url"
"path/filepath"
"strconv"
"time"

@@ -779,8 +778,10 @@ type ValuesOverrideResponse struct {
}

func (impl *AppServiceImpl) CreateGitOpsRepo(app *app.App, userId int32) (gitopsRepoName string, chartGitAttr *commonBean.ChartGitAttribute, err error) {
chart, err := impl.chartRepository.FindLatestChartForAppByAppId(app.Id)
if err != nil && pg.ErrNoRows != err {

deploymentConfig, err := impl.deploymentConfigService.GetConfigForDevtronApps(app.Id, 0)
if err != nil {
impl.logger.Errorw("error in getting deployment config for devtron apps", "appId", app.Id, "err", err)
return "", nil, err
}
gitOpsRepoName := impl.gitOpsConfigReadService.GetGitOpsRepoName(app.AppName)
@@ -789,7 +790,7 @@ func (impl *AppServiceImpl) CreateGitOpsRepo(app *app.App, userId int32) (gitops
impl.logger.Errorw("error in pushing chart to git ", "gitOpsRepoName", gitOpsRepoName, "err", err)
return "", nil, err
}
chartGitAttr.ChartLocation = filepath.Join(chart.ReferenceTemplate, chart.ChartVersion)
chartGitAttr.ChartLocation = deploymentConfig.GetChartLocation()
return gitOpsRepoName, chartGitAttr, nil
}

14 changes: 8 additions & 6 deletions pkg/deployment/common/deploymentConfigService.go
Original file line number Diff line number Diff line change
@@ -200,8 +200,8 @@ func (impl *DeploymentConfigServiceImpl) parseAppLevelReleaseConfigForDevtronApp
if len(appLevelConfig.RepoURL) > 0 {
repoURL = appLevelConfig.RepoURL
}

releaseConfig := newAppLevelReleaseConfigFromChart(repoURL, chart.ChartLocation)
chartLocation := filepath.Join(chart.ReferenceTemplate, chart.ChartVersion)
releaseConfig := newAppLevelReleaseConfigFromChart(repoURL, chartLocation)
return releaseConfig, nil
}

@@ -322,7 +322,9 @@ func (impl *DeploymentConfigServiceImpl) parseAppLevelMigrationDataForDevtronApp
if err != nil {
return nil, err
}
releaseConfig := newAppLevelReleaseConfigFromChart(chart.GitRepoUrl, chart.ChartLocation)

chartLocation := filepath.Join(chart.ReferenceTemplate, chart.ChartVersion)
releaseConfig := newAppLevelReleaseConfigFromChart(chart.GitRepoUrl, chartLocation)
config := &bean.DeploymentConfig{
AppId: appId,
ConfigType: GetDeploymentConfigType(chart.IsCustomGitRepository),
@@ -377,11 +379,11 @@ func (impl *DeploymentConfigServiceImpl) parseEnvLevelReleaseConfigForDevtronApp

releaseConfig.Version = bean.Version

envOverride, err := impl.EnvConfigOverrideService.ActiveEnvConfigOverride(appId, envId)
if err != nil {
envOverride, err := impl.EnvConfigOverrideService.FindLatestChartForAppByAppIdAndEnvId(appId, envId)
if err != nil && !errors.Is(err, pg.ErrNoRows) {
impl.logger.Errorw("error in fetch")
return nil, err
}

var latestChart *chartRepoRepository.Chart
if (envOverride.Id == 0) || (envOverride.Id > 0 && !envOverride.IsOverride) {
latestChart, err = impl.chartRepository.FindLatestChartForAppByAppId(appId)
Loading