Skip to content

Commit

Permalink
Merge branch 'main' into hotfix-bitbucket-gitops
Browse files Browse the repository at this point in the history
  • Loading branch information
vikramdevtron committed Dec 14, 2022
2 parents b675a5a + d79fff0 commit c2be4ab
Show file tree
Hide file tree
Showing 73 changed files with 5,872 additions and 646 deletions.
18 changes: 9 additions & 9 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
titleOnly: true

types:
- fix:
- feat:
- feature:
- fixes:
- chore:
- perf:
- docs:
- doc:
- release:
- fix
- feat
- feature
- fixes
- chore
- perf
- docs
- doc
- release
57 changes: 57 additions & 0 deletions CHANGELOG/release-notes-v0.6.9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## v0.6.9

## Bugs
- fix: specific error message if token is invalid while saving cluster (#2760)
## Enhancements
- feat: Resource status for integration (#2620)
- feat: Cluster terminal access for Super Admins (#2654)
- feat: Dynamic handling of deployment templates (#2596)
## Documentation
- docs: description for charts (#2646)


## v0.6.9-rc.1

## Bugs
- fix: Ignoring propagating invalid labels in app to values.yaml during deployment (#2734)
- fix: app clone response update for empty material and templates (#2717)
- fix: getting error message on deleting linked ci pipeline (#2732)
## Enhancements
- feat: Gitops or helm options for cd (#2673)
- feat: added BE support for allowing insecure tls connection in gitOps (#2738)
## Documentation
- docs: minor updates (#2)
- docs: webhook updates links (#2716)
- docs: webhook ci documentation updates (#2637)
- docs: add getting started doc (#2658)
- docs: broken links fixed (#2741)
## Others
- minor updates (#2722)
- fix for app type setting (#2723)
- task: updated environment variables in pre/post cd workflow request (#2727)
- Revert "feat: added BE support for allowing insecure tls connection in gitOps (#2738)" (#2739)
- minor updates (#2742)


## v0.6.9-rc.0

## Bugs
- fix: removed required validation for deployment template (#2713)
- fix: env variable tag bug in ci cd config (#2698)
- fix: Block deletion of devtronapp(devtron-operator chart) in helm apps (#2701)
- fix: migration down sql for 84 (#2706)
- Fix: Skip external ci webhook clone while app clone (#2704)
- fix: deployment template editor view support in create app api (#2697)
- Fix: External ci webhook response for api token. (#2699)
- fix: wf deletion bug and bulk cd pipeline req (#2693)
- fix: updated cluster connection status for update api (#2686)
## Enhancements
- Feat: External Ci webhook new interface, Deployment separated from build node. (#2664)
## Documentation
- docs: external-links-docs (#2679)
## Others
- sql migration error fix (#2695)
- External links extention for app level (#2573)
- added support for giving names in wf bulk deletion req (#2690)


5 changes: 5 additions & 0 deletions Wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,11 @@ func InitializeApp() (*App, error) {
wire.Bind(new(pipeline.GlobalCMCSService), new(*pipeline.GlobalCMCSServiceImpl)),
repository.NewGlobalCMCSRepositoryImpl,
wire.Bind(new(repository.GlobalCMCSRepository), new(*repository.GlobalCMCSRepositoryImpl)),

chartRepoRepository.NewGlobalStrategyMetadataRepositoryImpl,
wire.Bind(new(chartRepoRepository.GlobalStrategyMetadataRepository), new(*chartRepoRepository.GlobalStrategyMetadataRepositoryImpl)),
chartRepoRepository.NewGlobalStrategyMetadataChartRefMappingRepositoryImpl,
wire.Bind(new(chartRepoRepository.GlobalStrategyMetadataChartRefMappingRepository), new(*chartRepoRepository.GlobalStrategyMetadataChartRefMappingRepositoryImpl)),
)
return &App{}, nil
}
31 changes: 16 additions & 15 deletions api/appbean/AppDetail.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package appbean
import (
"github.com/devtron-labs/devtron/internal/sql/models"
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig"
"github.com/devtron-labs/devtron/pkg/chartRepo/repository"
"github.com/devtron-labs/devtron/pkg/pipeline/bean"
)

Expand Down Expand Up @@ -100,24 +101,24 @@ type BuildScript struct {
}

type CdPipelineDetails struct {
Name string `json:"name"` //pipelineName
EnvironmentName string `json:"environmentName" `
TriggerType pipelineConfig.TriggerType `json:"triggerType" validate:"required"`
DeploymentType pipelineConfig.DeploymentTemplate `json:"deploymentType,omitempty" validate:"oneof=BLUE-GREEN ROLLING CANARY RECREATE"` //
DeploymentStrategies []*DeploymentStrategy `json:"deploymentStrategies"`
PreStage *CdStage `json:"preStage"`
PostStage *CdStage `json:"postStage"`
PreStageConfigMapSecretNames *CdStageConfigMapSecretNames `json:"preStageConfigMapSecretNames"`
PostStageConfigMapSecretNames *CdStageConfigMapSecretNames `json:"postStageConfigMapSecretNames"`
RunPreStageInEnv bool `json:"runPreStageInEnv"`
RunPostStageInEnv bool `json:"runPostStageInEnv"`
IsClusterCdActive bool `json:"isClusterCdActive"`
Name string `json:"name"` //pipelineName
EnvironmentName string `json:"environmentName" `
TriggerType pipelineConfig.TriggerType `json:"triggerType" validate:"required"`
DeploymentStrategyType chartRepoRepository.DeploymentStrategy `json:"deploymentType,omitempty"` //
DeploymentStrategies []*DeploymentStrategy `json:"deploymentStrategies"`
PreStage *CdStage `json:"preStage"`
PostStage *CdStage `json:"postStage"`
PreStageConfigMapSecretNames *CdStageConfigMapSecretNames `json:"preStageConfigMapSecretNames"`
PostStageConfigMapSecretNames *CdStageConfigMapSecretNames `json:"postStageConfigMapSecretNames"`
RunPreStageInEnv bool `json:"runPreStageInEnv"`
RunPostStageInEnv bool `json:"runPostStageInEnv"`
IsClusterCdActive bool `json:"isClusterCdActive"`
}

type DeploymentStrategy struct {
DeploymentType pipelineConfig.DeploymentTemplate `json:"deploymentType,omitempty" validate:"oneof=BLUE-GREEN ROLLING CANARY RECREATE"` //
Config map[string]interface{} `json:"config,omitempty" validate:"string"`
IsDefault bool `json:"isDefault" validate:"required"`
DeploymentStrategyType chartRepoRepository.DeploymentStrategy `json:"deploymentType,omitempty"` //
Config map[string]interface{} `json:"config,omitempty" validate:"string"`
IsDefault bool `json:"isDefault" validate:"required"`
}

type CdStage struct {
Expand Down
24 changes: 12 additions & 12 deletions api/restHandler/CoreAppRestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -745,21 +745,21 @@ func (handler CoreAppRestHandlerImpl) buildCdPipelineResp(appId int, cdPipeline
}

cdPipelineResp := &appBean.CdPipelineDetails{
Name: cdPipeline.Name,
EnvironmentName: cdPipeline.EnvironmentName,
TriggerType: cdPipeline.TriggerType,
DeploymentType: cdPipeline.DeploymentTemplate,
RunPreStageInEnv: cdPipeline.RunPreStageInEnv,
RunPostStageInEnv: cdPipeline.RunPostStageInEnv,
IsClusterCdActive: cdPipeline.CdArgoSetup,
Name: cdPipeline.Name,
EnvironmentName: cdPipeline.EnvironmentName,
TriggerType: cdPipeline.TriggerType,
DeploymentStrategyType: cdPipeline.DeploymentTemplate,
RunPreStageInEnv: cdPipeline.RunPreStageInEnv,
RunPostStageInEnv: cdPipeline.RunPostStageInEnv,
IsClusterCdActive: cdPipeline.CdArgoSetup,
}

//build DeploymentStrategies resp
var deploymentTemplateStrategiesResp []*appBean.DeploymentStrategy
for _, strategy := range cdPipeline.Strategies {
deploymentTemplateStrategyResp := &appBean.DeploymentStrategy{
DeploymentType: strategy.DeploymentTemplate,
IsDefault: strategy.Default,
DeploymentStrategyType: strategy.DeploymentTemplate,
IsDefault: strategy.Default,
}
var configObj map[string]interface{}
if strategy.Config != nil {
Expand Down Expand Up @@ -1297,7 +1297,7 @@ func (handler CoreAppRestHandlerImpl) createDockerConfig(appId int, dockerConfig

// create global template
func (handler CoreAppRestHandlerImpl) createDeploymentTemplate(ctx context.Context, appId int, deploymentTemplate *appBean.DeploymentTemplate, userId int32) (error, int) {
handler.logger.Infow("Create App - creating deployment template", "appId", appId, "DeploymentTemplate", deploymentTemplate)
handler.logger.Infow("Create App - creating deployment template", "appId", appId, "DeploymentStrategy", deploymentTemplate)

createDeploymentTemplateRequest := chart.TemplateRequest{
AppId: appId,
Expand Down Expand Up @@ -1630,7 +1630,7 @@ func (handler CoreAppRestHandlerImpl) createCdPipelines(ctx context.Context, app
Namespace: envModel.Namespace,
AppWorkflowId: workflowId,
CiPipelineId: ciPipelineId,
DeploymentTemplate: cdPipeline.DeploymentType,
DeploymentTemplate: cdPipeline.DeploymentStrategyType,
TriggerType: cdPipeline.TriggerType,
CdArgoSetup: cdPipeline.IsClusterCdActive,
RunPreStageInEnv: cdPipeline.RunPreStageInEnv,
Expand Down Expand Up @@ -1962,7 +1962,7 @@ func convertCdDeploymentStrategies(deploymentStrategies []*appBean.DeploymentStr
var convertedStrategies []bean.Strategy
for _, deploymentStrategy := range deploymentStrategies {
convertedStrategy := bean.Strategy{
DeploymentTemplate: deploymentStrategy.DeploymentType,
DeploymentTemplate: deploymentStrategy.DeploymentStrategyType,
Default: deploymentStrategy.IsDefault,
}
strategyConfig, err := json.Marshal(deploymentStrategy.Config)
Expand Down
4 changes: 2 additions & 2 deletions charts/devtron/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: devtron-operator
appVersion: 0.6.9-rc.1
appVersion: 0.6.9
description: Chart to configure and install Devtron. Devtron is a Kubernetes Orchestration system.
keywords:
- Devtron
Expand All @@ -11,7 +11,7 @@ keywords:
- argocd
- Hyperion
engine: gotpl
version: 0.22.45
version: 0.22.46
sources:
- https://github.com/devtron-labs/charts
dependencies:
Expand Down
16 changes: 8 additions & 8 deletions charts/devtron/devtron-bom.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
installer:
release: "v0.6.9-rc.1"
release: "v0.6.9"
image: "quay.io/devtron/inception"
tag: "1d2b87e5-185-11095"

components:
dashboard:
image: "quay.io/devtron/dashboard:84390bed-325-11883"
image: "quay.io/devtron/dashboard:297a6598-325-11972"
devtron:
image: "quay.io/devtron/hyperion:a4027718-280-11885"
cicdImage: "quay.io/devtron/devtron:a4027718-326-11884"
image: "quay.io/devtron/hyperion:319346a1-280-11978"
cicdImage: "quay.io/devtron/devtron:319346a1-326-11976"
argocdDexServer:
image: "ghcr.io/dexidp/dex:v2.30.2"
initContainer:
authenticator: "quay.io/devtron/authenticator:4f57f862-393-11887"
authenticator: "quay.io/devtron/authenticator:6e466830-393-11943"
kubelink:
image: "quay.io/devtron/kubelink:1d2cc28a-318-11533"
image: "quay.io/devtron/kubelink:2ae4e7a7-318-11969"
postgres:
image: "quay.io/devtron/postgres:11.9.0-debian-10-r26"
armImage: "quay.io/devtron/postgres:11.9"
Expand All @@ -24,10 +24,10 @@ components:
envVars:
devtron:
GIT_BRANCH: "main"
GIT_HASH: "a402771810012681c6fcde4288f8eea1684ab8c7"
GIT_HASH: "319346a1f45d939d79120193e9e812687981d470"
casbin:
GIT_BRANCH: "main"
GIT_HASH: "a402771810012681c6fcde4288f8eea1684ab8c7"
GIT_HASH: "319346a1f45d939d79120193e9e812687981d470"

argo-cd:
global:
Expand Down
6 changes: 5 additions & 1 deletion charts/devtron/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Please wait for ~1 minute before running any of the following commands.

1. Run the following command to get the password for the default admin user:

Expand Down Expand Up @@ -48,6 +49,9 @@
3. To track the progress of Devtron microservices installation, run the following command:

kubectl -n devtroncd get installers installer-devtron -o jsonpath='{.status.sync.status}'

After running this command, if you get the results as:
1. "Downloaded" means installation in progress. But you can still start exploring Devtron
2. "Applied" means installation is successful.

{{- end }}

4 changes: 3 additions & 1 deletion charts/devtron/templates/notifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
name: notifier-secret
labels:
release: devtron
app: notifier
type: Opaque
{{- if .secrets }}
data:
Expand All @@ -24,6 +25,7 @@ metadata:
name: notifier-cm
labels:
release: devtron
app: notifier
data:
{{- if .configs}}
{{ toYaml .configs | indent 2 }}
Expand Down Expand Up @@ -107,4 +109,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
16 changes: 8 additions & 8 deletions charts/devtron/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
installer:
repo: "devtron-labs/devtron"
# For Kubernetes version < 1.16, set release: legacy. You won't be able to upgrade Devtron unless you upgrade the K8s version to 1.16 or above.
release: "v0.6.9-rc.1" #You can use a branch name or a release tag name as a release, for gitee as source only "main" is supported as of now
release: "v0.6.9" #You can use a branch name or a release tag name as a release, for gitee as source only "main" is supported as of now
image: quay.io/devtron/inception
tag: 1d2b87e5-185-11095
source: "github" # Available options are github and gitee
Expand Down Expand Up @@ -43,12 +43,12 @@ components:
sentry: "false"
sentryEnv: "PRODUCTION"
applicationMetrics: "true"
image: "quay.io/devtron/dashboard:84390bed-325-11883"
image: "quay.io/devtron/dashboard:297a6598-325-11972"
imagePullPolicy: IfNotPresent

devtron:
image: "quay.io/devtron/hyperion:a4027718-280-11885"
cicdImage: "quay.io/devtron/devtron:a4027718-326-11884"
image: "quay.io/devtron/hyperion:319346a1-280-11978"
cicdImage: "quay.io/devtron/devtron:319346a1-326-11976"
imagePullPolicy: IfNotPresent
customOverrides: {}
serviceMonitor:
Expand Down Expand Up @@ -77,10 +77,10 @@ components:
image: "ghcr.io/dexidp/dex:v2.30.2"
imagePullPolicy: IfNotPresent
initContainer:
authenticator: "quay.io/devtron/authenticator:4f57f862-393-11887"
authenticator: "quay.io/devtron/authenticator:6e466830-393-11943"

kubelink:
image: "quay.io/devtron/kubelink:1d2cc28a-318-11533"
image: "quay.io/devtron/kubelink:2ae4e7a7-318-11969"
imagePullPolicy: IfNotPresent

postgres:
Expand All @@ -98,13 +98,13 @@ components:
SCRIPT_LOCATION: "scripts/sql/"
GIT_REPO_URL: "https://github.com/devtron-labs/devtron.git"
DB_NAME: "orchestrator"
GIT_HASH: "a402771810012681c6fcde4288f8eea1684ab8c7"
GIT_HASH: "319346a1f45d939d79120193e9e812687981d470"
casbin:
GIT_BRANCH: "main"
SCRIPT_LOCATION: "scripts/casbin/"
GIT_REPO_URL: "https://github.com/devtron-labs/devtron.git"
DB_NAME: "casbin"
GIT_HASH: "a402771810012681c6fcde4288f8eea1684ab8c7"
GIT_HASH: "319346a1f45d939d79120193e9e812687981d470"

# values for argocd integration
argo-cd:
Expand Down
19 changes: 13 additions & 6 deletions docs/user-guide/creating-application/deployment-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,33 @@


A deployment configuration is a manifest of the application. It defines the runtime behavior of the application.

Devtron includes deployment template for both default as well as custom charts created by a super admin.
You can select one of the default deployment charts or custom deployment charts which are created by super admin.

To configure a deployment chart for your application, do the following steps:

* Go to **Applications** and create a new application.
* Go to **App Configuration** page and configure your application.
* On the **Base Deployment Template** page, select the drop-down under **Chart type**.

You can select a chart in one of the following ways:

## Select chart from Default Charts

You can select a default deployment chart from the following options:

1. [Deployment](deployment-template/deployment.md) (Recommended)
1. [Rollout Deployment](deployment-template/rollout-deployment.md)
2. [Cronjob & Job](deployment-template/job-and-cronjob.md)
2. [Job & CronJob](deployment-template/job-and-cronjob.md)
3. Knative


![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/deployment-template/deployment-chart.png)


## Select chart from Custom Charts

Custom charts are added by a super admin from the [Custom charts](../global-configurations/custom-charts.md) section.
Custom charts are added by users with `super admin` permission from the [Custom charts](../global-configurations/custom-charts.md) section.

Users can select the available custom charts from the drop-down list.
You can select the available custom charts from the drop-down list. You can also view the description of the custom charts in the list.

![Select custom chart](https://devtron-public-asset.s3.us-east-2.amazonaws.com/custom-charts/use-custom-chart.png)

Expand Down
Loading

0 comments on commit c2be4ab

Please sign in to comment.