Skip to content

Commit

Permalink
chore: Main develop sync bd5118 (#5817)
Browse files Browse the repository at this point in the history
* migration number changes (#5692)

* refrain from checkin autoscalingCheckBeforeTrigger for virt clus (#5696)

* fix: Decode secret fix on add update oss (#5695)

* ValidateEncodedDataByDecoding in case add or update secret

* wire fix from main

* minor refactor

* comment

* saving pco concurrency case handled (#5688)

* fix: script for pipelineStageStepVariable, making input value and default_value text from varchar255 (#5701)

* script for pipelineStageStepVariable, making input value and default_value text from varchar255

* erro log fix

* fix: ea fixes for helm app (#5708)

* added the ea apps entry app table

* resolved the ea mode multiple rows error during configuration of app

* modified the ea dockerfile in ca-certificates cmd

* uncommented the code and left the ea helm app making way untouched

* remodified the dockerfile as previous state

* modified the docker file ea mode

* dockerfile exit code 100 due to ap install alternative in ea mode dockerfile

* execute make after main merge

* modified changes in dockerfile ea mode

* resolved comments after first level review

* Revert "fix: ea fixes for helm app (#5708)" (#5713)

This reverts commit 3e31f49.

* fix: SkipCiBuildCachePushPull code incorporated with minor refac in handle runtime params validation (#5712)

* SkipCiBuildCachePushPull code incorporated with minor refac in handle runtime params validation

* minor refactor

* minor refactor

* migration syn with ent (#5718)

* doc: Edit Deployment Chart Schema (#5735)

* Edit Deployment Chart Schema

* Fixes

* PM + CO Feedback Incorporated

* doc: Redirection of old entry in gitbook.yaml (#5738)

* Edit Deployment Chart Schema

* Fixes

* PM + CO Feedback Incorporated

* Redirected Old Entry

* docs: added Documentation for Air-Gapped Installation (#5360)

* added docs for air-gapped-installation

* added all the images in 7.0.0

* modified yq command in the docs

* added an entry in summary.md

* added installation commands

* modified statements

* modified variable name

* added steps to navigation

* added the latest oss chart images

* added a note for docker

* Added Intro + Proofreading + Structuring

* Other fixes

* Lang fix

* added docs for ea-mode only

* modified lang

* Update install-devtron-in-airgapped-environment.md

Changed h3 header to fit the ToC on the RHS

* added changes

* modified changes

---------

Co-authored-by: Badal Kumar Prusty <badalkumar@Badals-MacBook-Pro.local>
Co-authored-by: ashokdevtron <141001279+ashokdevtron@users.noreply.github.com>

* feat: Env description handling (#5744)

* env description handling added

* license handling

* misc: Main sync rc - branch update (#5753)

* added config sql script (#5681)

* feat: CVE severity categorisation and scan result listing API enhancements (#5617)

* feat: add support for app and env sorting in scan list api and add medium, high and unknown severity support

* fix: query fix for appName sort or envName sort

* fix: sql script number change

* fix: minor changes

* fix: review fix

* fix: remove dml on cve_store and handle it in code handling this versioning

* fix: review comments

* fix: update script numbers

* fix: minor fix

* feat: casbin deny policy sql scripts (#5677)

* system controller scripts

* script additions

* sql cript update

* sql script number chnage

* feat: Config diff phase 2 oss (#5488)

* story(configDiffView) : open api spec

* story(configDiffView) : open api spec updated

* story(configDiffView) : open api spec updated for error state

* story(configDiffView) : WIP

* story(configDiffView) : WIP "some code changed"

* story(configDiffView) : support for names added

* story(configDiffView) : iota removed

* story(configDiffView) : pg no rows handled

* story(configDiffView) : spelling check

* story(configDiffView) : code review comment resolved

* story(configDiffView) : env id added

* story(configDiffView) : intersection added

* story(configDiffView) : comments removed

* story(configDiffView) : code review comment resolved

* story(configDiffView) : comment removed

* story(configDiffView) : CMCSNames DTO moved

* story(configDiffView) : null case handled

* story(configDiffView) : logger added

* story(configDiffView) : code refactored

* story(configDiffView) : code refactored v2

* story(configDiffView) : spec updated

* story(configDiffView) : code refactored

* story(configDiffView) : config names

* main sync

* overridden and global flag introduced in config diff autocomplete api

* ent sync

* get config data in resthandler

* new api for showing all config data in config/data :- Service func -> GetAllConfigData

* using a single key instead of global and overridden key in config/autocomplete api

* ConfigState made string instead of int

* not sending inheriting in case base config

* code review comment incorporation

* ent sync

* code review comment incorp -1

* code review comment incorp -2

* code review comment incorp -3

* small fix in plugin

* migration number changes (#5692)

* main sync

* minor fix

* refrain from checkin autoscalingCheckBeforeTrigger for virt clus (#5696)

* fix: Decode secret fix on add update oss (#5695)

* ValidateEncodedDataByDecoding in case add or update secret

* wire fix from main

* minor refactor

* comment

* saving pco concurrency case handled (#5688)

* fix: script for pipelineStageStepVariable, making input value and default_value text from varchar255 (#5701)

* script for pipelineStageStepVariable, making input value and default_value text from varchar255

* erro log fix

* scipt number change

---------

Co-authored-by: adi6859 <aditya.ar1909@gmail.com>
Co-authored-by: Vikram Singh <vikram@devtron.ai>

* fix: Helm apps entries in Ea mode (#5652)

* added the ea apps entry app table

* resolved the ea mode multiple rows error during configuration of app

* modified the ea dockerfile in ca-certificates cmd

* uncommented the code and left the ea helm app making way untouched

* remodified the dockerfile as previous state

* modified the docker file ea mode

* dockerfile exit code 100 due to ap install alternative in ea mode dockerfile

* execute make after main merge

* modified changes in dockerfile ea mode

* resolved comments after first level review

* executed make after merging with develop branch

* feat: refactoring deployment app name usage (#5702)

* removing hard coded deployment app name

* removing %s-%s usage

* wip: query change for enterprise

* wip

* wip

* wip

* adding release mode in deployment config

* wip: release changes

* left join on pco and artifact

* handling empty release mode - backward compatibility

* fixing panic

* migration number changes (#5692)

* refrain from checkin autoscalingCheckBeforeTrigger for virt clus (#5696)

* fix: Decode secret fix on add update oss (#5695)

* ValidateEncodedDataByDecoding in case add or update secret

* wire fix from main

* minor refactor

* comment

* saving pco concurrency case handled (#5688)

* migration updated

* main merge and migration script updated

* wip

* review changes

* fix sql no

---------

Co-authored-by: Prakash <prakash.kumar@devtron.ai>

* migration syn with ent (#5719)

* fix: group image vulnerabilities by base/os image (#5680)

* feat: add support for app and env sorting in scan list api and add medium, high and unknown severity support

* fix: query fix for appName sort or envName sort

* fix: sql script number change

* fix: minor changes

* fix: review fix

* fix: remove dml on cve_store and handle it in code handling this versioning

* fix: review comments

* feat: storing target,class and type values in imageScanExecutionResults

* feat: add sql script

* feat: add sql script

* fix: add new columns

* fix: update script numbers

* fix: correct down script

* fix: minor fix

* chore: script number update

* fix: remove sql script (#5727)

* Revert "fix: Helm apps entries in Ea mode (#5652)" (#5733)

This reverts commit f1aa1fc.

* chore: custom argo-workflow dependency (#5731)

* bumped github.com/argoproj/argo-workflows/v3 v3.5.10 => github.com/devtron-labs/argo-workflows/v3 v3.5.10

* migration number changes (#5692)

* refrain from checkin autoscalingCheckBeforeTrigger for virt clus (#5696)

* fix: Decode secret fix on add update oss (#5695)

* ValidateEncodedDataByDecoding in case add or update secret

* wire fix from main

* minor refactor

* comment

* saving pco concurrency case handled (#5688)

* fix: script for pipelineStageStepVariable, making input value and default_value text from varchar255 (#5701)

* script for pipelineStageStepVariable, making input value and default_value text from varchar255

* erro log fix

* fix: ea fixes for helm app (#5708)

* added the ea apps entry app table

* resolved the ea mode multiple rows error during configuration of app

* modified the ea dockerfile in ca-certificates cmd

* uncommented the code and left the ea helm app making way untouched

* remodified the dockerfile as previous state

* modified the docker file ea mode

* dockerfile exit code 100 due to ap install alternative in ea mode dockerfile

* execute make after main merge

* modified changes in dockerfile ea mode

* resolved comments after first level review

* Revert "fix: ea fixes for helm app (#5708)" (#5713)

This reverts commit 3e31f49.

* fix: SkipCiBuildCachePushPull code incorporated with minor refac in handle runtime params validation (#5712)

* SkipCiBuildCachePushPull code incorporated with minor refac in handle runtime params validation

* minor refactor

* minor refactor

* migration syn with ent (#5718)

* reverted main branch changes

* reverted main branch changes

---------

Co-authored-by: Prakash <prakash.kumar@devtron.ai>
Co-authored-by: Rajeev Ranjan <90333766+RajeevRanjan27@users.noreply.github.com>
Co-authored-by: prakhar katiyar <39842461+prkhrkat@users.noreply.github.com>

* chore: fix go.sum file (#5734)

* misc: Main sync develop (#5737)

* migration number changes (#5692)

* refrain from checkin autoscalingCheckBeforeTrigger for virt clus (#5696)

* fix: Decode secret fix on add update oss (#5695)

* ValidateEncodedDataByDecoding in case add or update secret

* wire fix from main

* minor refactor

* comment

* saving pco concurrency case handled (#5688)

* fix: script for pipelineStageStepVariable, making input value and default_value text from varchar255 (#5701)

* script for pipelineStageStepVariable, making input value and default_value text from varchar255

* erro log fix

* fix: ea fixes for helm app (#5708)

* added the ea apps entry app table

* resolved the ea mode multiple rows error during configuration of app

* modified the ea dockerfile in ca-certificates cmd

* uncommented the code and left the ea helm app making way untouched

* remodified the dockerfile as previous state

* modified the docker file ea mode

* dockerfile exit code 100 due to ap install alternative in ea mode dockerfile

* execute make after main merge

* modified changes in dockerfile ea mode

* resolved comments after first level review

* Revert "fix: ea fixes for helm app (#5708)" (#5713)

This reverts commit 3e31f49.

* fix: SkipCiBuildCachePushPull code incorporated with minor refac in handle runtime params validation (#5712)

* SkipCiBuildCachePushPull code incorporated with minor refac in handle runtime params validation

* minor refactor

* minor refactor

* migration syn with ent (#5718)

---------

Co-authored-by: Prakash <prakash.kumar@devtron.ai>
Co-authored-by: Rajeev Ranjan <90333766+RajeevRanjan27@users.noreply.github.com>
Co-authored-by: prakhar katiyar <39842461+prkhrkat@users.noreply.github.com>

* fix: Validate config cm cs (#5750)

* validateConfigRequest before CMGlobalAddUpdate and CSGlobalAddUpdate

* checkIfConfigDataAlreadyExist

---------

Co-authored-by: ayu-devtron <167413063+ayu-devtron@users.noreply.github.com>
Co-authored-by: Vikram Singh <vikram@devtron.ai>
Co-authored-by: Gireesh Naidu <111440205+gireesh-naidu@users.noreply.github.com>
Co-authored-by: Shivam Nagar <124123645+Shivam-nagar23@users.noreply.github.com>
Co-authored-by: Prakash <prakash.kumar@devtron.ai>
Co-authored-by: adi6859 <aditya.ar1909@gmail.com>
Co-authored-by: Rajeev Ranjan <90333766+RajeevRanjan27@users.noreply.github.com>
Co-authored-by: iamayushm <32041961+iamayushm@users.noreply.github.com>
Co-authored-by: prakhar katiyar <39842461+prkhrkat@users.noreply.github.com>
Co-authored-by: Asutosh Das <asutosh2000ad@gmail.com>
Co-authored-by: Vikram <73224103+vikramdevtron@users.noreply.github.com>
Co-authored-by: Prakarsh <71125043+prakarsh-dt@users.noreply.github.com>

* doc: Update prerequisites of code-scan (#5625)

* Update prerequisites of code-scan

* Hyperlinked the Vulnerability scanning doc

---------

Co-authored-by: ashokdevtron <141001279+ashokdevtron@users.noreply.github.com>

* fix: ci patch rbac for branch update (#5759)

* feat: Added basic auth support for servicemonitor (#5761)

* Added support for basic auth in servicemonitor

* Added support for namespace selector and custom matchLabels

* Fixed indentations

* fix: Bitnami chart repo tls issue (#5740)

* bitnami_chart_fix

* Rename 278_bitnami_chart_fix.down.sql to 282_bitnami_chart_fix.down.sql

* Rename 278_bitnami_chart_fix.up.sql to 282_bitnami_chart_fix.up.sql

---------

Co-authored-by: Pawan Mehta <117346502+pawan-mehta-dt@users.noreply.github.com>

* doc: Cosign plugin doc (#5665)

* doc for cosign plugin

* edits in task name

* updates in intro and other fixes.

* Attached link to Cosign GitHub repo

* Hyperlink fixes

---------

Co-authored-by: ashokdevtron <141001279+ashokdevtron@users.noreply.github.com>

* fix: check rbac on env if envName is present (#5765)

* admin check fix in config draft

* minor fix

* doc: CraneCopy plugin doc (#5658)

* doc for

* edits in task name

* spelling correction

* Updated password

---------

Co-authored-by: ashokdevtron <141001279+ashokdevtron@users.noreply.github.com>

* doc: Devtron CD Trigger Plugin doc  (#5747)

* devtron-cd-trigger plugin doc

* minor update

* Proofreading done

* Update devtron-cd-trigger.md

* Removed unwanted phrase

* Changed wording

* Changed plurality

* Updated devtron token

---------

Co-authored-by: ashokdevtron <141001279+ashokdevtron@users.noreply.github.com>

* doc: DockerSlim plugin doc (#5660)

* doc for DockerSlim plugin

* Updated Docker-Slim to DockerSlim

* Minor fixes

* url update

* Fixes in url

---------

Co-authored-by: ashokdevtron <141001279+ashokdevtron@users.noreply.github.com>

* doc: Devtron Job Trigger Plugin doc (#5742)

* devtron-job-trigger plugin doc

* summary updated

* Updated input variable description

* token value updated

---------

Co-authored-by: ashokdevtron <141001279+ashokdevtron@users.noreply.github.com>

* fix: scan tool active check removed (#5771)

* scan tool active check removed

* query fix

* feat: Docker pull env driven (#5767)

* useDockerApiToGetDigest menv driven flag to control pulling image either using docker pull or docker API

* UseAppDockerConfigForPrivateRegistries in workflow request

* revert

* revert

* fix: panic handlings and argocd app delete stuck in partial stage (#5770)

* fix: panic handlings

* fix: false positive matrics on gitOps failures

* fix: for GetConfigForHelmApps err: pg no row

* feat: plugin creation support (#5630)

* wip: new plugin creation api and min plugin api with only shared plugin list

* wip: create new plugin version code

* wip:plugin type SHARED by default

* wip:find plugin either by identifier or by id while creating a new version of existing plugin

* wip: create new plugin tag logic improved

* wip: optimize GetAllFilteredPluginParentMetadata query

* wip: create plugin tag new flow

* wip: minor fix

* wip: minor fix

* wip: minor fix

* wip: newTagsPresent -> areNewTagsPresent

* wip: icon is not  mandatory code incorporated

* wip:minor refactoring

* wip: prevent duplicate version from being created and save tags relation only when

* wip: minor fix

* wip: details api, get all plugin data or non

* wip: code review incorp part -1

* wip: code review incorp part -2

* wip: code review incorp part -3

* wip: remove code duplication

* wip: hardcode isExposed to true

* wip: hardcode StepType= inline

* wip: set default VariableStepIndex= 1

* Revert "feat: plugin creation support (#5630)" (#5778)

This reverts commit 4296366.

* fix: unimplemented cluster cron service (#5781)

* fix: sql injection fixes (#5783)

* sql injection fixes

* query param init fix

* doc: Vulnerability Scanning Plugin doc (#5722)

* vulnerability scanning plugin doc

* summary.md added

* docs: Jira plugins doc (Validator + Updater) (#5709)

* Docs of Jira Plugins - Validator and Updater

* Added Index Links

* Additional Proofreading

* add basic auth and tls for sm (#5789)

* docs: added commands enable ingress during  helm installation (#5794)

* added commands emable ingress during  helm installation

* modified commands

* improved statement

* removed unrequired lines

---------

Co-authored-by: Badal Kumar Prusty <badalkumar@Badals-MacBook-Pro.local>

* Revamped + Restructured Ingress Setup Doc (#5798)

* modifying route (#5799)

Co-authored-by: Badal Kumar Prusty <badalkumar@Badals-MacBook-Pro.local>

* fix: cron status update refactoring (#5790)

Co-authored-by: Nishant <58689354+nishant-d@users.noreply.github.com>

* docs: modified the anchorlink in ingress.md (#5800)

* modifying route

* modified the anchorlink

---------

Co-authored-by: Badal Kumar Prusty <badalkumar@Badals-MacBook-Pro.local>

* query param split (#5801)

* fix: upgraded to /argo-cd/v2 v2.9.21 (#5758)

* upgraded to /argo-cd/v2 v2.9.21

* argocd vendor files added

* sync with common-lib

* fix: Ea rbac fixes (#5813)

* app found using display or app name

* single query optimization

* display name handling for new apps

---------

Co-authored-by: kartik-579 <kartik@devtron.ai>

---------

Co-authored-by: Prakash <prakash.kumar@devtron.ai>
Co-authored-by: Rajeev Ranjan <90333766+RajeevRanjan27@users.noreply.github.com>
Co-authored-by: prakhar katiyar <39842461+prkhrkat@users.noreply.github.com>
Co-authored-by: ashokdevtron <141001279+ashokdevtron@users.noreply.github.com>
Co-authored-by: Badal Kumar <130441461+badal773@users.noreply.github.com>
Co-authored-by: Badal Kumar Prusty <badalkumar@Badals-MacBook-Pro.local>
Co-authored-by: kripanshdevtron <107392309+kripanshdevtron@users.noreply.github.com>
Co-authored-by: ayu-devtron <167413063+ayu-devtron@users.noreply.github.com>
Co-authored-by: Vikram Singh <vikram@devtron.ai>
Co-authored-by: Gireesh Naidu <111440205+gireesh-naidu@users.noreply.github.com>
Co-authored-by: Shivam Nagar <124123645+Shivam-nagar23@users.noreply.github.com>
Co-authored-by: adi6859 <aditya.ar1909@gmail.com>
Co-authored-by: iamayushm <32041961+iamayushm@users.noreply.github.com>
Co-authored-by: Asutosh Das <asutosh2000ad@gmail.com>
Co-authored-by: Vikram <73224103+vikramdevtron@users.noreply.github.com>
Co-authored-by: Prakarsh <71125043+prakarsh-dt@users.noreply.github.com>
Co-authored-by: Bhushan Nemade <bhushan.nemade@devtron.ai>
Co-authored-by: Pawan Mehta <117346502+pawan-mehta-dt@users.noreply.github.com>
Co-authored-by: akshatsinha007 <156403098+akshatsinha007@users.noreply.github.com>
Co-authored-by: Nishant <58689354+nishant-d@users.noreply.github.com>
  • Loading branch information
21 people authored Sep 9, 2024
1 parent c0dc007 commit 61bf950
Show file tree
Hide file tree
Showing 54 changed files with 2,903 additions and 262 deletions.
6 changes: 3 additions & 3 deletions api/cluster/EnvironmentRestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"net/http"
"strconv"
"strings"
"sync"
"time"

k8s2 "github.com/devtron-labs/common-lib/utils/k8s"
Expand Down Expand Up @@ -513,9 +514,8 @@ func (impl EnvironmentRestHandlerImpl) GetEnvironmentConnection(w http.ResponseW
responseObj.ClusterReachable = false
}
//updating the cluster connection error to db
mapObj := map[int]error{
clusterBean.Id: err,
}
mapObj := &sync.Map{}
mapObj.Store(clusterBean.Id, err)
impl.environmentClusterMappingsService.HandleErrorInClusterConnections([]*request.ClusterBean{clusterBean}, mapObj, true)
common.WriteJsonResp(w, nil, responseObj, http.StatusOK)
}
1 change: 1 addition & 0 deletions api/cluster/wire_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
var ClusterWireSet = wire.NewSet(
repository.NewClusterRepositoryImpl,
wire.Bind(new(repository.ClusterRepository), new(*repository.ClusterRepositoryImpl)),
cluster.NewClusterServiceImpl,
cluster.NewClusterServiceImplExtended,
wire.Bind(new(cluster.ClusterService), new(*cluster.ClusterServiceImplExtended)),

Expand Down
1 change: 1 addition & 0 deletions api/k8s/application/k8sApplicationRestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ func (handler *K8sApplicationRestHandlerImpl) GetPodLogs(w http.ResponseWriter,
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
return
}
handler.logger.Infow("get pod logs request", "request", request)
handler.requestValidationAndRBAC(w, r, token, request)
lastEventId := r.Header.Get(bean2.LastEventID)
isReconnect := false
Expand Down
3 changes: 0 additions & 3 deletions api/k8s/wire_k8sApp.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,4 @@ var K8sApplicationWireSet = wire.NewSet(
informer.NewGlobalMapClusterNamespace,
informer.NewK8sInformerFactoryImpl,
wire.Bind(new(informer.K8sInformerFactory), new(*informer.K8sInformerFactoryImpl)),

cluster.NewClusterCronServiceImpl,
wire.Bind(new(cluster.ClusterCronService), new(*cluster.ClusterCronServiceImpl)),
)
9 changes: 6 additions & 3 deletions cmd/external-app/wire_gen.go

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

3 changes: 3 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,14 @@
* [DockerSlim](user-guide/plugins/docker-slim.md)
* [GoLang-migrate](user-guide/plugins/golang-migrate.md)
* [Jenkins](user-guide/plugins/jenkins.md)
* [Jira Issue Validator](user-guide/plugins/jira-validator.md)
* [Jira Issue Updater](user-guide/plugins/jira-updater.md)
* [K6 Load Testing](user-guide/plugins/k6-load-testing.md)
* [Pull images from container repository](user-guide/plugins/pull-images-from-container-repository.md)
* [Semgrep](user-guide/plugins/semgrep.md)
* [SonarQube](user-guide/plugins/sonarqube.md)
* [SonarQube v1.1.0](user-guide/plugins/sonarqube-v1.1.0.md)
* [Vulnerability Scanning](user-guide/plugins/vulnerability-scanning.md)


## Resources
Expand Down
153 changes: 140 additions & 13 deletions docs/setup/install/ingress-setup.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,144 @@
# Ingress Setup

After Devtron is installed, Devtron is accessible through service `devtron-service`.
If you want to access Devtron through ingress, edit `devtron-service` and change the loadbalancer to ClusterIP. You can do this using `kubectl patch` command:
## Introduction

If you wish to use [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) as a means to access the Devtron services available in your cluster, you can configure it either during the installation or after the installation of Devtron.

Refer the section relevant to you:
* [During Devtron Installation](#enabling-ingress-during-devtron-installation)
* [After Devtron Installation](#configuring-ingress-after-devtron-installation)

If you have successfully configured Ingress, refer [Post Ingress Setup](#enable-https-for-devtron).

---

## Enabling Ingress during Devtron Installation

If you are installing Devtron, you can enable Ingress either via [set flag](#using-set-flag) or by using [ingress-values.yaml](#using-ingress-values.yaml) to specify the desired Ingress settings.

### Using set flag

You can use the `--set` flag to specify the desired Ingress settings.

Here, we have added 5 configurations you can perform depending on your requirements:
* [Only Basic Configuration](#only-basic-configuration)
* [Configuration Including Labels](#configuration-including-labels)
* [Configuration Including Annotations](#configuration-including-annotations)
* [Configuration Including TLS Settings](#configuration-including-tls-settings)
* [Comprehensive Configuration](#comprehensive-configuration)

#### Only Basic Configuration

To enable Ingress and set basic parameters, use the following command:

```bash
helm install devtron devtron/devtron-operator -n devtroncd \
--set components.devtron.ingress.enabled=true \
--set components.devtron.ingress.className=nginx \
--set components.devtron.ingress.host=devtron.example.com
```

#### Configuration Including Labels

To add labels to the Ingress resource, use the following command:

```bash
helm install devtron devtron/devtron-operator -n devtroncd \
--set components.devtron.ingress.enabled=true \
--set components.devtron.ingress.className=nginx \
--set components.devtron.ingress.host=devtron.example.com \
--set components.devtron.ingress.labels.env=production
```

#### Configuration Including Annotations

To add annotations to the Ingress resource, use the following command:

```bash
helm install devtron devtron/devtron-operator -n devtroncd \
--set components.devtron.ingress.enabled=true \
--set components.devtron.ingress.className=nginx \
--set components.devtron.ingress.host=devtron.example.com \
--set components.devtron.ingress.annotations."kubernetes\.io/ingress\.class"=nginx \
--set components.devtron.ingress.annotations."nginx\.ingress\.kubernetes\.io\/app-root"="/dashboard"
```

#### Configuration Including TLS Settings

To configure TLS settings, including `secretName` and `hosts`, use the following command:

```bash
helm install devtron devtron/devtron-operator -n devtroncd \
--set components.devtron.ingress.enabled=true \
--set components.devtron.ingress.className=nginx \
--set components.devtron.ingress.host=devtron.example.com \
--set components.devtron.ingress.tls[0].secretName=devtron-tls \
--set components.devtron.ingress.tls[0].hosts[0]=devtron.example.com
```

#### Comprehensive Configuration

To include all the above settings in a single command, use:

```bash
helm install devtron devtron/devtron-operator -n devtroncd \
--set components.devtron.ingress.enabled=true \
--set components.devtron.ingress.className=nginx \
--set components.devtron.ingress.host=devtron.example.com \
--set components.devtron.ingress.annotations."kubernetes\.io/ingress\.class"=nginx \
--set components.devtron.ingress.annotations."nginx\.ingress\.kubernetes\.io\/app-root"="/dashboard" \
--set components.devtron.ingress.labels.env=production \
--set components.devtron.ingress.pathType=ImplementationSpecific \
--set components.devtron.ingress.tls[0].secretName=devtron-tls \
--set components.devtron.ingress.tls[0].hosts[0]=devtron.example.com
```


### Using ingress-values.yaml

As an alternative to the [set flag](#using-set-flag) method, you can enable Ingress using `ingress-values.yaml` instead.

Create an `ingress-values.yaml` file. You may refer the below format for an advanced ingress configuration which includes labels, annotations, secrets, and many more.

```yml
components:
devtron:
ingress:
enabled: true
className: nginx
labels: {}
# env: production
annotations: {}
# nginx.ingress.kubernetes.io/app-root: /dashboard
pathType: ImplementationSpecific
host: devtron.example.com
tls: []
# - secretName: devtron-info-tls
# hosts:
# - devtron.example.com
```

Once you have the `ingress-values.yaml` file ready, run the following command:

```bash
helm install devtron devtron/devtron-operator -n devtroncd --reuse-values -f ingress-values.yaml
```

---

## Configuring Ingress after Devtron Installation

After Devtron is installed, Devtron is accessible through `devtron-service`. If you wish to access Devtron through ingress, you'll need to modify this service to use a ClusterIP instead of a LoadBalancer.

You can do this using the `kubectl patch` command:

```bash
kubectl patch -n devtroncd svc devtron-service -p '{"spec": {"ports": [{"port": 80,"targetPort": "devtron","protocol": "TCP","name": "devtron"}],"type": "ClusterIP","selector": {"app": "devtron"}}}'
```

After this, create ingress by applying the ingress yaml file.
You can use [this yaml file](https://github.com/devtron-labs/devtron/blob/main/manifests/yamls/devtron-ingress.yaml) to create ingress to access Devtron:
Next, create ingress to access Devtron by applying the `devtron-ingress.yaml` file. The file is also available on this [link](https://github.com/devtron-labs/devtron/blob/main/manifests/yamls/devtron-ingress.yaml). You can access Devtron from any host after applying this yaml.

```yaml
```yml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down Expand Up @@ -49,9 +177,9 @@ spec:
pathType: ImplementationSpecific
```
You can access Devtron from any host after applying this yaml. For k8s versions <1.19, [apply this yaml](https://github.com/devtron-labs/devtron/blob/main/manifests/yamls/devtron-ingress-legacy.yaml):
For k8s versions < 1.19, [apply this yaml](https://github.com/devtron-labs/devtron/blob/main/manifests/yamls/devtron-ingress-legacy.yaml):
```yaml
```yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
Expand Down Expand Up @@ -79,7 +207,7 @@ spec:
Optionally, you also can access Devtron through a specific host by running the following YAML file:
```yaml
```yml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down Expand Up @@ -119,9 +247,11 @@ spec:
pathType: ImplementationSpecific
```
---
## Enable HTTPS For Devtron
Once ingress setup for devtron is done and you want to run Devtron over `https`, you need to add different annotations for different ingress controllers and load balancers.
Once Ingress setup for Devtron is done and you want to run Devtron over `https`, you need to add different annotations for different ingress controllers and load balancers.

### 1. Nginx Ingress Controller

Expand Down Expand Up @@ -175,7 +305,4 @@ In case of AWS application load balancer, the following annotations need to be a
```
For an Ingress resource to be observed by AGIC (Application Gateway Ingress Controller) must be annotated with kubernetes.io/ingress.class: azure/application-gateway. Only then AGIC will work with the Ingress resource in question.

> Note: Make sure NOT to use port 80 with HTTPS and port 443 with HTTP on the Pods.



> Note: Make sure NOT to use port 80 with HTTPS and port 443 with HTTP on the Pods.
57 changes: 57 additions & 0 deletions docs/user-guide/plugins/jira-updater.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Jira Issue Updater

## Introduction
The Jira Issue Updater plugin extends the capabilities of Devtron CI by allowing updates to Jira issues directly from the pipeline. It can add build pipeline status and docker image ID as a comment on Jira tickets, keeping the issue tracking synchronized with your CI processes.

### Prerequisites

- A Jira account with the necessary [API access](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/#Create-an-API-token).
- The API credentials (username, password, and base URL) for your Jira instance. Obtain the API credentials from your Jira admin if required.
- A pull request raised with your Git provider. Title of pull request must contain the Jira ID.
- Jira Issue (e.g., REDOC-12)
- Webhook added to the git repository. [Click here](https://docs.devtron.ai/usage/applications/creating-application/workflow/ci-pipeline#configuring-webhook) to know more.

---

## Steps

1. On the **Edit build pipeline** page, go to the **Post-Build Stage**.
2. Click **+ Add task**.
3. Select **Jira Issue Updater** from the list of plugins.
* Enter a task name (mandatory).
* Optionally, enter a description.
* Provide values for the input variables.

| Variable | Format | Description |
| ------------------------ | ------ | --------------------------------------------------------- |
| JiraUsername | String | Your Jira username (e.g., johndoe@devtron.ai) |
| JiraPassword | String | Your Jira API token provided by the Jira admin |
| JiraBaseUrl | String | The base URL of your Jira instance (e.g., https://yourdomain.atlassian.net/) |
| UpdateWithDockerImageId | Bool | Set to `true` to include the Docker Image ID in the update |
| UpdateWithBuildStatus | Bool | Set to `true` to include the build status in the update |

* `Trigger/Skip Condition` allows you to set conditions under which this task will execute or be skipped.
* `Pass/Failure Condition` allows you define conditions to determine if the build passes or fails based on the Jira update.

4. Go to the **Build Stage**.

5. Select **Pull Request** in the **Source Type** dropdown.

6. Use filters to fetch only the PRs matching your regex. Here are few examples:
* **Title** can be a regex pattern (e.g., `^(?P<jira_Id>([a-zA-Z0-9-].*))`) to extract the Jira ID from the PR title. Only those PRs fulfilling the regex will be shown for image build process.
* **State** can be `^open$`, where only PRs in open state will be shown for image build process.

7. Click **Update Pipeline**.

---

## Results

![Figure 1: Build Log](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/plugins/jira/jira-updater-log.jpg)

![Figure 2: Comments added by the Plugin on the Jira Issue](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/plugins/jira/jira-updater.jpg)





54 changes: 54 additions & 0 deletions docs/user-guide/plugins/jira-validator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Jira Issue Validator

## Introduction
The Jira Issue Validator plugin extends the filtering capabilities of the Devtron CI and lets users perform validation based on Jira Ticket ID status. This plugin ensures that only builds associated with valid Jira tickets are executed, improving the accuracy of the CI process.

### Prerequisites

- A Jira account with the necessary [API access](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/#Create-an-API-token).
- The API credentials (username, password, and base URL) for your Jira instance. Obtain the API credentials from your Jira admin if required.
- A pull request raised with your Git provider. Title of pull request must contain the Jira ID.
- Jira Issue (e.g., REDOC-12)
- Webhook added to the git repository. [Click here](https://docs.devtron.ai/usage/applications/creating-application/workflow/ci-pipeline#configuring-webhook) to know more.

---

## Steps

1. On the **Edit build pipeline** page, go to the **Pre-Build Stage** (or Post-Build Stage).
2. Click **+ Add task**.
3. Select **Jira Issue Validator** from the list of plugins.
* Enter a task name (mandatory).
* Optionally, enter a description.
* Provide values for the input variables.

| Variable | Format | Description |
| -------------- | ------ | --------------------------------------------------------- |
| JiraUsername | String | Your Jira username (e.g., johndoe@devtron.ai) |
| JiraPassword | String | Your Jira API token provided by the Jira admin |
| JiraBaseUrl | String | The base URL of your Jira instance (e.g., https://yourdomain.atlassian.net) |

* `Trigger/Skip Condition` allows you to set conditions under which this task will execute or be skipped.
* `Pass/Failure Condition` allows you to define conditions that determine whether the build passes or fails based on Jira validation.

4. Go to the **Build Stage**.

5. Select **Pull Request** in the **Source Type** dropdown.

6. Use filters to fetch only the PRs matching your regex. Here are few examples:
* **Title** can be a regex pattern (e.g., `^(?P<jira_Id>([a-zA-Z0-9-].*))`) to extract the Jira ID from the PR title. Only those PRs fulfilling the regex will be shown for image build process.
* **State** can be `^open$`, where only PRs in open state will be shown for image build process.

7. Click **Update Pipeline**.

---

## Results

**Case 1**: If Jira issue exists and the same is found in the PR title

![Figure 1: Jira Issue Match](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/plugins/jira/jira-issue-validator.jpg)

**Case 2**: If Jira issue is not found

![Figure 2: Error in Finding Jira Issue](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/plugins/jira/issue-validation-failed.jpg)
Loading

0 comments on commit 61bf950

Please sign in to comment.