Skip to content

Commit ed52cdf

Browse files
authored
Merge branch 'main' into mandatory-tag
2 parents edd184a + 6820563 commit ed52cdf

30 files changed

+723
-105
lines changed

.github/workflows/pr-issue-validator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
5454
set -x
5555
# Skip validation for documentation or chore PRs
56-
if [[ "$TITLE" =~ ^(doc:|docs:|chore:|misc:) ]]; then
56+
if [[ "$TITLE" =~ ^(doc:|docs:|chore:|misc:|Release:|release:) ]]; then
5757
echo "Skipping validation for docs/chore PR."
5858
echo "PR NUMBER-: $PRNUM "
5959
gh pr edit $PRNUM --remove-label "PR:Issue-verification-failed"

api/restHandler/GlobalPluginRestHandler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ func (handler *GlobalPluginRestHandlerImpl) GetAllGlobalVariables(w http.Respons
184184
object := handler.enforcerUtil.GetAppRBACNameByAppId(appId)
185185
authorised := false
186186
if app.AppType == helper.Job {
187-
authorised = handler.enforcer.Enforce(token, casbin.ResourceApplications, casbin.ActionGet, object)
188-
} else if app.AppType == helper.CustomApp {
189187
authorised = handler.enforcer.Enforce(token, casbin.ResourceJobs, casbin.ActionGet, object)
188+
} else if app.AppType == helper.CustomApp {
189+
authorised = handler.enforcer.Enforce(token, casbin.ResourceApplications, casbin.ActionGet, object)
190190
}
191191
if !authorised {
192192
common.WriteJsonResp(w, common.ErrUnAuthorized, nil, http.StatusForbidden)
1.33 KB
Loading

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ require gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
288288

289289
replace (
290290
github.com/argoproj/argo-workflows/v3 v3.5.10 => github.com/devtron-labs/argo-workflows/v3 v3.5.10
291-
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20241216110450-9f2f2d5a0281
292-
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20241216110450-9f2f2d5a0281
291+
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20241219033445-6c0c7082c583
292+
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20241219033445-6c0c7082c583
293293
github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127
294294
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5
295295
k8s.io/api => k8s.io/api v0.29.7

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -792,10 +792,10 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzq
792792
github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
793793
github.com/devtron-labs/argo-workflows/v3 v3.5.10 h1:6rxQOesOzDz6SgQCMDQNHaehsKFW3C7U8CZeEek5kgQ=
794794
github.com/devtron-labs/argo-workflows/v3 v3.5.10/go.mod h1:/vqxcovDPT4zqr4DjR5v7CF8ggpY1l3TSa2CIG3jmjA=
795-
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20241216110450-9f2f2d5a0281 h1:UX4HklNLOH7nuTRJQGes3H2T3XgdA+mqoC0+ENfDPAI=
796-
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20241216110450-9f2f2d5a0281/go.mod h1:vFJ3M7akwAWCtugDXRW+5Q9P+cp0RiH+K/D5FBbb/JA=
797-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20241216110450-9f2f2d5a0281 h1:BuvKKBLDujIOtWFYjx0XvhWW0weIFZ6mVorA05EswpY=
798-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20241216110450-9f2f2d5a0281/go.mod h1:NJSMdv+zTUK3p7rML12RZSeAUKHeLaoY3sR/oK0xhwo=
795+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20241219033445-6c0c7082c583 h1:YN6O8N4+msUbbmWB+QOpq6ha7hCjF/kkds9bsOZ0EWg=
796+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20241219033445-6c0c7082c583/go.mod h1:vFJ3M7akwAWCtugDXRW+5Q9P+cp0RiH+K/D5FBbb/JA=
797+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20241219033445-6c0c7082c583 h1:TmL6N8vzg0/Lq65Y7PVqkRpvRKGAwCS/74dIPMiTJtU=
798+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20241219033445-6c0c7082c583/go.mod h1:NJSMdv+zTUK3p7rML12RZSeAUKHeLaoY3sR/oK0xhwo=
799799
github.com/devtron-labs/go-bitbucket v0.9.60-beta h1:VEx1jvDgdtDPS6A1uUFoaEi0l1/oLhbr+90xOwr6sDU=
800800
github.com/devtron-labs/go-bitbucket v0.9.60-beta/go.mod h1:GnuiCesvh8xyHeMCb+twm8lBR/kQzJYSKL28ZfObp1Y=
801801
github.com/devtron-labs/protos v0.0.3-0.20240802105333-92ee9bb85d80 h1:xwbTeijNTf4/j1v+tSfwVqwLVnReas/NqEKeQHvSTys=

internal/sql/repository/bulkUpdate/BulkUpdateRepository.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type BulkUpdateRepository interface {
4444
FindAppByChartEnvId(chartEnvId int) (*app.App, error)
4545
FindBulkChartsByAppNameSubstring(appNameIncludes []string, appNameExcludes []string) ([]*chartRepoRepository.Chart, error)
4646
FindBulkChartsEnvByAppNameSubstring(appNameIncludes []string, appNameExcludes []string, envId int) ([]*chartConfig.EnvConfigOverride, error)
47-
BulkUpdateChartsValuesYamlAndGlobalOverrideById(id int, patch string) error
47+
BulkUpdateChartsValuesYamlAndGlobalOverrideById(id int, patchValuesYml string, patchGlobalOverrideYml string) error
4848
BulkUpdateChartsEnvYamlOverrideById(id int, patch string) error
4949

5050
//For ConfigMap & Secret :
@@ -222,12 +222,12 @@ func (repositoryImpl BulkUpdateRepositoryImpl) FindBulkChartsEnvByAppNameSubstri
222222
err := q.Select()
223223
return charts, err
224224
}
225-
func (repositoryImpl BulkUpdateRepositoryImpl) BulkUpdateChartsValuesYamlAndGlobalOverrideById(id int, patch string) error {
225+
func (repositoryImpl BulkUpdateRepositoryImpl) BulkUpdateChartsValuesYamlAndGlobalOverrideById(id int, patchValuesYml string, patchGlobalOverrideYml string) error {
226226
chart := &chartRepoRepository.Chart{}
227227
_, err := repositoryImpl.dbConnection.
228228
Model(chart).
229-
Set("values_yaml = ?", patch).
230-
Set("global_override = ?", patch).
229+
Set("values_yaml = ?", patchValuesYml).
230+
Set("global_override = ?", patchGlobalOverrideYml).
231231
Where("id = ?", id).
232232
Update()
233233
if err != nil {

pkg/bulkAction/BulkUpdateService.go

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -407,52 +407,64 @@ func (impl BulkUpdateServiceImpl) BulkUpdateDeploymentTemplate(bulkUpdatePayload
407407
} else {
408408
for _, chart := range charts {
409409
appDetailsByChart, _ := impl.bulkUpdateRepository.FindAppByChartId(chart.Id)
410-
modified, err := impl.ApplyJsonPatch(deploymentTemplatePatch, chart.Values)
410+
modifiedValuesYml, err := impl.ApplyJsonPatch(deploymentTemplatePatch, chart.Values)
411411
if err != nil {
412-
impl.logger.Errorw("error in applying JSON patch", "err", err)
412+
impl.logger.Errorw("error in applying JSON patch to chart.Values", "err", err)
413413
bulkUpdateFailedResponse := &DeploymentTemplateBulkUpdateResponseForOneApp{
414414
AppId: appDetailsByChart.Id,
415415
AppName: appDetailsByChart.AppName,
416416
Message: fmt.Sprintf("Error in applying JSON patch : %s", err.Error()),
417417
}
418418
deploymentTemplateBulkUpdateResponse.Failure = append(deploymentTemplateBulkUpdateResponse.Failure, bulkUpdateFailedResponse)
419419
} else {
420-
err = impl.bulkUpdateRepository.BulkUpdateChartsValuesYamlAndGlobalOverrideById(chart.Id, modified)
420+
modifiedGlobalOverrideYml, err := impl.ApplyJsonPatch(deploymentTemplatePatch, chart.GlobalOverride)
421421
if err != nil {
422-
impl.logger.Errorw("error in bulk updating charts", "err", err)
422+
impl.logger.Errorw("error in applying JSON patch to GlobalOverride", "err", err)
423423
bulkUpdateFailedResponse := &DeploymentTemplateBulkUpdateResponseForOneApp{
424424
AppId: appDetailsByChart.Id,
425425
AppName: appDetailsByChart.AppName,
426-
Message: fmt.Sprintf("Error in updating in db : %s", err.Error()),
426+
Message: fmt.Sprintf("Error in applying JSON patch : %s", err.Error()),
427427
}
428428
deploymentTemplateBulkUpdateResponse.Failure = append(deploymentTemplateBulkUpdateResponse.Failure, bulkUpdateFailedResponse)
429429
} else {
430-
bulkUpdateSuccessResponse := &DeploymentTemplateBulkUpdateResponseForOneApp{
431-
AppId: appDetailsByChart.Id,
432-
AppName: appDetailsByChart.AppName,
433-
Message: "Updated Successfully",
434-
}
435-
deploymentTemplateBulkUpdateResponse.Successful = append(deploymentTemplateBulkUpdateResponse.Successful, bulkUpdateSuccessResponse)
436-
437-
//creating history entry for deployment template
438-
appLevelAppMetricsEnabled, err := impl.deployedAppMetricsService.GetMetricsFlagByAppId(chart.AppId)
430+
err = impl.bulkUpdateRepository.BulkUpdateChartsValuesYamlAndGlobalOverrideById(chart.Id, modifiedValuesYml, modifiedGlobalOverrideYml)
439431
if err != nil {
440-
impl.logger.Errorw("error in getting app level metrics app level", "error", err, "appId", chart.AppId)
441-
return nil
442-
}
443-
chart.GlobalOverride = modified
444-
chart.Values = modified
445-
err = impl.deploymentTemplateHistoryService.CreateDeploymentTemplateHistoryFromGlobalTemplate(chart, nil, appLevelAppMetricsEnabled)
446-
if err != nil {
447-
impl.logger.Errorw("error in creating entry for deployment template history", "err", err, "chart", chart)
448-
}
449-
//VARIABLE_MAPPING_UPDATE
450-
//NOTE: this flow is doesn't have the user info, therefore updated by is being set to the last updated by
451-
err = impl.scopedVariableManager.ExtractAndMapVariables(chart.GlobalOverride, chart.Id, repository5.EntityTypeDeploymentTemplateAppLevel, chart.UpdatedBy, nil)
452-
if err != nil {
453-
return nil
432+
impl.logger.Errorw("error in bulk updating charts", "err", err)
433+
bulkUpdateFailedResponse := &DeploymentTemplateBulkUpdateResponseForOneApp{
434+
AppId: appDetailsByChart.Id,
435+
AppName: appDetailsByChart.AppName,
436+
Message: fmt.Sprintf("Error in updating in db : %s", err.Error()),
437+
}
438+
deploymentTemplateBulkUpdateResponse.Failure = append(deploymentTemplateBulkUpdateResponse.Failure, bulkUpdateFailedResponse)
439+
} else {
440+
bulkUpdateSuccessResponse := &DeploymentTemplateBulkUpdateResponseForOneApp{
441+
AppId: appDetailsByChart.Id,
442+
AppName: appDetailsByChart.AppName,
443+
Message: "Updated Successfully",
444+
}
445+
deploymentTemplateBulkUpdateResponse.Successful = append(deploymentTemplateBulkUpdateResponse.Successful, bulkUpdateSuccessResponse)
446+
447+
//creating history entry for deployment template
448+
appLevelAppMetricsEnabled, err := impl.deployedAppMetricsService.GetMetricsFlagByAppId(chart.AppId)
449+
if err != nil {
450+
impl.logger.Errorw("error in getting app level metrics app level", "error", err, "appId", chart.AppId)
451+
return nil
452+
}
453+
chart.GlobalOverride = modifiedGlobalOverrideYml
454+
chart.Values = modifiedValuesYml
455+
err = impl.deploymentTemplateHistoryService.CreateDeploymentTemplateHistoryFromGlobalTemplate(chart, nil, appLevelAppMetricsEnabled)
456+
if err != nil {
457+
impl.logger.Errorw("error in creating entry for deployment template history", "err", err, "chart", chart)
458+
}
459+
//VARIABLE_MAPPING_UPDATE
460+
//NOTE: this flow is doesn't have the user info, therefore updated by is being set to the last updated by
461+
err = impl.scopedVariableManager.ExtractAndMapVariables(chart.GlobalOverride, chart.Id, repository5.EntityTypeDeploymentTemplateAppLevel, chart.UpdatedBy, nil)
462+
if err != nil {
463+
return nil
464+
}
454465
}
455466
}
467+
456468
}
457469
}
458470
}

pkg/eventProcessor/in/WorkflowEventProcessorService.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,6 @@ func (impl *WorkflowEventProcessorImpl) extractAsyncCdDeployRequestFromEventMsg(
773773
impl.logger.Errorw("error in unmarshalling CD async install request nats message", "err", err)
774774
return nil, err
775775
}
776-
impl.logger.Infow("received async cd pipeline deployment request", "appId", cdAsyncInstallReq.ValuesOverrideRequest.AppId, "envId", cdAsyncInstallReq.ValuesOverrideRequest.EnvId)
777776
if cdAsyncInstallReq.Id == 0 && cdAsyncInstallReq.ValuesOverrideRequest == nil {
778777
impl.logger.Errorw("invalid async cd pipeline deployment request", "msg", msg.Data)
779778
return nil, fmt.Errorf("invalid async cd pipeline deployment request")
@@ -795,6 +794,7 @@ func (impl *WorkflowEventProcessorImpl) extractAsyncCdDeployRequestFromEventMsg(
795794
impl.logger.Errorw("error in setting additional data to UserDeploymentRequest", "err", err)
796795
return nil, err
797796
}
797+
impl.logger.Infow("received async cd pipeline deployment request", "appId", cdAsyncInstallReq.ValuesOverrideRequest.AppId, "envId", cdAsyncInstallReq.ValuesOverrideRequest.EnvId)
798798
return cdAsyncInstallReq, nil
799799
}
800800

pkg/pipeline/CiService.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,21 +243,28 @@ func (impl *CiServiceImpl) handleRuntimeParamsValidations(trigger types.Trigger,
243243
}
244244

245245
func (impl *CiServiceImpl) markCurrentCiWorkflowFailed(savedCiWf *pipelineConfig.CiWorkflow, validationErr error) error {
246-
// TODO: mature this method to create ci workflow and mark it failed if required
247246
// currently such requirement is not there
248247
if savedCiWf == nil {
249248
return nil
250249
}
251-
if slices.Contains(cdWorkflow.WfrTerminalStatusList, savedCiWf.Status) {
250+
if savedCiWf.Id != 0 && slices.Contains(cdWorkflow.WfrTerminalStatusList, savedCiWf.Status) {
252251
impl.Logger.Debug("workflow is already in terminal state", "status", savedCiWf.Status, "workflowId", savedCiWf.Id, "message", savedCiWf.Message)
253252
return nil
254253
}
254+
255255
savedCiWf.Status = cdWorkflow.WorkflowFailed
256256
savedCiWf.Message = validationErr.Error()
257257
savedCiWf.FinishedOn = time.Now()
258-
dbErr := impl.ciWorkflowRepository.SaveWorkFlow(savedCiWf)
258+
259+
var dbErr error
260+
if savedCiWf.Id == 0 {
261+
dbErr = impl.ciWorkflowRepository.SaveWorkFlow(savedCiWf)
262+
} else {
263+
dbErr = impl.ciWorkflowRepository.UpdateWorkFlow(savedCiWf)
264+
}
265+
259266
if dbErr != nil {
260-
impl.Logger.Errorw("saving workflow error", "err", dbErr)
267+
impl.Logger.Errorw("save/update workflow error", "err", dbErr)
261268
return dbErr
262269
}
263270
return nil

pkg/pipeline/bean/pipelineStage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func (s *StepVariableDto) IsEmptyValueAllowed(isTriggerStage bool) bool {
130130
type ConditionDetailDto struct {
131131
Id int `json:"id"`
132132
ConditionOnVariable string `json:"conditionOnVariable"` //name of variable on which condition is written
133-
ConditionType repository.PipelineStageStepConditionType `json:"conditionType" validate:"oneof=SKIP TRIGGER SUCCESS FAIL"`
133+
ConditionType repository.PipelineStageStepConditionType `json:"conditionType" validate:"oneof=SKIP TRIGGER FAIL PASS"`
134134
ConditionalOperator string `json:"conditionOperator"`
135135
ConditionalValue string `json:"conditionalValue"`
136136
}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/deployment.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ spec:
5656
matchLabels:
5757
{{- if .Values.customMatchLabels }}
5858
{{ toYaml .Values.customMatchLabels | indent 6 }}
59-
{{- end }}
59+
{{- else }}
6060
app: {{ template ".Chart.Name .name" $ }}
6161
release: {{ $.Release.Name }}
62+
{{- end }}
6263
replicas: {{ $.Values.replicaCount }}
6364
minReadySeconds: {{ $.Values.MinReadySeconds }}
6465
template:
@@ -70,19 +71,20 @@ spec:
7071
{{- end }}
7172
{{- end }}
7273
labels:
73-
app: {{ template ".Chart.Name .name" $ }}
7474
appId: {{ $.Values.app | quote }}
7575
envId: {{ $.Values.env | quote }}
76-
release: {{ $.Release.Name }}
77-
{{- if .Values.customPodLabels }}
78-
{{ toYaml .Values.customPodLabels | indent 8 }}
79-
{{- end }}
80-
{{- if .Values.appLabels }}
76+
{{- if .Values.appLabels }}
8177
{{ toYaml .Values.appLabels | indent 8 }}
82-
{{- end }}
78+
{{- end }}
79+
{{- if .Values.customPodLabels }}
80+
{{ toYaml .Values.customPodLabels | indent 8 }}
81+
{{- else }}
82+
app: {{ template ".Chart.Name .name" $ }}
83+
release: {{ $.Release.Name }}
8384
{{- if .Values.podLabels }}
8485
{{ toYaml .Values.podLabels | indent 8 }}
8586
{{- end }}
87+
{{- end }}
8688
spec:
8789
{{- if $.Values.podExtraSpecs }}
8890
{{ toYaml .Values.podExtraSpecs | indent 6 }}
@@ -237,7 +239,7 @@ spec:
237239
{{- range $.Values.ContainerPort }}
238240
- name: {{ .name}}
239241
containerPort: {{ .port }}
240-
protocol: {{ .protocol }}
242+
protocol: {{ .protocol | default "TCP" }}
241243
{{- end}}
242244
{{- if and $.Values.command.enabled $.Values.command.workingDir }}
243245
workingDir: {{ $.Values.command.workingDir }}
@@ -620,8 +622,8 @@ spec:
620622
{{- end }}
621623
{{- end }}
622624
{{- end }}
623-
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) }} []{{- end }}
624-
{{- if and (eq (len .Values.volumeMounts) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) }} [] {{- end }}
625+
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) (eq (.Values.appMetrics) false) }} []{{- end }}
626+
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) (eq (.Values.appMetrics) false) }} [] {{- end }}
625627

