-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-config.yaml
More file actions
367 lines (318 loc) · 12 KB
/
app-config.yaml
File metadata and controls
367 lines (318 loc) · 12 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
355
356
357
358
359
360
361
362
363
364
365
366
367
# Backstage override configuration for your local development environment
app:
title: SourceFuse Backstage
baseUrl: ${FRONTEND_BASE_URL}
organization:
name: SourceFuse
backend:
# Used for enabling authentication, secret is shared by all backend plugins
# See backend-to-backend-auth.md in the docs for information on the format
# auth:
# keys:
# - secret: ${BACKEND_SECRET}
baseUrl: ${BASE_URL}
listen:
port: 7007
csp:
connect-src: ["'self'", 'http:', 'https:']
img-src: ['*', 'data:']
# Allow Grafana dashboards to be embedded in iframes
frame-src: ["'self'", 'http:', 'https:']
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
cors:
origin: /^http:\/\/(localhost|127\.0\.0\.1|sf-portal\.sourcef\.us)(:\d+)?$/
methods: [GET, POST, PUT, DELETE]
credentials: true
database:
# config options: https://node-postgres.com/api/client
client: pg
connection:
host: ${POSTGRES_HOST}
port: ${POSTGRES_PORT}
user: ${POSTGRES_USER}
password:
${POSTGRES_PASSWORD}
# https://node-postgres.com/features/ssl
#ssl: require # see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require)
#ca: # if you have a CA file and want to verify it you can uncomment this section
#$file: <file-path>/ca/server.crt
cache:
store: memory
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
integrations:
github:
- host: github.com
apiBaseUrl: https://api.github.com
token: ${GITHUB_TOKEN}
orgs: [sourcefuse]
# Rate limit protection - wait when approaching limit
rateLimit:
window: 1h
max: 4500 # Leave buffer below 5000/hour limit
apps:
- appId: ${INTEGRATION_GITHUB_APP_ID}
webhookUrl: ${INTEGRATION_GITHUB_WEBHOOK_URL}
clientId: ${INTEGRATION_GITHUB_CLIENT_ID}
clientSecret: ${INTEGRATION_GITHUB_CLIENT_SECRET}
webhookSecret: ${INTEGRATION_GITHUB_WEBHOOK_SECRET}
privateKey:
$file: ./github_private_key.pem
# signIn:
# resolvers:
# - resolver: usernameMatchingUserEntityName
# Reference documentation http://backstage.io/docs/features/techdocs/configuration
# Note: After experimenting with basic setup, use CI/CD to generate docs
# and an external cloud storage when deploying TechDocs for production use-case.
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach
techdocs:
builder: 'local' # Alternatives - 'external'
generator:
runIn: 'local' # Alternatives - 'local'
publisher:
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.
# Cache docs to reduce GitHub API errors for inaccessible repositories
cache:
ttl: 3600000 # Cache for 1 hour (in milliseconds)
readTimeout: 5000 # Timeout after 5 seconds
# auth:
# # see https://backstage.io/docs/auth/ to learn about auth providers
# environment: production
# providers:
# github:
# production:
# clientId: ${AUTH_GITHUB_CLIENT_ID}
# clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
# #below lines are extra in new backend system
# # signIn:
# # resolvers:
# # - resolver: usernameMatchingUserEntityName
# # See https://backstage.io/docs/auth/guest/provider
# guest: {}
auth:
environment: development
providers:
github:
development:
clientId: ${AUTH_GITHUB_CLIENT_ID}
clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
organization: 'sourcefuse'
## uncomment if using GitHub Enterprise
# enterpriseInstanceUrl: ${AUTH_GITHUB_ENTERPRISE_INSTANCE_URL}
signIn:
resolvers:
- resolver: usernameMatchingUserEntityName
scaffolder:
# see https://backstage.io/docs/features/software-templates/configuration for software template options
proxy:
endpoints:
'/sonarqube':
target: https://sonarcloud.io/api
allowedMethods: ['GET']
auth: '${SONARCLOUD_TOKEN}:'
credentials: require
'/newrelic/apm/api':
target: https://api.newrelic.com/v2
headers:
X-Api-Key: ${NEW_RELIC_USER_KEY}
allowedHeaders:
- link
'/newrelic/api':
target: https://api.newrelic.com
headers:
X-Api-Key: ${NEW_RELIC_USER_KEY}
'/jira/api':
target: https://sourcefuse.atlassian.net
headers:
Authorization: Basic ${JIRA_TOKEN}
Accept: application/json
Content-Type: application/json
X-Atlassian-Token: no-check
User-Agent: Backstage
# Required by @backstage-community/plugin-grafana config schema.
# We use our own backend proxy for actual Grafana queries, so this domain
# is only used for the annotation-based dashboard/alert cards (not the tab).
grafana:
domain: ${GRAFANA_URL}
unifiedAlerting: false
jira:
baseUrl: https://sourcefuse.atlassian.net
token: ${JIRA_TOKEN}
jenkins:
instances:
- name: default
baseUrl: ${JENKINS_BASEURL1}
username: ${JENKINS_USERNAME1}
projectCountLimit: ${JENKINS_PROJECTCOUNTLIMIT1}
apiKey: ${JENKINS_API_TOKEN1}
catalog:
providers:
githubOrg:
- id: production
githubUrl: 'https://github.com'
orgs: ['sourcefuse']
schedule:
initialDelay: { seconds: 30 }
frequency: { hours: 24 }
timeout: { minutes: 15 }
# github catalog auto-discovery disabled to prevent GitHub API rate limit issues
# providers:
# github:
# providerId:
# organization: 'sourcefuse'
# catalogPath: '/catalog-info.yaml'
# filters:
# branch: 'main'
# repository: '^(?!biz-book-api$).*'
# schedule:
# initialDelay: { seconds: 30 }
# frequency: { hours: 3 }
# timeout: { minutes: 15 }
rules:
- allow: [Component, System, API, Group, User, Resource, Location, Template]
locations:
# AI Check UT Quality template
- type: url
target: https://github.com/sourcefuse/ai-test-quality-analyzer/blob/CheckUnitTestCases/scaffolder/ut-quality-workflow/template.yaml
rules:
- allow: [Template]
# AI Generate UT Cases template
- type: url
target: https://github.com/sourcefuse/ai-test-quality-analyzer/blob/GenerateUnitTestCases/scaffolder/generate-ut-workflow/template.yaml
rules:
- allow: [Template]
# Backstage example templates
- type: url
target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/react-ssr-template/template.yaml
rules:
- allow: [Template]
- type: url
target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/docs-template/template.yaml
rules:
- allow: [Template]
- type: url
target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/create-react-app/template.yaml
rules:
- allow: [Template]
- type: url
target: https://github.com/sourcefuse/sf-software-templates/blob/main/scaffolder-templates/microservice-repo-bootstrap/template.yaml
rules:
- allow: [Template]
- type: url
target: https://github.com/sourcefuse/typescript-lambda-boilerplate/blob/main/templates/api-gw-lambda.yaml
rules:
- allow: [Template]
- type: url
target: https://github.com/sourcefuse/arc-mono-repo-infra-template/blob/main/templates/template.yaml
rules:
- allow: [Template]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-cloudfront/blob/main/catalog-info.yaml
rules:
- allow: [Component]
tags: [Backend]
- type: url
target: https://github.com/sourcefuse/terraform-k8s-app/blob/main/catalog-info.yaml
rules:
- allow: [Component]
tags: [Backend]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-db/blob/main/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-tags/blob/main/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/terraform-sourceloop-apps/blob/main/catalog-info.yml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-cloudfront/blob/main/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-ecs/blob/main/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-network/blob/main/catalog-info.yml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-eks/blob/main/catalog-info.yml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-bootstrap/blob/main/catalog-info.yml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-cloud-custodian/blob/main/catalog-info.yml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/terraform-aws-arc-opensearch/blob/main/catalog-info.yml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-vault/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-s3/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-audit-log/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-notifications/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-helmet/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-soft-delete/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-kafka-client/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-ratelimiter/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-authorization/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/loopback4-authentication/blob/master/catalog-info.yaml
rules:
- allow: [Component]
- type: url
target: https://github.com/sourcefuse/telemed-app-api/blob/main/template.yaml
rules:
- allow: [Template]
# Backstage self-registration via GitHub
- type: url
target: https://github.com/sourcefuse/backstage/blob/main/catalog-info.yaml
rules:
- allow: [Component, System, API, Group, User, Resource, Location]
- type: file
target: ../../examples/entities.yaml
rules:
- allow: [Component, System, API, Group, User, Resource]
- type: url
target: https://github.com/sourcefuse/biz-book-api/blob/dev/catalog-info.yaml
rules:
- allow: [Component, API, System, Resource, Group, User, Location]
# kubernetes:
# see https://backstage.io/docs/features/kubernetes/configuration for kubernetes configuration options
# see https://backstage.io/docs/permissions/getting-started for more on the permission framework