Skip to content

Commit f4ab5d5

Browse files
Merge branch 'main' into feature-release-v3
2 parents 0580884 + b3f4f78 commit f4ab5d5

Some content is hidden

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

56 files changed

+930
-457
lines changed

CHANGELOG/release-notes-v0.7.0.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
## v0.7.0
2+
3+
## Bugs
4+
- fix: extra labels propagation made env driven (#5274)
5+
- fix: App clone config map fix (#5268)
6+
- fix: latest version in default cluster and on UI (#5259)
7+
- fix: update CVE's severity and store multiple same CVE's in multiple packages (#5168)
8+
- fix: fixing force push for gitops (#5152)
9+
- fix: extra labels propagation based on k8s label regex matching (#5216)
10+
- fix: invalid runner status (#5189)
11+
- fix: revert changes from main (#5206)
12+
- fix: apps and jobs permission (#5110)
13+
- fix: added Copyright (#5172)
14+
- fix:removed unused env var (#5174)
15+
- fix: Handling all cases for 5xx (#5100)
16+
- fix: trivy scan step command fix (#5162)
17+
- fix: added extra args in trivy cmds (#5146)
18+
- fix: proxyRouter empty data err panic handling (#5147)
19+
- fix: handling side-effects for displaying external helm apps with same name across diff namespaces and clusters (#4951)
20+
- fix: fatal log removed (#5043)
21+
- fix: added a check for restricting managers to assign superadmin through permission groups (#5025)
22+
- fix: SHOW_DOCKER_BUILD_ARGS variable not working as expected (#5117)
23+
- fix: dependabot version upgrade (#5089)
24+
- fix: containers are missing from app-details page in argocd app (#4973)
25+
- fix:resolved PR review comments also remove check for virtual cluster (#5095)
26+
- fix:handled namespace case if deleted by kubectl (#5081)
27+
- fix: oci chart were getting deployed through gitops (#5088)
28+
- fix: argocd config update fix (#5074)
29+
- fix: handle 5xx in fetch resource tree api and cd-trigger (#5050)
30+
- fix: gitops update updated (#5055)
31+
- fix: App create api validations (#5019)
32+
- fix: git material saved in transaction (#5040)
33+
- fix: panic while pulling images (#5036)
34+
- fix: terminal stuck in connecting state (#4989)
35+
- fix: handle for wrong format of k8s version in semvercompare func in cronjob template charts (#5016)
36+
- fix: Dockerfile ubuntu version (#5022)
37+
- fix: application status changes to HIBERNATING, when hibernation fails due to some reason (#5005)
38+
- fix: deleted api token can be reused if created again with same name (#4978)
39+
- fix: Kubelink Requests getting Failed for gRPC method GetAppDetails (#5012)
40+
- fix: terminate sync if in progress (#4946)
41+
- fix: grpc error handling for TemplateChart req (#4980)
42+
- fix: removed redundant import (#5004)
43+
- fix: image promotion sql script (#4996)
44+
- fix: image-approval-migartion fix (#4994)
45+
- fix: ci-cd count per day in telemetry data (#4931)
46+
## Enhancements
47+
- feat: notifier behind nats (#5185)
48+
- feat: cd pipeline deployment history refactoring (#5200)
49+
- feat: wire nil test in pre ci pipeline (#4858)
50+
- feat: added recovery counter metrics (#5124)
51+
- feat: auto remediation (#5137)
52+
- feat: support for ca cert in trivy (#5064)
53+
- feat: validation for pipeline Type (#4670)
54+
- feat: propagate labels such as envName and projectName (#5063)
55+
- feat: Plugin to trigger Devtron Job (#5053)
56+
- feat: CD Trigger Plugin (#4810)
57+
- feat: Introduction to feasibility in Deployment (#4862)
58+
## Documentation
59+
- doc: Created Resource Watcher Doc (#5193)
60+
- doc: Modified Portforward Section to Kubectl Section (#5236)
61+
- doc: Added enhancements to security doc (#5203)
62+
- docs: update readme to include multi arch flag (#4998)
63+
- docs: config.md updatation for new flag (#5061)
64+
- doc: Fixes in Documentation for May Month (#5150)
65+
- doc: Created Resource Watcher Doc (#5193)
66+
- doc: Modified Portforward Section to Kubectl Section (#5236)
67+
- doc: Added enhancements to security doc (#5203)
68+
- docs: update readme to include multi arch flag (#4998)
69+
- docs: config.md updatation for new flag (#5061)
70+
- doc: Added kubectl port-fwd section in RB (#5139)
71+
- doc: Added Bitbucket Data Center in GitOps doc (#5075)
72+
- doc: Image promotion policy (#4762)
73+
- doc: Revamped Resource Browser Doc (#5035)
74+
- doc: Added Bulk Restart in Application Groups doc (#5080)
75+
- doc: Added new doc in the index (#5029)
76+
- doc: Changes made in the doc according to the newer version (#5024)
77+
- doc: Added Linked CI with Child Info + Runtime Build Parameters (#4991)
78+
## Others
79+
- chore: updated vendor (#5166)
80+
- chore: gitops validation in api (#5082)
81+
- chore: release v2 migration (#5126)
82+
- chore: migration update for remote connection config (#5113)
83+
- chore: added sql for release and release channels (#4898)
84+
- chore: resource scan migration (#4977)
85+
- chore: image promotion migration (#4992)
86+
- misc: uniform GitHub action (#5069)
87+
88+

api/auth/user/UserAuthHandler.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func (handler UserAuthHandlerImpl) AddDefaultPolicyAndRoles(w http.ResponseWrite
237237

238238
}
239239
func (handler UserAuthHandlerImpl) AuthVerification(w http.ResponseWriter, r *http.Request) {
240-
verified, err := handler.userAuthService.AuthVerification(r)
240+
verified, _, err := handler.userAuthService.AuthVerification(r)
241241
if err != nil {
242242
handler.logger.Errorw("service err, AuthVerification", "err", err)
243243
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
@@ -253,13 +253,14 @@ func (handler UserAuthHandlerImpl) AuthVerificationV2(w http.ResponseWriter, r *
253253
isSuperAdmin = true
254254
}
255255
response := make(map[string]interface{})
256-
verified, err := handler.userAuthService.AuthVerification(r)
256+
verified, emailId, err := handler.userAuthService.AuthVerification(r)
257257
if err != nil {
258258
handler.logger.Errorw("service err, AuthVerification", "err", err)
259259
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
260260
return
261261
}
262262
response["isSuperAdmin"] = isSuperAdmin
263263
response["isVerified"] = verified
264+
response["emailId"] = emailId
264265
common.WriteJsonResp(w, nil, response, http.StatusOK)
265266
}

api/k8s/application/k8sApplicationRestHandler.go

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ type K8sApplicationRestHandlerImpl struct {
8989
helmAppService client.HelmAppService
9090
userService user.UserService
9191
k8sCommonService k8s.K8sCommonService
92+
terminalEnvVariables *util.TerminalEnvVariables
9293
}
9394

94-
func NewK8sApplicationRestHandlerImpl(logger *zap.SugaredLogger, k8sApplicationService application2.K8sApplicationService, pump connector.Pump, terminalSessionHandler terminal.TerminalSessionHandler, enforcer casbin.Enforcer, enforcerUtilHelm rbac.EnforcerUtilHelm, enforcerUtil rbac.EnforcerUtil, helmAppService client.HelmAppService, userService user.UserService, k8sCommonService k8s.K8sCommonService, validator *validator.Validate) *K8sApplicationRestHandlerImpl {
95+
func NewK8sApplicationRestHandlerImpl(logger *zap.SugaredLogger, k8sApplicationService application2.K8sApplicationService, pump connector.Pump, terminalSessionHandler terminal.TerminalSessionHandler, enforcer casbin.Enforcer, enforcerUtilHelm rbac.EnforcerUtilHelm, enforcerUtil rbac.EnforcerUtil, helmAppService client.HelmAppService, userService user.UserService, k8sCommonService k8s.K8sCommonService, validator *validator.Validate, envVariables *util.EnvironmentVariables) *K8sApplicationRestHandlerImpl {
9596
return &K8sApplicationRestHandlerImpl{
9697
logger: logger,
9798
k8sApplicationService: k8sApplicationService,
@@ -104,6 +105,7 @@ func NewK8sApplicationRestHandlerImpl(logger *zap.SugaredLogger, k8sApplicationS
104105
helmAppService: helmAppService,
105106
userService: userService,
106107
k8sCommonService: k8sCommonService,
108+
terminalEnvVariables: envVariables.TerminalEnvVariables,
107109
}
108110
}
109111

@@ -820,6 +822,17 @@ func (handler *K8sApplicationRestHandlerImpl) requestValidationAndRBAC(w http.Re
820822
}
821823
}
822824

825+
func (handler *K8sApplicationRestHandlerImpl) restrictTerminalAccessForNonSuperUsers(w http.ResponseWriter, token string) bool {
826+
// if RESTRICT_TERMINAL_ACCESS_FOR_NON_SUPER_USER is set to true, only super admins can access terminal/ephemeral containers
827+
if handler.terminalEnvVariables.RestrictTerminalAccessForNonSuperUser {
828+
if isSuperAdmin := handler.enforcer.Enforce(token, casbin.ResourceGlobal, casbin.ActionGet, "*"); !isSuperAdmin {
829+
common.WriteJsonResp(w, errors.New("unauthorized, only super-admins can access terminal"), nil, http.StatusForbidden)
830+
return true
831+
}
832+
}
833+
return false
834+
}
835+
823836
func (handler *K8sApplicationRestHandlerImpl) GetTerminalSession(w http.ResponseWriter, r *http.Request) {
824837
token := r.Header.Get("token")
825838
userId, err := handler.userService.GetLoggedInUser(r)
@@ -836,6 +849,11 @@ func (handler *K8sApplicationRestHandlerImpl) GetTerminalSession(w http.Response
836849
return
837850
}
838851
request.ExternalArgoApplicationName = vars.Get("externalArgoApplicationName")
852+
// check for super admin
853+
restricted := handler.restrictTerminalAccessForNonSuperUsers(w, token)
854+
if restricted {
855+
return
856+
}
839857
if resourceRequestBean.AppIdentifier != nil {
840858
// RBAC enforcer applying For Helm App
841859
rbacObject, rbacObject2 := handler.enforcerUtilHelm.GetHelmObjectByClusterIdNamespaceAndAppName(resourceRequestBean.AppIdentifier.ClusterId, resourceRequestBean.AppIdentifier.Namespace, resourceRequestBean.AppIdentifier.ReleaseName)
@@ -1013,6 +1031,7 @@ func (handler *K8sApplicationRestHandlerImpl) verifyRbacForCluster(token string,
10131031
}
10141032

10151033
func (handler *K8sApplicationRestHandlerImpl) CreateEphemeralContainer(w http.ResponseWriter, r *http.Request) {
1034+
token := r.Header.Get("token")
10161035
userId, err := handler.userService.GetLoggedInUser(r)
10171036
if userId == 0 || err != nil {
10181037
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
@@ -1034,6 +1053,11 @@ func (handler *K8sApplicationRestHandlerImpl) CreateEphemeralContainer(w http.Re
10341053
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
10351054
return
10361055
}
1056+
// check for super admin
1057+
restricted := handler.restrictTerminalAccessForNonSuperUsers(w, token)
1058+
if restricted {
1059+
return
1060+
}
10371061
//rbac applied in below function
10381062
resourceRequestBean := handler.handleEphemeralRBAC(request.PodName, request.Namespace, w, r)
10391063
if resourceRequestBean == nil {
@@ -1057,6 +1081,7 @@ func (handler *K8sApplicationRestHandlerImpl) CreateEphemeralContainer(w http.Re
10571081
}
10581082

10591083
func (handler *K8sApplicationRestHandlerImpl) DeleteEphemeralContainer(w http.ResponseWriter, r *http.Request) {
1084+
token := r.Header.Get("token")
10601085
userId, err := handler.userService.GetLoggedInUser(r)
10611086
if userId == 0 || err != nil {
10621087
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
@@ -1078,6 +1103,11 @@ func (handler *K8sApplicationRestHandlerImpl) DeleteEphemeralContainer(w http.Re
10781103
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
10791104
return
10801105
}
1106+
// check for super admin
1107+
restricted := handler.restrictTerminalAccessForNonSuperUsers(w, token)
1108+
if restricted {
1109+
return
1110+
}
10811111
//rbac applied in below function
10821112
resourceRequestBean := handler.handleEphemeralRBAC(request.PodName, request.Namespace, w, r)
10831113
if resourceRequestBean == nil {

charts/devtron/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: devtron-operator
3-
appVersion: 0.6.29
3+
appVersion: 0.7.0
44
description: Chart to configure and install Devtron. Devtron is a Kubernetes Orchestration system.
55
keywords:
66
- Devtron
@@ -11,7 +11,7 @@ keywords:
1111
- argocd
1212
- Hyperion
1313
engine: gotpl
14-
version: 0.22.71
14+
version: 0.22.72
1515
sources:
1616
- https://github.com/devtron-labs/charts
1717
dependencies:

charts/devtron/devtron-bom.yaml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ global:
88
runAsUser: 1000
99
runAsNonRoot: true
1010
containerRegistry: "quay.io/devtron"
11-
11+
1212
installer:
13-
release: "v0.6.29"
13+
release: "v0.7.0"
1414
registry: ""
1515
image: "inception"
1616
tag: "473deaa4-185-21582"
17+
1718
components:
1819
dashboard:
1920
config:
@@ -30,31 +31,30 @@ components:
3031
SERVICE_WORKER_TIMEOUT: "1"
3132
API_BATCH_SIZE: "30"
3233
registry: ""
33-
image: "dashboard:1c86e84e-325-22108"
34+
image: "dashboard:87aaf7ac-690-23135"
3435
imagePullPolicy: IfNotPresent
35-
36+
3637
devtron:
3738
registry: ""
38-
image: "hyperion:e7f34f5a-280-22107"
39-
cicdImage: "devtron:e7f34f5a-434-22106"
39+
image: "hyperion:3aa7e420-280-23147"
40+
cicdImage: "devtron:3aa7e420-434-23146"
4041
imagePullPolicy: IfNotPresent
4142
customOverrides: {}
42-
43+
4344
ciRunner:
4445
registry: ""
45-
image: "ci-runner:f5614d79-541-22176"
46-
47-
46+
image: "ci-runner:6e721248-138-23081"
47+
4848
argocdDexServer:
4949
registry: ""
5050
image: "dex:v2.30.2"
5151
imagePullPolicy: IfNotPresent
5252
initContainer:
5353
authenticator: "authenticator:e414faff-393-13273"
54-
54+
5555
kubelink:
5656
registry: ""
57-
image: "kubelink:2610ac5a-564-22109"
57+
image: "kubelink:a810dbae-564-23055"
5858
imagePullPolicy: IfNotPresent
5959
configs:
6060
ENABLE_HELM_RELEASE_CACHE: "true"
@@ -69,18 +69,18 @@ components:
6969
dbconfig:
7070
secretName: postgresql-postgresql
7171
keyName: postgresql-password
72-
72+
7373
kubewatch:
7474
registry: ""
75-
image: "kubewatch:50d4d32d-419-22116"
75+
image: "kubewatch:f8ac0fe6-419-23054"
7676
imagePullPolicy: IfNotPresent
7777
configs:
7878
devtroncd_NAMESPACE: "devtron-ci"
7979
CI_INFORMER: "true"
8080
ACD_NAMESPACE: "devtroncd"
8181
ACD_INFORMER: "true"
8282
NATS_STREAM_MAX_AGE: "10800"
83-
83+
8484
postgres:
8585
registry: ""
8686
image: "postgres:11.9.0-debian-10-r26"
@@ -90,6 +90,7 @@ components:
9090
metrics:
9191
image: postgres_exporter:v0.4.7
9292
armImage: postgres_exporter:v0.10.1
93+
9394
gitsensor:
9495
registry: ""
9596
image: "git-sensor:8545feb5-200-22005"
@@ -107,10 +108,10 @@ components:
107108
dbconfig:
108109
secretName: postgresql-postgresql
109110
keyName: postgresql-password
110-
# Values for lens
111+
# Values for lens
111112
lens:
112113
registry: ""
113-
image: "lens:70577aaa-333-21179"
114+
image: "lens:3d3e8f08-333-23057"
114115
imagePullPolicy: IfNotPresent
115116
configs:
116117
GIT_SENSOR_PROTOCOL: GRPC
@@ -123,7 +124,7 @@ components:
123124
dbconfig:
124125
secretName: postgresql-postgresql
125126
keyName: postgresql-password
126-
# Change below values for nats
127+
# Change below values for nats
127128
nats:
128129
registry: ""
129130
image: nats:2.9.3-alpine
@@ -139,6 +140,7 @@ components:
139140
enabled: false
140141
persistence:
141142
storage: 5Gi
143+
142144
migrator:
143145
registry: ""
144146
image: "migrator:v4.16.2"
@@ -151,13 +153,11 @@ components:
151153
DB_NAME: "casbin"
152154
gitsensor:
153155
DB_NAME: "git_sensor"
154-
lens:
156+
lens:
155157
DB_NAME: "lens"
156-
157158
chartSync:
158159
registry: ""
159-
image: chart-sync:d0dcc590-373-21074
160-
160+
image: chart-sync:b67ab589-150-23082
161161
# values for argocd integration
162162
argo-cd:
163163
global:
@@ -175,21 +175,22 @@ workflowController:
175175
executorImage: "argoexec:v3.4.3"
176176
IMDSv1Image: "workflow-controller:v3.0.7"
177177
IMDSv1ExecutorImage: "argoexec:v3.0.7"
178+
178179
security:
179180
imageScanner:
180-
image: "image-scanner:c0416bc2-334-22111"
181+
image: "image-scanner:3ab2ba46-141-23064"
181182
clair:
182183
image:
183184
repository: clair
184185
tag: 4.3.6
185186
# Values for notifier integration
186187
notifier:
187188
image: "notifier:924a17f6-372-22110"
189+
188190
minio:
189191
image: "minio:RELEASE.2021-02-14T04-01-33Z"
190192
mbImage: "minio-mc:RELEASE.2021-02-14T04-28-06Z"
191193
gatewayImage: "minio:RELEASE.2020-12-03T05-49-24Z"
192-
193194
# Values for grafana integration
194195
monitoring:
195196
grafana:

charts/devtron/templates/_helpers.tpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ it randomly.
1919
{{- end -}}
2020
{{- end }}
2121

22-
2322
{{/*
2423
Return full image
2524
{{ include "common.image" ( dict "component" .Values.path.to.the.component "global" .Values.global .extraImage .extraImageTag .extraImageDigest ) }}
@@ -50,4 +49,4 @@ Return full image
5049
{{- printf "%s" $imageName -}}
5150
{{- end }}
5251
{{- end -}}
53-
{{- end -}}
52+
{{- end -}}

0 commit comments

Comments
 (0)