Skip to content

Commit c21ddb8

Browse files
kartik-579Shubham9t9Shubham9t9ajaydevtronAjay Kumar
authored
Oss sync argo upgrade (#7)
* docs: Updated README.md file for Devtron chart (#2887) * Updated README.md file for DEvtron chart * incorporated changes mentioned in comments * minor spelling correction --------- Co-authored-by: Shubham9t9 <[email protected]> * removed command to install a particular version of Devtron (#2888) Co-authored-by: Shubham9t9 <[email protected]> * feat: Support of reuse container image in containers section in reference chart 4-17 (#2675) * support of reuse conatiner image in containers section * support of reuse container image in latest deployment and rollout chart * added the readme --------- Co-authored-by: Ajay Kumar <[email protected]> * release: PR for v0.6.11 (#2866) * Created release-notes files * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of hyperion in installer * Updated latest image of devtron in installer * Updated release notes * Updated latest image of hyperion in installer * Updated latest image of devtron in installer * Updated latest image of dashboard in installer * Updated release notes * Updated latest image of devtron in installer * Updated latest image of dashboard in installer * Updated latest image of hyperion in installer * Updated latest image of dashboard in installer * Updated release notes * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated release notes * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated latest image of ci-runner in installer * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated release notes * Updated latest image of hyperion in installer * Updated latest image of devtron in installer * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of devtron in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of hyperion in installer * Updated latest image of devtron in installer * Updated release notes * Updated release notes * Updated latest image of hyperion in installer * Updated latest image of hyperion in installer * Updated release notes * Updated latest image of hyperion in installer * Update release.txt * Updated latest image of git-sensor in installer * Updated latest image of kubewatch in installer * Updated latest image of image-scanner in installer * Updated latest image of git-sensor in installer * Updated latest image of ci-runner in installer * Updated latest image of lens in installer * Updated nats image in devtron latest release * Update installation-script * Updated latest image of devtron in installer * Updated latest image of kubelink in installer * Updated latest image of dashboard in installer * Update values.yaml * Updated latest image of hyperion in installer * Updated release-notes files * Update releasenotes.md --------- Co-authored-by: pawan-mehta-dt <[email protected]> * feat: Showing app status on app listing page (#2799) * wip * rest-handler commit * constructors added * test commit * minor design change and resthandler dev * getting app_name and env_name in repo layer for rbac optimisation * rabc checks moved to service layer for optimisation * rbac checks in batch * getting env_identifier instead of env name * delete and update methods completed in repo layer * updating app-status for applisting and cdhandler hook points * updating app-status for app-store app deployed with gitops * added AppId field in InstalledAppAndEnvDetails struct * added update app status hook in fetch resource tree function * wip * unstable wire * sending app_status for overview page via other env api * fix * added delete with appid and envid api's * deleted active column from db * fix * query fix * query fix * fix * update hook added * fix * fix * wire * wire hyperion * query output error fix * delete api fix * delete api fix for installed apps * open api helm-app struct updated * delete query change * sql up script * port fix * delete hook code updated * unit test skeleton added for repo layer * cleaned unused code * unit tests WIP * unit tests(service layer) done for update api * unit tests(service layer) done for Delete api * fix * mocks * Integration tests WIP * integration tests for update method * integration tests for delete method * integration tests for delete_with_appid method * integration tests for delete_with_envid method * fix * restructuring * renaming script number * minor code restructuring * refactor tests * skip tests stmnts added * added filter support on app_status * script number changed * fix * query fix * wip * storing suspended status as hibernating * app-status filtering for installed apps * update app-status on appStatus_update_topic nats event * updated sql script number * wire * port fix * fix * code review changes * sql down script * removed code duplication * improved logging * code review changes * optimised query * query fix * removed commented code * changed error log to warn log * updated sql script number * fix: ingress url missing (#2915) * hotfix ingress url for get resource * fix cluster id in get resource request * task: added api for getting default template values (#2905) * added api for getting default template values * refactoring * updated spec * feat: argo stack upgrade (#2597) * updated libraries * temp change: reverted go version * argocd assets * updated go version for full mode Dockerfile * updated argo cd chart and server version * updated argo workflow image and removed pns executor from workflow-controller cm * updated argo wf controller executor image * updated wf controller and executor image * updated devtron-bom.yaml * added wf controller image config in devtron-bom.yaml * reverted change in workflow.yaml * updated argo wf controller crds * wip * updated workflow controller crds * wip - updated image * reverted image change * added argocd assets * wip * image changes * updated installation script * reverted argo image changes * reverted argo image changes - part 2 * reverted rollout image --------- Co-authored-by: Shubham Kumar <[email protected]> Co-authored-by: Shubham9t9 <[email protected]> Co-authored-by: AJAY KUMAR <[email protected]> Co-authored-by: Ajay Kumar <[email protected]> Co-authored-by: Prakarsh <[email protected]> Co-authored-by: pawan-mehta-dt <[email protected]> Co-authored-by: Gireesh Naidu <[email protected]> Co-authored-by: Vikram <[email protected]>
1 parent e53cb1c commit c21ddb8

File tree

1,203 files changed

+153361
-65745
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,203 files changed

+153361
-65745
lines changed

CHANGELOG/release-notes-v0.6.11.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## v0.6.11
2+
3+
## Bugs
4+
- fix: Nats server version upgrade (#2837)
5+
- fix: K8s side resources error handled some unable to fetch some kinds in cluster (#2896)
6+
- fix: helm and gitOps pipeline feature gap changes (#2891)
7+
- fix: Adding /Deleting git material reflection in workflow editor and build & deploy (#2744)
8+
- fix: issue resolved for notification on deployment trigger and telemetry summary event (#2893)
9+
- fix: helm manifest output in deployment history (#2822)
10+
- fix: sending appName in the response of getAppWorkflow API (#2879)
11+
- fix: cluster not reachable handling (#2872)
12+
## Enhancements
13+
- feat: Support of reuse container image in containers section in reference chart 4-17 (#2675)
14+
- feat: Added Rollout chart 4.17 and Deployment chart 1.1 with canary using flagger and Istio support (#2910)
15+
- feat: Codacy plugin integration (#2892)
16+
- feat: Semgrep plugin integration (#2877)
17+
- perf: Tracing observability tool integration (#2782)
18+
## Documentation
19+
- docs: removed command to install a particular version of Devtron (#2888)
20+
- docs: Updated README.md file for Devtron chart (#2887)
21+
- docs: added manage tags (#2907)
22+
- docs: updated target platform (#2857)
23+
## Others
24+
- task: added new fields for eso secrets (#2899)
25+
- task: updated deployment status timeline api for helm based pipelines (#2897)
26+
- task: updated logic for adding health status timeline (#2870)
27+
28+
29+
## v0.6.11-rc.0
30+
31+
## Bugs
32+
- fix: bitbucket gitops config fixes (#2768)
33+
- fix: updated sonarqube plugin script (#2855)
34+
- fix: updated the description in sonarqube migration (#2853)
35+
- fix: External Ci Trigger - Won't show images for manual Cd pipelines (#2802)
36+
- fix: app create api bug fix if chart ref is different (#2851)
37+
- fix: Dockerfile git repo delete tooltip view to build config (#2792)
38+
## Enhancements
39+
- feat: Option for changing project in Helm apps and project assignment to CLI helm apps. (#2780)
40+
- feat: Audit logs for resource deletion from devtron UI (#2791)
41+
- feat: verify token function scope made public (#2856)
42+
- feat: Sonarqube polling script update (#2846)
43+
- feat: deployment status restructuring (#2825)
44+
## Documentation
45+
- docs: updated aws external secret doc (#2781)
46+
- docs: updated broken links and minor updates (resource browser) (#2844)
47+
- docs: added cluster, k8s resource browser, k8s resource permission (#2787)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18 AS build-env
1+
FROM golang:1.19 AS build-env
22

33
RUN echo $GOPATH
44
RUN apt update

DockerfileEA

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18 AS build-env
1+
FROM golang:1.19 AS build-env
22

33
RUN echo $GOPATH
44
RUN apt update

Wire.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ import (
6262
"github.com/devtron-labs/devtron/client/telemetry"
6363
"github.com/devtron-labs/devtron/internal/sql/repository"
6464
app2 "github.com/devtron-labs/devtron/internal/sql/repository/app"
65+
appStatusRepo "github.com/devtron-labs/devtron/internal/sql/repository/appStatus"
6566
appWorkflow2 "github.com/devtron-labs/devtron/internal/sql/repository/appWorkflow"
6667
"github.com/devtron-labs/devtron/internal/sql/repository/bulkUpdate"
6768
"github.com/devtron-labs/devtron/internal/sql/repository/chartConfig"
@@ -74,6 +75,7 @@ import (
7475
"github.com/devtron-labs/devtron/pkg/app"
7576
"github.com/devtron-labs/devtron/pkg/appClone"
7677
"github.com/devtron-labs/devtron/pkg/appClone/batch"
78+
"github.com/devtron-labs/devtron/pkg/appStatus"
7779
appStoreBean "github.com/devtron-labs/devtron/pkg/appStore/bean"
7880
appStoreDeploymentFullMode "github.com/devtron-labs/devtron/pkg/appStore/deployment/fullMode"
7981
repository4 "github.com/devtron-labs/devtron/pkg/appStore/deployment/repository"
@@ -751,6 +753,13 @@ func InitializeApp() (*App, error) {
751753
cron.NewCdApplicationStatusUpdateHandlerImpl,
752754
wire.Bind(new(cron.CdApplicationStatusUpdateHandler), new(*cron.CdApplicationStatusUpdateHandlerImpl)),
753755

756+
//app_status
757+
appStatusRepo.NewAppStatusRepositoryImpl,
758+
wire.Bind(new(appStatusRepo.AppStatusRepository), new(*appStatusRepo.AppStatusRepositoryImpl)),
759+
appStatus.NewAppStatusServiceImpl,
760+
wire.Bind(new(appStatus.AppStatusService), new(*appStatus.AppStatusServiceImpl)),
761+
//app_status ends
762+
754763
cron.GetCiWorkflowStatusUpdateConfig,
755764
cron.NewCiStatusUpdateCronImpl,
756765
wire.Bind(new(cron.CiStatusUpdateCron), new(*cron.CiStatusUpdateCronImpl)),

api/appStore/InstalledAppRestHandler.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ func (handler InstalledAppRestHandlerImpl) GetAllInstalledApp(w http.ResponseWri
143143
}
144144
}
145145
}
146+
147+
var appStatuses []string
148+
appStatusesStr := v.Get("appStatuses")
149+
if len(appStatusesStr) > 0 {
150+
appStatuses = strings.Split(appStatusesStr, ",")
151+
}
146152
appStoreName := v.Get("appStoreName")
147153
appName := v.Get("appName")
148154
offset := 0
@@ -155,7 +161,15 @@ func (handler InstalledAppRestHandlerImpl) GetAllInstalledApp(w http.ResponseWri
155161
if len(sizeStr) > 0 {
156162
size, _ = strconv.Atoi(sizeStr)
157163
}
158-
filter := &appStoreBean.AppStoreFilter{OnlyDeprecated: onlyDeprecated, ChartRepoId: chartRepoIds, AppStoreName: appStoreName, EnvIds: envIds, AppName: appName, ClusterIds: clusterIds}
164+
filter := &appStoreBean.AppStoreFilter{
165+
OnlyDeprecated: onlyDeprecated,
166+
ChartRepoId: chartRepoIds,
167+
AppStoreName: appStoreName,
168+
EnvIds: envIds,
169+
AppName: appName,
170+
ClusterIds: clusterIds,
171+
AppStatuses: appStatuses,
172+
}
159173
if size > 0 {
160174
filter.Size = size
161175
filter.Offset = offset

api/bean/AppView.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ type AppEnvironmentContainer struct {
6262
DeploymentCounter int `json:"deploymentCounter,omitempty"`
6363
InstanceCounter int `json:"instanceCounter,omitempty"`
6464
Status string `json:"status"`
65+
AppStatus string `json:"appStatus"`
6566
CdStageStatus *string `json:"cdStageStatus"`
6667
PreStageStatus *string `json:"preStageStatus"`
6768
PostStageStatus *string `json:"postStageStatus"`
@@ -123,6 +124,7 @@ type AppDetailContainer struct {
123124
}
124125

125126
type Environment struct {
127+
AppStatus string `json:"appStatus"` //this is not the status of environment , this make sense with a specific app only
126128
EnvironmentId int `json:"environmentId"`
127129
EnvironmentName string `json:"environmentName"`
128130
AppMetrics *bool `json:"appMetrics"`

api/helm-app/openapiClient/model_helm_app.go

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

api/restHandler/AppListingRestHandler.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig"
3434
"github.com/devtron-labs/devtron/internal/util"
3535
"github.com/devtron-labs/devtron/pkg/app"
36+
"github.com/devtron-labs/devtron/pkg/appStatus"
3637
service1 "github.com/devtron-labs/devtron/pkg/appStore/deployment/service"
3738
"github.com/devtron-labs/devtron/pkg/cluster"
3839
"github.com/devtron-labs/devtron/pkg/deploymentGroup"
@@ -85,6 +86,7 @@ type AppListingRestHandlerImpl struct {
8586
installedAppService service1.InstalledAppService
8687
cdApplicationStatusUpdateHandler cron.CdApplicationStatusUpdateHandler
8788
pipelineRepository pipelineConfig.PipelineRepository
89+
appStatusService appStatus.AppStatusService
8890
}
8991

9092
type AppStatus struct {
@@ -105,7 +107,8 @@ func NewAppListingRestHandlerImpl(application application.ServiceClient,
105107
helmAppClient client.HelmAppClient, clusterService cluster.ClusterService, helmAppService client.HelmAppService,
106108
argoUserService argo.ArgoUserService, k8sApplicationService k8s.K8sApplicationService, installedAppService service1.InstalledAppService,
107109
cdApplicationStatusUpdateHandler cron.CdApplicationStatusUpdateHandler,
108-
pipelineRepository pipelineConfig.PipelineRepository) *AppListingRestHandlerImpl {
110+
pipelineRepository pipelineConfig.PipelineRepository,
111+
appStatusService appStatus.AppStatusService) *AppListingRestHandlerImpl {
109112
appListingHandler := &AppListingRestHandlerImpl{
110113
application: application,
111114
appListingService: appListingService,
@@ -124,6 +127,7 @@ func NewAppListingRestHandlerImpl(application application.ServiceClient,
124127
installedAppService: installedAppService,
125128
cdApplicationStatusUpdateHandler: cdApplicationStatusUpdateHandler,
126129
pipelineRepository: pipelineRepository,
130+
appStatusService: appStatusService,
127131
}
128132
return appListingHandler
129133
}
@@ -806,6 +810,12 @@ func (handler AppListingRestHandlerImpl) fetchResourceTree(w http.ResponseWriter
806810
handler.logger.Errorw("error in syncing pipeline status", "err", err)
807811
}
808812
}
813+
//updating app_status table here
814+
err = handler.appStatusService.UpdateStatusWithAppIdEnvId(appDetail.AppId, appDetail.EnvironmentId, resp.Status)
815+
if err != nil {
816+
handler.logger.Warnw("error in updating app status", "err", err, "appId", appDetail.AppId, "envId", appDetail.EnvironmentId)
817+
}
818+
809819
} else if len(appDetail.AppName) > 0 && len(appDetail.EnvironmentName) > 0 && util.IsHelmApp(appDetail.DeploymentAppType) {
810820
config, err := handler.helmAppService.GetClusterConf(appDetail.ClusterId)
811821
if err != nil {

api/restHandler/app/DeploymentPipelineRestHandler.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type DevtronAppDeploymentRestHandler interface {
4040
type DevtronAppDeploymentConfigRestHandler interface {
4141
ConfigureDeploymentTemplateForApp(w http.ResponseWriter, r *http.Request)
4242
GetDeploymentTemplate(w http.ResponseWriter, r *http.Request)
43+
GetDefaultDeploymentTemplate(w http.ResponseWriter, r *http.Request)
4344
GetAppOverrideForDefaultTemplate(w http.ResponseWriter, r *http.Request)
4445

4546
EnvConfigOverrideCreate(w http.ResponseWriter, r *http.Request)
@@ -588,6 +589,40 @@ func (handler PipelineConfigRestHandlerImpl) GetDeploymentTemplate(w http.Respon
588589
common.WriteJsonResp(w, nil, appConfigResponse, http.StatusOK)
589590
}
590591

592+
func (handler *PipelineConfigRestHandlerImpl) GetDefaultDeploymentTemplate(w http.ResponseWriter, r *http.Request) {
593+
vars := mux.Vars(r)
594+
appId, err := strconv.Atoi(vars["appId"])
595+
if err != nil {
596+
handler.Logger.Error("error in getting appId path param, GetDefaultDeploymentTemplate", "err", err)
597+
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
598+
return
599+
}
600+
chartRefId, err := strconv.Atoi(vars["chartRefId"])
601+
if err != nil {
602+
handler.Logger.Error("error in getting chartRefId path param, GetDefaultDeploymentTemplate", "err", err)
603+
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
604+
return
605+
}
606+
token := r.Header.Get("token")
607+
app, err := handler.pipelineBuilder.GetApp(appId)
608+
if err != nil {
609+
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
610+
return
611+
}
612+
obj := handler.enforcerUtil.GetAppRBACName(app.AppName)
613+
if ok := handler.enforcer.Enforce(token, casbin.ResourceApplications, casbin.ActionGet, obj); !ok {
614+
common.WriteJsonResp(w, fmt.Errorf("unauthorized user"), "unauthorized user", http.StatusForbidden)
615+
return
616+
}
617+
defaultTemplate, err := handler.chartService.GetAppOverrideForDefaultTemplate(chartRefId)
618+
if err != nil {
619+
handler.Logger.Errorw("error in getting default deployment template, GetDefaultDeploymentTemplate", "err", err, "appId", appId, "chartRefId", chartRefId)
620+
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
621+
return
622+
}
623+
common.WriteJsonResp(w, nil, defaultTemplate, http.StatusOK)
624+
}
625+
591626
func (handler PipelineConfigRestHandlerImpl) GetCdPipelines(w http.ResponseWriter, r *http.Request) {
592627
vars := mux.Vars(r)
593628
appId, err := strconv.Atoi(vars["appId"])

api/router/PipelineConfigRouter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func (router PipelineConfigRouterImpl) initPipelineConfigRouter(configRouter *mu
6363

6464
configRouter.Path("/template").HandlerFunc(router.restHandler.ConfigureDeploymentTemplateForApp).Methods("POST")
6565
configRouter.Path("/template/{appId}/{chartRefId}").HandlerFunc(router.restHandler.GetDeploymentTemplate).Methods("GET")
66+
configRouter.Path("/template/default/{appId}/{chartRefId}").HandlerFunc(router.restHandler.GetDefaultDeploymentTemplate).Methods("GET")
6667
configRouter.Path("/template/update").HandlerFunc(router.restHandler.UpdateAppOverride).Methods("POST")
6768

6869
configRouter.Path("/cd-pipeline").HandlerFunc(router.restHandler.CreateCdPipeline).Methods("POST")

0 commit comments

Comments
 (0)