-
Notifications
You must be signed in to change notification settings - Fork 598
Expand file tree
/
Copy pathdevtron.yaml
More file actions
354 lines (354 loc) · 12.4 KB
/
Copy pathdevtron.yaml
File metadata and controls
354 lines (354 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
{{- with .Values.components.devtron }}
{{- $argocdEnabled := index $.Values "argo-cd" }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: "devtron-cm"
labels:
release: devtron
annotations:
"helm.sh/resource-policy": keep
data:
DEVTRON_HELM_RELEASE_NAME: {{ $.Release.Name }}
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"
DASHBOARD_HOST: dashboard-service.devtroncd
PG_DATABASE: orchestrator
DEX_HOST: http://argocd-dex-server.devtroncd
DEX_PORT: "5556"
APP_SYNC_IMAGE: {{ include "common.image" (dict "component" $.Values.components.chartSync "global" $.Values.global ) }}
{{- if and $.Values.devtronEnterprise.enabled $.Values.devtronEnterprise.scoop.enabled }}
SCOOP_CLUSTER_CONFIG: '{"1":{"serviceName":"scoop-service","passKey":"qhihdidhwid","namespace":"devtroncd","port":"80"}}'
{{- 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 }}
CD_HOST: "argocd-server.devtroncd"
CD_PORT: "80"
CD_NAMESPACE: "devtroncd"
EVENT_URL: "http://notifier-service.devtroncd:80/notify"
GIT_SENSOR_PROTOCOL: GRPC
GIT_SENSOR_URL: "git-sensor-service.devtroncd:90"
GIT_SENSOR_TIMEOUT: "300"
LENS_URL: "http://lens-service.devtroncd:80"
LENS_TIMEOUT: "300"
NATS_SERVER_HOST: "nats://devtron-nats.devtroncd:4222"
APP: "orchestrator"
PG_LOG_QUERY: "true"
LOG_LEVEL: "0"
GIT_WORKING_DIRECTORY: "/tmp/gitops/"
ACD_URL: "argocd-server.devtroncd"
ACD_USER: "admin"
ACD_TIMEOUT: "300"
ACD_SKIP_VERIFY: "true"
MODE: "PROD"
CD_LIMIT_CI_CPU: "0.5"
CD_LIMIT_CI_MEM: "3G"
CD_REQ_CI_CPU: "0.5"
CD_REQ_CI_MEM: "1G"
CD_NODE_TAINTS_KEY: "dedicated"
CD_NODE_LABEL_SELECTOR: "kubernetes.io/os=linux"
CD_WORKFLOW_SERVICE_ACCOUNT: "cd-runner"
DEFAULT_BUILD_LOGS_KEY_PREFIX: "devtron"
DEFAULT_CD_ARTIFACT_KEY_LOCATION: "devtron/cd-artifacts"
CD_NODE_TAINTS_VALUE: "ci"
CD_ARTIFACT_LOCATION_FORMAT: "%d/%d.zip"
DEFAULT_CD_NAMESPACE: "devtron-cd"
DEFAULT_CI_IMAGE: {{ include "common.image" (dict "component" $.Values.components.ciRunner "global" $.Values.global ) }}
DEFAULT_CD_TIMEOUT: "3600"
WF_CONTROLLER_INSTANCE_ID: "devtron-runner"
CI_LOGS_KEY_PREFIX: "ci-artifacts"
DEFAULT_NAMESPACE: "devtron-ci"
DEFAULT_TIMEOUT: "3600"
LIMIT_CI_CPU: "0.5"
LIMIT_CI_MEM: "3G"
REQ_CI_CPU: "0.5"
REQ_CI_MEM: "1G"
CI_NODE_TAINTS_KEY: ""
CI_NODE_TAINTS_VALUE: ""
CI_NODE_LABEL_SELECTOR: ""
CACHE_LIMIT: "5000000000"
DEFAULT_ARTIFACT_KEY_LOCATION: "devtron/ci-artifacts"
WORKFLOW_SERVICE_ACCOUNT: "ci-runner"
EXTERNAL_CI_PAYLOAD: "{\"ciProjectDetails\":[{\"gitRepository\":\"https://github.com/vikram1601/getting-started-nodejs.git\",\"checkoutPath\":\"./abc\",\"commitHash\":\"239077135f8cdeeccb7857e2851348f558cb53d3\",\"commitTime\":\"2022-10-30T20:00:00\",\"branch\":\"master\",\"message\":\"Update README.md\",\"author\":\"User Name \"}],\"dockerImage\":\"445808685819.dkr.ecr.us-east-2.amazonaws.com/orch:23907713-2\"}"
CI_ARTIFACT_LOCATION_FORMAT: "%d/%d.zip"
IMAGE_SCANNER_ENDPOINT: "http://image-scanner-service.devtroncd:80"
ECR_REPO_NAME_PREFIX: "devtron/"
ACD_USERNAME: "admin"
DEX_RURL: "http://argocd-dex-server.devtroncd:8080/callback"
DEX_URL: "http://argocd-dex-server.devtroncd:5556/dex"
CExpirationTime: "600"
JwtExpirationTime: "120"
ACD_CM: "argocd-cm"
ACD_NAMESPACE: "devtroncd"
MINIO_ENDPOINT: http://devtron-minio:9000
GITOPS_REPO_PREFIX: "devtron"
ENFORCER_CACHE: "true"
ENFORCER_CACHE_EXPIRATION_IN_SEC: "345600"
ENFORCER_MAX_BATCH_SIZE: "1"
DEVTRON_SECRET_NAME: "devtron-secret"
ENABLE_ASYNC_ARGO_CD_INSTALL_DEVTRON_CHART: "false"
USE_ARTIFACT_LISTING_API_V2: "false"
ASYNC_BUILDX_CACHE_EXPORT: "true"
BUILDX_CACHE_MODE_MIN: "false"
DEVTRON_CHART_ARGO_CD_INSTALL_REQUEST_TIMEOUT: "1"
IN_APP_LOGGING_ENABLED: "true"
PARALLELISM_LIMIT_FOR_TAG_PROCESSING: "2"
SCAN_V2_ENABLED: "false"
TIMEOUT_IN_SECONDS: "60"
SHOW_DOCKER_BUILD_ARGS: "true"
FORCE_SECURITY_SCANNING: "false"
RUN_HELM_INSTALL_IN_ASYNC_MODE_HELM_APPS: "true"
ENABLE_ASYNC_INSTALL_DEVTRON_CHART: "true"
DEVTRON_CHART_INSTALL_REQUEST_TIMEOUT: "6"
USE_IMAGE_TAG_FROM_GIT_PROVIDER_FOR_TAG_BASED_BUILD: "false"
IMAGE_SCAN_MAX_RETRIES: "3"
IMAGE_SCAN_RETRY_DELAY: "5"
CONSUMER_CONFIG_JSON: '{"DEVTRON-CHART-INSTALL-DURABLE":{"natsMsgProcessingBatchSize":1}}'
SKIP_GITOPS_VALIDATION: "false"
SKIP_CREATING_ECR_REPO: "false"
SCOPED_VARIABLE_ENABLED: "true"
SCOPED_VARIABLE_HANDLE_PRIMITIVES: "true"
MAX_CI_WORKFLOW_RETRIES: "0"
MAX_CD_WORKFLOW_RUNNER_RETRIES: "0"
ENABLE_BUILD_CONTEXT: "true"
CI_SUCCESS_AUTO_TRIGGER_BATCH_SIZE: "1"
FEATURE_RESTART_WORKLOAD_BATCH_SIZE: "1"
FEATURE_RESTART_WORKLOAD_WORKER_POOL_SIZE: "5"
USE_GIT_CLI: "false"
PROPAGATE_EXTRA_LABELS: "false"
USE_DEPLOYMENT_CONFIG_DATA: "false"
{{- if $.Values.configs }}
{{- if or ($.Values.minio.enabled) ($.Values.configs.BLOB_STORAGE_PROVIDER) }}
BLOB_STORAGE_ENABLED: "true"
{{- end }}
{{ toYaml $.Values.configs | indent 2 }}
{{- if and ($.Values.minio.enabled) (not $.Values.configs.BLOB_STORAGE_PROVIDER) }}
BLOB_STORAGE_PROVIDER: "S3"
BLOB_STORAGE_S3_ENDPOINT: "http://devtron-minio.devtroncd:9000"
BLOB_STORAGE_S3_ENDPOINT_INSECURE: "true"
DEFAULT_BUILD_LOGS_BUCKET: "devtron-ci-log"
DEFAULT_CACHE_BUCKET: "devtron-ci-cache"
{{- if lt ($.Values.minio.replicaCount | int) 4 }}
BLOB_STORAGE_S3_BUCKET_VERSIONED: "false"
{{- else }}
BLOB_STORAGE_S3_BUCKET_VERSIONED: "true"
{{- end }}
{{- end }}
{{- if or ($.Values.minio.enabled) (eq $.Values.configs.BLOB_STORAGE_PROVIDER "AZURE") }}
DEFAULT_CACHE_BUCKET_REGION: "us-west-2"
DEFAULT_CD_LOGS_BUCKET_REGION: "us-west-2"
{{- end }}
{{- if and (eq $.Values.configs.BLOB_STORAGE_PROVIDER "S3") (not $.Values.configs.BLOB_STORAGE_S3_ENDPOINT) }}
BLOB_STORAGE_S3_ENDPOINT: ""
{{- end }}
{{- if $.Values.configs.BLOB_STORAGE_PROVIDER }}
BLOB_STORAGE_S3_BUCKET_VERSIONED: "true"
{{- end }}
{{- if $.Values.monitoring }}
{{- if $.Values.monitoring.grafana }}
{{- if $.Values.monitoring.grafana.enabled }}
GRAFANA_URL: "http://%s:%s@devtron-grafana.devtroncd/grafana"
GRAFANA_HOST: "devtron-grafana.devtroncd"
GRAFANA_PORT: "80"
GRAFANA_NAMESPACE: "devtroncd"
GRAFANA_ORG_ID: "2"
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: devtron-custom-cm
labels:
release: devtron
annotations:
"helm.sh/resource-policy": keep
data:
{{- if .customOverrides }}
{{ toYaml .customOverrides | indent 2}}
{{- end }}
{{- $modules := list }}
{{- if has "cicd" $.Values.installer.modules }}
{{- $modules = append $modules "cicd" }}
{{- if $.Values.notifier.enabled }}
{{- $modules = append $modules "notifier" }}
{{- end }}
{{- if and $.Values.security.enabled $.Values.security.trivy.enabled }}
{{- $modules = append $modules "security.trivy" }}
{{- end }}
{{- if and $.Values.security.enabled $.Values.security.clair.enabled }}
{{- $modules = append $modules "security.clair" }}
{{- end }}
{{- if $.Values.monitoring.grafana.enabled }}
{{- $modules = append $modules "monitoring.grafana" }}
{{- end }}
{{- if ($argocdEnabled.enabled) }}
{{- $modules = append $modules "argo-cd" }}
{{- end }}
{{- end }}
INSTALLED_MODULES: {{ if $modules }}{{ printf "'%s'" (join "," $modules) }}{{ else }}""{{ end }}
DEFAULT_CI_IMAGE: {{ include "common.image" (dict "component" $.Values.components.ciRunner "global" $.Values.global ) }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: devtron-cluster-components
labels:
release: devtron
data:
rollout.yaml: >-
rollout:
resources:
limits:
cpu: 250m
memory: 200Mi
requests:
cpu: 50m
memory: 100Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: devtron
labels:
app: devtron
release: devtron
annotations:
"helm.sh/resource-policy": keep
spec:
selector:
matchLabels:
app: devtron
release: devtron
replicas: 1
minReadySeconds: 60
template:
metadata:
labels:
app: devtron
release: devtron
spec:
{{- include "common.schedulerConfig" (dict "nodeSelector" $.Values.components.devtron.nodeSelector "tolerations" $.Values.components.devtron.tolerations "imagePullSecrets" $.Values.components.devtron.imagePullSecrets "global" $.Values.global) | indent 6 }}
terminationGracePeriodSeconds: 30
restartPolicy: Always
serviceAccountName: devtron
volumes:
- configMap:
name: devtron-cluster-components
name: devtron-cluster-components-vol
{{- include "common.podSecurityContext" (dict "podSecurityContext" $.Values.components.devtron.podSecurityContext "global" $.Values.global) | indent 6 }}
containers:
- name: devtron
{{- if $.Values.installer.modules }}
{{- if (has "cicd" $.Values.installer.modules) }}
image: {{ include "common.image" (dict "component" $.Values.components.devtron "global" $.Values.global "extraImage" $.Values.components.devtron.cicdImage ) }}
{{- else }}
image: {{ include "common.image" (dict "component" $.Values.components.devtron "global" $.Values.global) }}
{{- end }}
{{- else }}
image: {{ include "common.image" (dict "component" $.Values.components.devtron "global" $.Values.global) }}
{{- end }}
imagePullPolicy: {{ .imagePullPolicy }}
{{- include "common.containerSecurityContext" (dict "containerSecurityContext" $.Values.components.devtron.containerSecurityContext "global" $.Values.global) | indent 10 }}
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- ' curl -X POST -H "Content-Type: application/json" -d ''{"eventType":
"SIG_TERM"}'' localhost:8080/orchestrator/telemetry/summary'
livenessProbe:
failureThreshold: 3
httpGet:
path: /health
port: {{ $.Values.components.devtron.healthPort}}
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /health
port: {{ $.Values.components.devtron.healthPort}}
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
ports:
- name: devtron
containerPort: 8080
protocol: TCP
env:
- name: DEVTRON_APP_NAME
value: devtron
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
envFrom:
- configMapRef:
name: devtron-cm
- secretRef:
name: devtron-secret
- configMapRef:
name: devtron-custom-cm
- secretRef:
name: devtron-custom-secret
- configMapRef:
name: devtron-common-cm
volumeMounts:
- mountPath: /cluster/component
name: devtron-cluster-components-vol
{{- if .resources }}
resources:
{{- toYaml .resources | nindent 12 }}
{{- end }}
revisionHistoryLimit: 3
---
{{- if .serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: devtron-sm
labels:
kind: Prometheus
app: devtron
release: devtron
annotations:
"helm.sh/resource-policy": keep
spec:
endpoints:
- port: devtron
path: /metrics
scheme: http
interval: 30s
scrapeTimeout: 3s
selector:
matchLabels:
app: devtron
{{- end }}
{{- end }}