626628
revisionHistoryLimit: 3
627629
## pauseForSecondsBeforeSwitchActive: {{ $.Values.pauseForSecondsBeforeSwitchActive }}
@@ -847,7 +849,7 @@ spec:
847849
{{- range $.Values.ContainerPort }}
848850
- name: {{ .name}}
849851
containerPort: {{ .port }}
850-
protocol: {{ .protocol }}
852+
protocol: {{ .protocol | default "TCP" }}
851853
{{- end}}
852854
{{- if and $.Values.command.enabled $.Values.command.workingDir }}
853855
workingDir: {{ $.Values.command.workingDir }}
@@ -1230,8 +1232,8 @@ spec:
12301232
{{- end }}
12311233
{{- end }}
12321234
{{- end }}
1233-
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) }} []{{- end }}
1234-
{{- if and (eq (len .Values.volumeMounts) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) }} [] {{- end }}
1235+
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) (eq (.Values.appMetrics) false) }} []{{- end }}
1236+
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) (eq (.Values.appMetrics) false)}} [] {{- end }}
12351237

12361238
revisionHistoryLimit: 3
12371239
## pauseForSecondsBeforeSwitchActive: {{ $.Values.pauseForSecondsBeforeSwitchActive }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/poddisruptionbudget.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ metadata:
1717
envId: {{ $.Values.env | quote }}
1818
chart: {{ template ".Chart.Name .chart" $ }}
1919
release: {{ $.Release.Name }}
20+
{{- if .Values.appLabels }}
21+
{{ toYaml .Values.appLabels | indent 4 }}
22+
{{- end }}
2023
spec:
2124
{{- if .Values.podDisruptionBudget.minAvailable }}
2225
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
{{- else }}
3737
targetPort: {{ .name }}
3838
{{- end }}
39-
protocol: {{ .protocol }}
39+
protocol: {{ .protocol | default "TCP" }}
4040
{{- if (and (eq $.Values.service.type "NodePort") .nodePort ) }}
4141
nodePort: {{ .nodePort }}
4242
{{- end }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/servicemonitor.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ metadata:
1919
{{- if .Values.servicemonitor.additionalLabels }}
2020
{{ toYaml .Values.servicemonitor.additionalLabels | indent 4 }}
2121
{{- end }}
22+
{{- if .Values.appLabels }}
23+
{{ toYaml .Values.appLabels | indent 4 }}
24+
{{- end }}
2225
spec:
2326
endpoints:
2427
{{- range .Values.ContainerPort }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/vertical-pod-autoscaler.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ metadata:
1111
envId: {{ $.Values.env | quote }}
1212
chart: {{ template ".Chart.Name .chart" . }}
1313
release: {{ .Values.prometheus.release }}
14+
{{- if .Values.appLabels }}
15+
{{ toYaml .Values.appLabels | indent 4 }}
16+
{{- end }}
1417
spec:
1518
{{- if .Values.verticalPodScaling.resourcePolicy }}
1619
resourcePolicy:

0 commit comments

Comments
 (0)