Skip to content

sync: main changes synced into develop #6492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion charts/devtron/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords:
- argocd
- Hyperion
engine: gotpl
version: 0.22.87
version: 0.22.88
sources:
- https://github.com/devtron-labs/charts
dependencies:
Expand Down
12 changes: 9 additions & 3 deletions charts/devtron/templates/configmap-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ metadata:
data:
{{- if $.Values.configs }}
{{ toYaml $.Values.configs | indent 2 }}
{{- end }}
{{- if $.Values.devtronEnterprise.enabled }}
DEVTRON_INSTALLATION_TYPE: "enterprise"
{{- end }}
INSTALLATION_THROUGH_HELM: "True"
DEVTRON_HELM_RELEASE_NAME: {{ $.Release.Name }}
DEVTRON_HELM_RELEASE_NAMESPACE: {{ $.Release.Namespace }}
{{- if and ($.Values.minio.enabled) (not $.Values.configs.BLOB_STORAGE_PROVIDER) }}
BLOB_STORAGE_PROVIDER: "S3"
BLOB_STORAGE_S3_ENDPOINT: "http://devtron-minio.devtroncd:9000"
Expand Down Expand Up @@ -302,7 +306,8 @@ metadata:
data:
{{- if $.Values.global.configs }}
{{- toYaml $.Values.global.configs | nindent 2 }}
{{- end }}
{{- end }}
{{- if not $.Values.devtronEnterprise.enabled }}
---
apiVersion: v1
kind: ConfigMap
Expand All @@ -317,7 +322,7 @@ data:
{{- if $.Values.global.configs }}
{{- toYaml $.Values.global.configs | nindent 2 }}
{{- end }}

{{- end }}
{{- if $.Values.imagePullSecret }}
{{- if $.Values.imagePullSecret.create }}
---
Expand Down Expand Up @@ -356,7 +361,7 @@ metadata:
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ include "imagePullSecret" . }}

