Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
resolved conflict, review changes
  • Loading branch information
vikramdevtron committed Apr 6, 2022
commit 6422a94cc9773b717470db6b7b4d27d6f093bec3
15 changes: 11 additions & 4 deletions api/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ type MuxRouter struct {
k8sApplicationRouter k8s.K8sApplicationRouter
pProfRouter PProfRouter
deploymentConfigRouter deployment.DeploymentConfigRouter
dashboardTelemetryRouter dashboardEvent.DashboardTelemetryRouter
commonDeploymentRouter appStoreDeployment.CommonDeploymentRouter
}

Expand All @@ -118,7 +119,7 @@ func NewMuxRouter(logger *zap.SugaredLogger, HelmRouter HelmRouter, PipelineConf
policyRouter PolicyRouter, gitOpsConfigRouter GitOpsConfigRouter, dashboardRouter dashboard.DashboardRouter, attributesRouter AttributesRouter,
commonRouter CommonRouter, grafanaRouter GrafanaRouter, ssoLoginRouter sso.SsoLoginRouter, telemetryRouter TelemetryRouter, telemetryWatcher telemetry.TelemetryEventClient, bulkUpdateRouter BulkUpdateRouter, webhookListenerRouter WebhookListenerRouter, appLabelsRouter AppLabelRouter,
coreAppRouter CoreAppRouter, helmAppRouter client.HelmAppRouter, k8sApplicationRouter k8s.K8sApplicationRouter,
pProfRouter PProfRouter, deploymentConfigRouter deployment.DeploymentConfigRouter,
pProfRouter PProfRouter, deploymentConfigRouter deployment.DeploymentConfigRouter, dashboardTelemetryRouter dashboardEvent.DashboardTelemetryRouter,
commonDeploymentRouter appStoreDeployment.CommonDeploymentRouter) *MuxRouter {
r := &MuxRouter{
Router: mux.NewRouter(),
Expand Down Expand Up @@ -173,6 +174,7 @@ func NewMuxRouter(logger *zap.SugaredLogger, HelmRouter HelmRouter, PipelineConf
k8sApplicationRouter: k8sApplicationRouter,
pProfRouter: pProfRouter,
deploymentConfigRouter: deploymentConfigRouter,
dashboardTelemetryRouter: dashboardTelemetryRouter,
commonDeploymentRouter: commonDeploymentRouter,
}
return r
Expand Down Expand Up @@ -333,9 +335,14 @@ func (r MuxRouter) Init() {
r.deploymentConfigRouter.Init(deploymentConfigSubRouter)
// deployment router ends

// dashboard event router starts
dashboardTelemetryRouter := r.Router.PathPrefix("/orchestrator/dashboard-event").Subrouter()
r.dashboardTelemetryRouter.Init(dashboardTelemetryRouter)
// dashboard event router ends

//GitOps,Acd + HelmCLi both apps deployment related api's
helmApp := r.Router.PathPrefix("/orchestrator/application").Subrouter()
r.commonDeploymentRouter.Init(helmApp)
applicationSubRouter := r.Router.PathPrefix("/orchestrator/application").Subrouter()
r.commonDeploymentRouter.Init(applicationSubRouter)
//this router must placed after commonDeploymentRouter
r.helmAppRouter.InitAppListRouter(helmApp)
r.helmAppRouter.InitAppListRouter(applicationSubRouter)
}
9 changes: 6 additions & 3 deletions cmd/external-app/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type MuxRouter struct {
appStoreDiscoverRouter appStoreDiscover.AppStoreDiscoverRouter
appStoreValuesRouter appStoreValues.AppStoreValuesRouter
appStoreDeploymentRouter appStoreDeployment.AppStoreDeploymentRouter
dashboardTelemetryRouter dashboardEvent.DashboardTelemetryRouter
commonDeploymentRouter appStoreDeployment.CommonDeploymentRouter
}

Expand All @@ -55,6 +56,7 @@ func NewMuxRouter(
appStoreDiscoverRouter appStoreDiscover.AppStoreDiscoverRouter,
appStoreValuesRouter appStoreValues.AppStoreValuesRouter,
appStoreDeploymentRouter appStoreDeployment.AppStoreDeploymentRouter,
dashboardTelemetryRouter dashboardEvent.DashboardTelemetryRouter,
commonDeploymentRouter appStoreDeployment.CommonDeploymentRouter,
) *MuxRouter {
r := &MuxRouter{
Expand All @@ -73,6 +75,7 @@ func NewMuxRouter(
appStoreDiscoverRouter: appStoreDiscoverRouter,
appStoreValuesRouter: appStoreValuesRouter,
appStoreDeploymentRouter: appStoreDeploymentRouter,
dashboardTelemetryRouter: dashboardTelemetryRouter,
commonDeploymentRouter: commonDeploymentRouter,
}
return r
Expand Down Expand Up @@ -128,9 +131,9 @@ func (r *MuxRouter) Init() {
dashboardRouter := r.Router.PathPrefix("/dashboard").Subrouter()
r.dashboardRouter.InitDashboardRouter(dashboardRouter)

helmApp := r.Router.PathPrefix("/orchestrator/application").Subrouter()
r.helmAppRouter.InitAppListRouter(helmApp)
r.commonDeploymentRouter.Init(helmApp)
applicationSubRouter := r.Router.PathPrefix("/orchestrator/application").Subrouter()
r.helmAppRouter.InitAppListRouter(applicationSubRouter)
r.commonDeploymentRouter.Init(applicationSubRouter)

k8sApp := r.Router.PathPrefix("/orchestrator/k8s").Subrouter()
r.k8sApplicationRouter.InitK8sApplicationRouter(k8sApp)
Expand Down
7 changes: 2 additions & 5 deletions cmd/external-app/wire_gen.go

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

16 changes: 0 additions & 16 deletions specs/api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,6 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/RollbackReleaseResponse"
/orchestrator/application/rollback/deprecated:
put:
description: Rollback application if the application is installed externally using helm (external-app)
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RollbackReleaseRequest'
responses:
"200":
description: application rollback response
content:
application/json:
schema:
$ref: "#/components/schemas/RollbackReleaseResponse"
components:
schemas:
RollbackReleaseResponse:
Expand Down
55 changes: 0 additions & 55 deletions specs/external-app/applist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,6 @@ paths:
text/event-stream:
schema:
$ref: "#/components/schemas/AppList"
/orchestrator/application/deployment-history/deprecated:
get:
description: deployment history of helm app
parameters:
- in: query
name: appId
example: "12|helm-app|cluster1-ns1"
description: project ids
required: true
allowEmptyValue: false
schema:
type: string
- in: query
name: installedAppId
example: "100"
description: devtron charts installed instance id
required: false
allowEmptyValue: false
schema:
type: number
responses:
"200":
description: deployment history
content:
application/json:
schema:
$ref: "#/components/schemas/DeploymentHistoryAndInstalledAppInfo"
/orchestrator/application/release-info:
get:
description: deployment values.yaml/release-info
Expand Down Expand Up @@ -340,34 +313,6 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/UpdateReleaseResponse"
/orchestrator/application/deployment-detail/deprecated:
get:
description: deployment details of helm app
parameters:
- in: query
name: appId
example: "12|helm-app|cluster1-ns1"
description: project ids
required: true
allowEmptyValue: false
schema:
type: string
- in: query
name: version
example: 1
description: deployment version
required: true
allowEmptyValue: false
schema:
type: integer
format: int32
responses:
"200":
description: deployment detail response
content:
application/json:
schema:
$ref: "#/components/schemas/HelmAppDeploymentManifestDetail"
/orchestrator/application/deployment-history:
get:
description: deployment history of helm app
Expand Down
4 changes: 3 additions & 1 deletion wire_gen.go

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

You are viewing a condensed version of this merge commit. You can view the full changes here.