{{- if not $.Values.devtronEnterprise.enabled }}
---
apiVersion: v1
kind: Secret
Expand All @@ -371,3 +376,4 @@ data:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/devtron/templates/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ metadata:
annotations:
"helm.sh/resource-policy": keep
data:
{{- if $.Values.devtronEnterprise.enabled }}
GATEKEEPER_URL: "https://license.devtron.ai/dashboard"
{{- end }}
{{- if .config }}
GA_ENABLED: {{ .config.analytics | default "false" | quote }}
HOTJAR_ENABLED: {{ .config.hotjar | default "false" | quote }}
Expand Down
4 changes: 4 additions & 0 deletions charts/devtron/templates/devtron-installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ metadata:
name: installer-devtron
namespace: devtroncd
spec:
{{- if $.Values.devtronEnterprise.enabled }}
url: https://raw.githubusercontent.com/{{ $.Values.installer.repo }}/refs/tags/devtron-enterprise-{{ $.Values.installer.release }}/charts/devtron-enterprise/installation-script
{{- else }}
{{- if or (eq $.Values.installer.source "gitee") (eq $.Values.installer.source "Gitee")}}
url: https://gitee.com/{{ $.Values.installer.repo }}/raw/{{ $.Values.installer.release }}/manifests/installation-script
{{- else }}
url: https://raw.githubusercontent.com/{{ $.Values.installer.repo }}/{{ $.Values.installer.release }}/manifests/installation-script
{{- end }}
{{- end }}
reSync: true
{{- end }}
{{- end }}
Expand Down
9 changes: 8 additions & 1 deletion charts/devtron/templates/devtron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ data:
DEVTRON_HELM_RELEASE_NAMESPACE: {{ $.Release.Namespace }}
FEATURE_MIGRATE_ARGOCD_APPLICATION_ENABLE: "true"
PG_USER: postgres
{{- if not $.Values.devtronEnterprise.enabled }}
PG_ADDR: postgresql-postgresql.devtroncd
{{- end }}
PG_PORT: "5432"
HELM_CLIENT_URL: kubelink-service:50051
DASHBOARD_PORT: "80"
Expand All @@ -28,6 +30,11 @@ data:
{{- end }}
{{- if $.Values.devtronEnterprise.enabled }}
CASBIN_CLIENT_URL: casbin-service.devtroncd:9000
CD_WORKFLOW_EXECUTOR_TYPE: SYSTEM
CI_WORKFLOW_EXECUTOR_TYPE: SYSTEM
DEVTRON_INSTALLATION_TYPE: enterprise
DEVTRON_VERSION_IDENTIFIER_IN_HELM_VALUES: "devtron.installer.release"
DEVTRON_BOM_URL: https://raw.githubusercontent.com/devtron-labs/charts/refs/tags/devtron-enterprise-%s/charts/devtron-enterprise/devtron-bom.yaml
{{- end }}
{{- if $.Values.installer.modules }}
{{- if has "cicd" $.Values.installer.modules }}
Expand Down Expand Up @@ -324,4 +331,4 @@ spec:
matchLabels:
app: devtron
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/devtron/templates/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ spec:
envFrom:
- configMapRef:
name: devtron-common-cm
- configMapRef:
name: devtron-operator-cm
{{- if $.Values.installer.resources }}
resources:
{{- toYaml $.Values.installer.resources | nindent 12 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/devtron/templates/migrator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,10 @@ apiVersion: batch/v1beta1
kind: Job
metadata:
namespace: devtroncd
name: postgresql-migrate-enterprise
name: postgresql-migrate-enterprise-{{ randAlphaNum 5 | lower }}
spec:
activeDeadlineSeconds: 1500
ttlSecondsAfterFinished: 600
ttlSecondsAfterFinished: 1000
backoffLimit: 20
completions: 1
parallelism: 1
Expand Down
23 changes: 23 additions & 0 deletions charts/devtron/templates/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not $.Values.devtronEnterprise.enabled }}
apiVersion: v1
kind: Namespace
metadata:
Expand All @@ -7,6 +8,7 @@ metadata:
annotations:
"helm.sh/hook": pre-install
"helm.sh/resource-policy": keep
{{- end }}
---
apiVersion: v1
kind: Namespace
Expand Down Expand Up @@ -62,6 +64,7 @@ metadata:
release: devtron
{{- if $.Values.installer.modules }}
{{- if has "cicd" $.Values.installer.modules }}
{{- if not $.Values.devtronEnterprise.enabled }}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -951,6 +954,7 @@ kind: ServiceAccount
metadata:
name: argo
namespace: argo
{{- end }}
---
apiVersion: v1
kind: ServiceAccount
Expand Down Expand Up @@ -981,6 +985,7 @@ imagePullSecrets:
imagePullSecrets:
{{ toYaml .Values.global.imagePullSecrets | indent 2 }}
{{- end }}
{{- if not $.Values.devtronEnterprise.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down Expand Up @@ -1184,12 +1189,28 @@ rules:
- create
- get
- delete
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: workflow-cluster-role
rules:
- apiGroups:
- '*'
resources:
- deployments
- pods
- pods/exec
verbs:
- watch
- patch
- delete
- create
- list
- get
- update
- exec
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -1236,6 +1257,7 @@ subjects:
- kind: ServiceAccount
name: devtron
namespace: devtroncd
{{- if not $.Values.devtronEnterprise.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down Expand Up @@ -1332,3 +1354,4 @@ spec:
serviceAccountName: argo
{{- end }}
{{- end }}
{{- end }}
7 changes: 5 additions & 2 deletions client/telemetry/TelemetryEventClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ type TelemetryEventClientImpl struct {
userAttributesRepository repository.UserAttributesRepository
cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService
telemetryConfig TelemetryConfig
globalEnvVariables *util.GlobalEnvVariables
}

type TelemetryEventClient interface {
Expand All @@ -96,7 +97,8 @@ func NewTelemetryEventClientImpl(logger *zap.SugaredLogger, client *http.Client,
serverDataStore *serverDataStore.ServerDataStore, userAuditService user2.UserAuditService,
helmAppClient gRPC.HelmAppClient,
cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService, cronLogger *cron3.CronLoggerImpl,
installedAppReadService installedAppReader.InstalledAppReadServiceEA) (*TelemetryEventClientImpl, error) {
installedAppReadService installedAppReader.InstalledAppReadServiceEA,
envVariables *util.EnvironmentVariables) (*TelemetryEventClientImpl, error) {
cron := cron.New(
cron.WithChain(cron.Recover(cronLogger)))
cron.Start()
Expand All @@ -118,6 +120,7 @@ func NewTelemetryEventClientImpl(logger *zap.SugaredLogger, client *http.Client,
installedAppReadService: installedAppReadService,
cloudProviderIdentifierService: cloudProviderIdentifierService,
telemetryConfig: TelemetryConfig{},
globalEnvVariables: envVariables.GlobalEnvVariables,
}

watcher.HeartbeatEventForTelemetry()
Expand Down Expand Up @@ -423,7 +426,7 @@ func (impl *TelemetryEventClientImpl) EnqueueGenericPostHogEvent(ucid string, ev
impl.PosthogClient.Client = client
}
}
if impl.PosthogClient.Client != nil {
if impl.PosthogClient.Client != nil && !impl.globalEnvVariables.IsAirGapEnvironment {
err := impl.PosthogClient.Client.Enqueue(posthog.Capture{
DistinctId: ucid,
Event: eventType,
Expand Down
1 change: 0 additions & 1 deletion cmd/external-app/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ import (
func InitializeApp() (*App, error) {
wire.Build(
user.SelfRegistrationWireSet,

sql.PgSqlWireSet,
user.UserWireSet,
sso.SsoConfigWireSet,
Expand Down
4 changes: 2 additions & 2 deletions cmd/external-app/wire_gen.go

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

2 changes: 1 addition & 1 deletion env_gen.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions env_gen.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,12 @@
| GRAFANA_USERNAME | string |admin | | | false |
| HIDE_IMAGE_TAGGING_HARD_DELETE | bool |false | | | false |
| IGNORE_AUTOCOMPLETE_AUTH_CHECK | bool |false | | | false |
| INSTALLED_MODULES | | | List of installed modules given in helm values/yaml are written in cm and used by devtron to know which modules are given | security.trivy,security.clair | false |
| INSTALLER_CRD_NAMESPACE | string |devtroncd | | | false |
| INSTALLER_CRD_OBJECT_GROUP_NAME | string |installer.devtron.ai | | | false |
| INSTALLER_CRD_OBJECT_RESOURCE | string |installers | | | false |
| INSTALLER_CRD_OBJECT_VERSION | string |v1alpha1 | | | false |
| IS_AIR_GAP_ENVIRONMENT | bool |false | | | false |
| JwtExpirationTime | int |120 | | | false |
| K8s_CLIENT_MAX_IDLE_CONNS_PER_HOST | int |25 | | | false |
| K8s_TCP_IDLE_CONN_TIMEOUT | int |300 | | | false |
Expand Down
38 changes: 27 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ require (
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/hcl2 v0.0.0-20191002203319-fb75b3253c80
github.com/invopop/jsonschema v0.7.0
github.com/juju/errors v0.0.0-20200330140219-3fe23663418f
github.com/juju/errors v1.0.0
github.com/lib/pq v1.10.9
github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b5
github.com/otiai10/copy v1.0.2
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/posthog/posthog-go v0.0.0-20210610161230-cd4408afb35a
github.com/posthog/posthog-go v1.4.1
github.com/prometheus/client_golang v1.18.0
github.com/robfig/cron/v3 v3.0.1
github.com/satori/go.uuid v1.2.0
Expand All @@ -81,7 +81,7 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.33.0
gopkg.in/go-playground/validator.v9 v9.30.0
gopkg.in/go-playground/validator.v9 v9.31.0
gopkg.in/igm/sockjs-go.v3 v3.0.0
gopkg.in/yaml.v2 v2.4.0
helm.sh/helm/v3 v3.14.3
Expand Down Expand Up @@ -151,8 +151,8 @@ require (
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.6 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-redis/cache/v9 v9.0.0 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/go-xorm/xorm v0.7.9 // indirect
Expand Down Expand Up @@ -187,11 +187,10 @@ require (
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/juju/testing v0.0.0-20210324180055-18c50b0c2098 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
Expand Down Expand Up @@ -238,7 +237,6 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
Expand All @@ -258,7 +256,6 @@ require (
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand All @@ -284,15 +281,34 @@ require (
require github.com/docker/distribution v2.8.2+incompatible

require (
github.com/aws/aws-sdk-go-v2 v1.36.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.6 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.59 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.61 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.32 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.6.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.13 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.76.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.15 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.14 // indirect
github.com/aws/smithy-go v1.22.2 // indirect
github.com/dlclark/regexp2 v1.11.2 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
)

replace (
github.com/argoproj/argo-workflows/v3 v3.5.13 => github.com/devtron-labs/argo-workflows/v3 v3.5.13
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250328045544-f569098ac485
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250328045544-f569098ac485
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250402105331-120c20ff29d9
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250402105331-120c20ff29d9
github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5
k8s.io/api => k8s.io/api v0.29.7
Expand Down
Loading