@sap/cds-dk 6.3.2 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -7
- package/bin/cds.js +2 -0
- package/bin/compile/index.js +2 -1
- package/bin/deploy/index.js +2 -2
- package/bin/deploy/to-sqlite.js +17 -15
- package/bin/help.js +7 -4
- package/bin/init.js +1 -1
- package/bin/login.js +3 -4
- package/bin/migrate.js +33 -0
- package/bin/pull.js +4 -4
- package/bin/push.js +1 -1
- package/bin/subscribe.js +58 -66
- package/bin/unsubscribe.js +67 -0
- package/bin/watch.js +4 -3
- package/lib/bind/bindingUtil.js +2 -0
- package/lib/bind/cfKeyProvider.js +5 -1
- package/lib/client/activate.js +3 -3
- package/lib/client/auth_manager.js +2 -2
- package/lib/client/base_command.js +7 -6
- package/lib/client/extend.js +2 -2
- package/lib/client/helper/errors.js +8 -2
- package/lib/client/helper/logging.js +13 -11
- package/lib/client/params.js +3 -0
- package/lib/client/pull.js +1 -1
- package/lib/client/push.js +4 -4
- package/lib/client/settings_manager.js +13 -6
- package/lib/client/subscription.js +81 -0
- package/lib/compile/to-xsuaa.js +25 -19
- package/lib/import/odata/metadataconverter/MetadataConverter.js +3 -3
- package/lib/import/odata/v2parser.js +37 -24
- package/lib/import/odata/v4parser.js +106 -37
- package/lib/init/constants.js +1 -1
- package/lib/init/index.js +2 -2
- package/lib/init/template/_merging/registry-mta.js +0 -3
- package/lib/init/template/approuter/files/approuter-configmap.yaml +10 -0
- package/lib/init/template/approuter/files/approuter-mtxs-configmap.yaml +15 -0
- package/lib/init/template/approuter/files/chart.yaml +4 -0
- package/lib/init/template/approuter/files/package.json +1 -1
- package/lib/init/template/approuter/files/values.yaml.hbs +31 -0
- package/lib/init/template/approuter/index.js +60 -12
- package/lib/init/template/auditlog/index.js +16 -8
- package/lib/init/template/cf-manifest/index.js +3 -3
- package/lib/init/template/connectivity/index.js +19 -10
- package/lib/init/template/destinations/index.js +23 -7
- package/lib/init/template/enterprise-messaging/files/cds.package.json +1 -2
- package/lib/init/template/enterprise-messaging/files/cds.profile.package.json.hbs +1 -2
- package/lib/init/template/enterprise-messaging/files/cdsrc.json +1 -2
- package/lib/init/template/enterprise-messaging/files/cdsrc.json.hbs +1 -2
- package/lib/init/template/enterprise-messaging/files/event-mesh.json.hbs +31 -0
- package/lib/init/template/enterprise-messaging/files/mta.yaml.hbs +1 -0
- package/lib/init/template/enterprise-messaging/index.js +26 -13
- package/lib/init/template/extensibility/index.js +19 -10
- package/lib/init/template/hana/files/mta.yaml.hbs +0 -4
- package/lib/init/template/hana/index.js +58 -22
- package/lib/init/template/helm/chart/templates/NOTES.txt +4 -3
- package/lib/init/template/helm/chart/templates/_deployment_helpers.tpl +25 -2
- package/lib/init/template/helm/chart/values.root.schema.json +5 -0
- package/lib/init/template/helm/chart/values.schema.json +27 -0
- package/lib/init/template/helm/files/values.yaml.hbs +1 -1
- package/lib/init/template/helm/index.js +25 -23
- package/lib/init/template/helm/subchart/templates/_helpers.tpl +29 -0
- package/lib/init/template/helm/subchart/templates/api-rule.yaml +5 -5
- package/lib/init/template/helm/subchart/templates/deployment.yaml +12 -9
- package/lib/init/template/helm/subchart/values.md +258 -88
- package/lib/init/template/helm/subchart/values.schema.json +96 -13
- package/lib/init/template/helm/subchart/values.yaml +6 -2
- package/lib/init/template/html5-repo/index.js +28 -11
- package/lib/init/template/java/index.js +5 -5
- package/lib/init/template/kibana-logging/index.js +5 -4
- package/lib/init/template/mta/index.js +2 -2
- package/lib/init/template/mtx/index.js +1 -1
- package/lib/init/template/multitenancy/files/chart.yaml +4 -0
- package/lib/init/template/multitenancy/files/java/mtxs-configmap.yaml +20 -0
- package/lib/init/template/multitenancy/files/java/package.json +6 -9
- package/lib/init/template/multitenancy/files/mtxs-configmap.yaml +15 -0
- package/lib/init/template/multitenancy/files/saas-registry.yaml +17 -19
- package/lib/init/template/multitenancy/files/values.yaml.hbs +47 -0
- package/lib/init/template/multitenancy/files/xs-security.json.hbs +0 -7
- package/lib/init/template/multitenancy/index.js +83 -37
- package/lib/init/template/nodejs/files/.eslintrc +26 -0
- package/lib/init/template/nodejs/files/package.json.hbs +0 -28
- package/lib/init/template/nodejs/index.js +7 -10
- package/lib/init/template/pipeline/index.js +4 -4
- package/lib/init/template/samples/index.js +5 -5
- package/lib/init/template/templateBase.js +1 -4
- package/lib/init/template/toggles/index.js +5 -5
- package/lib/init/template/xsuaa/files/values.yaml.hbs +21 -0
- package/lib/init/template/xsuaa/index.js +34 -24
- package/lib/init/util/md5Tracking.js +113 -0
- package/lib/init/util/merge.js +19 -2
- package/lib/init/util/projectReader.js +15 -12
- package/npm-shrinkwrap.json +630 -1057
- package/package.json +3 -3
|
@@ -310,6 +310,7 @@
|
|
|
310
310
|
"health_check": {
|
|
311
311
|
"$id": "#/properties/health_check",
|
|
312
312
|
"title": "Health-check configuration",
|
|
313
|
+
"description": "[Deprecated] Use health instead",
|
|
313
314
|
"type": "object",
|
|
314
315
|
"additionalProperties": false,
|
|
315
316
|
"properties": {
|
|
@@ -321,8 +322,7 @@
|
|
|
321
322
|
"properties": {
|
|
322
323
|
"path": {
|
|
323
324
|
"description": "HTTP path used by Kubernetes, to perform health-check calls.",
|
|
324
|
-
"type": "string"
|
|
325
|
-
"default": "/healthz"
|
|
325
|
+
"type": "string"
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
},
|
|
@@ -334,6 +334,39 @@
|
|
|
334
334
|
"properties": {
|
|
335
335
|
"path": {
|
|
336
336
|
"description": "HTTP path used by Kubernetes, to perform health-check calls.",
|
|
337
|
+
"type": "string"
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"health": {
|
|
344
|
+
"$id": "#/properties/health",
|
|
345
|
+
"title": "Health-check configuration",
|
|
346
|
+
"type": "object",
|
|
347
|
+
"additionalProperties": false,
|
|
348
|
+
"properties": {
|
|
349
|
+
"liveness": {
|
|
350
|
+
"$id": "#/properties/health/properties/liveness",
|
|
351
|
+
"description": "Liveness-probe configuration.",
|
|
352
|
+
"type": "object",
|
|
353
|
+
"additionalProperties": false,
|
|
354
|
+
"properties": {
|
|
355
|
+
"path": {
|
|
356
|
+
"description": "HTTP path used by Kubernetes, to perform liveness-probe calls.",
|
|
357
|
+
"type": "string",
|
|
358
|
+
"default": "/healthz"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"readiness": {
|
|
363
|
+
"$id": "#/properties/health/properties/readiness",
|
|
364
|
+
"description": "Readiness-probe configuration.",
|
|
365
|
+
"type": "object",
|
|
366
|
+
"additionalProperties": false,
|
|
367
|
+
"properties": {
|
|
368
|
+
"path": {
|
|
369
|
+
"description": "HTTP path used by Kubernetes, to perform readiness-probe calls.",
|
|
337
370
|
"type": "string",
|
|
338
371
|
"default": "/healthz"
|
|
339
372
|
}
|
|
@@ -360,10 +393,7 @@
|
|
|
360
393
|
"anyOf": [
|
|
361
394
|
{
|
|
362
395
|
"description": "Plain value of an environment variable.",
|
|
363
|
-
"type": [
|
|
364
|
-
"integer",
|
|
365
|
-
"string"
|
|
366
|
-
]
|
|
396
|
+
"type": ["integer", "string"]
|
|
367
397
|
},
|
|
368
398
|
{
|
|
369
399
|
"description": "`valueFrom` configuration for the environment variable https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/",
|
|
@@ -451,10 +481,7 @@
|
|
|
451
481
|
"pattern": "^[-._a-zA-Z][-._a-zA-Z0-9]*$"
|
|
452
482
|
},
|
|
453
483
|
"value": {
|
|
454
|
-
"type": [
|
|
455
|
-
"string",
|
|
456
|
-
"integer"
|
|
457
|
-
]
|
|
484
|
+
"type": ["string", "integer"]
|
|
458
485
|
},
|
|
459
486
|
"configMapKeyRef": {
|
|
460
487
|
"description": "Selects a key of a ConfigMap.",
|
|
@@ -520,13 +547,69 @@
|
|
|
520
547
|
},
|
|
521
548
|
"envSecretNames": {
|
|
522
549
|
"$id": "#/properties/envSecretNames",
|
|
523
|
-
"description": "
|
|
550
|
+
"description": "[Deprecated] Use `envFrom` instead",
|
|
524
551
|
"type": "array",
|
|
525
552
|
"uniqueItems": true,
|
|
526
553
|
"items": {
|
|
527
554
|
"$ref": "#/definitions/KubernetesName"
|
|
528
|
-
}
|
|
529
|
-
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"envFrom": {
|
|
558
|
+
"$id": "#/properties/envFrom",
|
|
559
|
+
"description": "List of sources to populate environment variables in the pod.",
|
|
560
|
+
"type": "array",
|
|
561
|
+
"default": [],
|
|
562
|
+
"items": {
|
|
563
|
+
"type": "object",
|
|
564
|
+
"oneOf": [
|
|
565
|
+
{
|
|
566
|
+
"additionalProperties": false,
|
|
567
|
+
"properties": {
|
|
568
|
+
"configMapRef": {
|
|
569
|
+
"description": "The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.",
|
|
570
|
+
"properties": {
|
|
571
|
+
"name": {
|
|
572
|
+
"description": "Name of a ConfigMap.",
|
|
573
|
+
"type": "string"
|
|
574
|
+
},
|
|
575
|
+
"tpl": {
|
|
576
|
+
"description": "Flag which tells whether the name is a template string or not.",
|
|
577
|
+
"type": "boolean",
|
|
578
|
+
"default": false
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
"required": [ "name" ],
|
|
582
|
+
"additionalProperties": false,
|
|
583
|
+
"type": "object"
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
"required": [ "configMapRef" ]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"additionalProperties": false,
|
|
590
|
+
"properties": {
|
|
591
|
+
"secretRef": {
|
|
592
|
+
"description": "The contents of the target Secret's Data field will represent the key-value pairs as environment variables.",
|
|
593
|
+
"properties": {
|
|
594
|
+
"name": {
|
|
595
|
+
"description": "Name of a Secret.",
|
|
596
|
+
"type": "string"
|
|
597
|
+
},
|
|
598
|
+
"tpl": {
|
|
599
|
+
"description": "Flag which tells whether the name is a template string or not.",
|
|
600
|
+
"type": "boolean",
|
|
601
|
+
"default": false
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
"required": [ "name" ],
|
|
605
|
+
"additionalProperties": false,
|
|
606
|
+
"type": "object"
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
"required": [ "secretRef" ]
|
|
610
|
+
}
|
|
611
|
+
]
|
|
612
|
+
}
|
|
530
613
|
},
|
|
531
614
|
"expose": {
|
|
532
615
|
"$id": "#/properties/expose",
|
|
@@ -43,7 +43,7 @@ ha:
|
|
|
43
43
|
# ephemeral-storage: 1G
|
|
44
44
|
# memory: 1G
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
health:
|
|
47
47
|
liveness:
|
|
48
48
|
path: /healthz
|
|
49
49
|
readiness:
|
|
@@ -51,7 +51,11 @@ health_check:
|
|
|
51
51
|
|
|
52
52
|
startupTimeout: 30
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
envFrom: []
|
|
55
|
+
# - configMapRef:
|
|
56
|
+
# name: my-configmap1
|
|
57
|
+
# - secretRef:
|
|
58
|
+
# name: my-secret-ref1
|
|
55
59
|
|
|
56
60
|
env: {}
|
|
57
61
|
# env:
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const
|
|
2
|
-
const { exists
|
|
1
|
+
const { join } = require('path')
|
|
2
|
+
const { exists } = require('../../../cds').utils
|
|
3
3
|
const ProjectReader = require('../../util/projectReader')
|
|
4
4
|
const { mergeYAML } = require('../../util/merge')
|
|
5
|
+
const { copyAndTrack, parseMd5File, writeMd5File } = require('../../util/md5Tracking')
|
|
5
6
|
const { OPTION_DESTINATIONS } = require('../../constants')
|
|
6
7
|
|
|
7
8
|
module.exports = class Html5RepoTemplate extends require('../templateBase') {
|
|
@@ -10,26 +11,42 @@ module.exports = class Html5RepoTemplate extends require('../templateBase') {
|
|
|
10
11
|
this.projectReader = new ProjectReader(projectPath)
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
getDependencies() {
|
|
14
15
|
return [OPTION_DESTINATIONS]
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
async canRun() {
|
|
19
|
+
const projectDescriptor = await this.projectReader.read(this.options)
|
|
20
|
+
const { hasMta, hasHelm } = projectDescriptor.cap
|
|
21
|
+
if (!hasHelm && hasMta) {
|
|
22
|
+
throw `'cds add html5-repo' is not available for Cloud Foundry yet`
|
|
23
|
+
}
|
|
24
|
+
return true
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
static hasFacet(_, projectPath) {
|
|
18
28
|
// REVISIT: Should be detectable without helm charts
|
|
19
|
-
return exists(
|
|
29
|
+
return exists(join(projectPath, 'chart', 'templates', 'html5-apps-repo-host.yaml'))
|
|
20
30
|
}
|
|
21
31
|
|
|
22
32
|
async run() {
|
|
23
33
|
await this.runDependentMerging()
|
|
24
34
|
}
|
|
25
35
|
|
|
26
|
-
async runDependentMerging() {
|
|
36
|
+
async runDependentMerging(context = {}) {
|
|
27
37
|
const projectDescriptor = await this.projectReader.read(this.options)
|
|
28
38
|
const { appName, hasHelm } = projectDescriptor.cap
|
|
29
39
|
|
|
30
40
|
if (hasHelm) {
|
|
41
|
+
//in case facet is being added to the already exisiting charts folder
|
|
42
|
+
let isIndependentCommand = false
|
|
43
|
+
if(Object.keys(context).length == 0){
|
|
44
|
+
isIndependentCommand = true
|
|
45
|
+
context.projectPath = this.projectPath
|
|
46
|
+
context.oldTrackingData = context.newTrackingData = await parseMd5File(join(this.projectPath, 'chart', '.cds-add-helm-files.md5'))
|
|
47
|
+
}
|
|
31
48
|
await mergeYAML(
|
|
32
|
-
|
|
49
|
+
join(this.projectPath, 'chart', 'values.yaml'),
|
|
33
50
|
{
|
|
34
51
|
html5_apps_repo_host: {
|
|
35
52
|
serviceOfferingName: 'html5-apps-repo',
|
|
@@ -52,12 +69,12 @@ module.exports = class Html5RepoTemplate extends require('../templateBase') {
|
|
|
52
69
|
requests: { cpu: '1000m', memory: '1G' }
|
|
53
70
|
}
|
|
54
71
|
}
|
|
55
|
-
}
|
|
56
|
-
null, { forceOverwrite: true }
|
|
72
|
+
}
|
|
57
73
|
)
|
|
58
|
-
await
|
|
59
|
-
await
|
|
60
|
-
await
|
|
74
|
+
await copyAndTrack(join(__dirname, 'files', '_html5_deployment_helpers.tpl'), join(this.projectPath, 'chart', 'templates', '_html5_deployment_helpers.tpl'), context)
|
|
75
|
+
await copyAndTrack(join(__dirname, 'files', 'html5-apps-deployer-job.yaml'), join(this.projectPath, 'chart', 'templates', 'html5-apps-deployer-job.yaml'), context)
|
|
76
|
+
await copyAndTrack(join(__dirname, 'files', 'html5-apps-repo-host.yaml'), join(this.projectPath, 'chart', 'templates', 'html5-apps-repo-host.yaml'), context)
|
|
77
|
+
if(isIndependentCommand) await writeMd5File(join(this.projectPath, 'chart', '.cds-add-helm-files.md5'), context.newTrackingData)
|
|
61
78
|
}
|
|
62
79
|
}
|
|
63
80
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const fs = require('fs').promises;
|
|
2
2
|
const os = require('os');
|
|
3
|
-
const
|
|
3
|
+
const { join, relative } = require('path');
|
|
4
4
|
|
|
5
5
|
const commandUtil = require('../../util/commandUtil');
|
|
6
6
|
const mvnArchetypeUtil = require('../../util/mvnArchetypeUtil');
|
|
@@ -17,7 +17,7 @@ module.exports = class JavaTemplate extends require('../templateBase') {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
static hasFacet(_, projectPath) {
|
|
20
|
-
return exists(
|
|
20
|
+
return exists(join(projectPath, 'pom.xml'))
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
async canRun() {
|
|
@@ -38,13 +38,13 @@ module.exports = class JavaTemplate extends require('../templateBase') {
|
|
|
38
38
|
|
|
39
39
|
LOG.info(`Using Maven archetype version ${archetypeVersion}`);
|
|
40
40
|
|
|
41
|
-
const tempFolder = await fs.mkdtemp(
|
|
41
|
+
const tempFolder = await fs.mkdtemp(join(os.tmpdir(), `${this.projectName}_`));
|
|
42
42
|
try {
|
|
43
43
|
await commandUtil.spawnCommand('mvn', cmdLine, {
|
|
44
44
|
cwd: tempFolder
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
await copy(
|
|
47
|
+
await copy(join(tempFolder, artifactId), this.projectPath);
|
|
48
48
|
} catch (err) {
|
|
49
49
|
if (err.code === 'ENOENT' && err.path === 'mvn') {
|
|
50
50
|
throw new Error(`Maven executable 'mvn' not found, follow ${term.info(URLS.MAVEN_INSTALL_HELP)} and install Maven on your machine.`);
|
|
@@ -56,7 +56,7 @@ module.exports = class JavaTemplate extends require('../templateBase') {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
async finalize() {
|
|
59
|
-
const relativeProjectPath =
|
|
59
|
+
const relativeProjectPath = relative(this.cwd, this.projectPath);
|
|
60
60
|
if (relativeProjectPath && relativeProjectPath !== '.') {
|
|
61
61
|
LOG.info(`Continue with 'cd ${relativeProjectPath}'`);
|
|
62
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const { join } = require('path')
|
|
2
2
|
const cds = require('../../../cds')
|
|
3
3
|
const ProjectReader = require('../../util/projectReader')
|
|
4
4
|
const { mergeJSON, mergeYAML } = require('../../util/merge')
|
|
@@ -17,6 +17,7 @@ module.exports = class KibanaTemplate extends require('../templateBase') {
|
|
|
17
17
|
if (hasHelm && !hasMta) {
|
|
18
18
|
throw `'cds add kibana-logging' is not available for Kyma yet`
|
|
19
19
|
}
|
|
20
|
+
return true
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
async run() {
|
|
@@ -32,8 +33,8 @@ module.exports = class KibanaTemplate extends require('../templateBase') {
|
|
|
32
33
|
const projectDescriptor = await this.projectReader.read(this.options);
|
|
33
34
|
const { for: forProfile } = projectDescriptor.cap
|
|
34
35
|
const cdsTemplateFile = forProfile ? 'cds.profile.package.json.hbs' : 'cds.package.json'
|
|
35
|
-
const cdsTemplatePath =
|
|
36
|
-
await mergeJSON(
|
|
36
|
+
const cdsTemplatePath = join(__dirname, 'files', cdsTemplateFile)
|
|
37
|
+
await mergeJSON(join(this.projectPath, 'package.json'), cdsTemplatePath, projectDescriptor)
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
await this.runDependentMerging()
|
|
@@ -46,7 +47,7 @@ module.exports = class KibanaTemplate extends require('../templateBase') {
|
|
|
46
47
|
if (hasMta) {
|
|
47
48
|
const srv = isNodejs ? srvNode : srvJava
|
|
48
49
|
|
|
49
|
-
const mtaYAMLPath =
|
|
50
|
+
const mtaYAMLPath = join(this.projectPath, 'mta.yaml')
|
|
50
51
|
await mergeYAML(
|
|
51
52
|
mtaYAMLPath,
|
|
52
53
|
`${__dirname}/files/mta.yaml.hbs`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { join } = require('path');
|
|
2
|
-
const { exists
|
|
2
|
+
const { exists } = require('../../../cds').utils
|
|
3
3
|
const { copyFiles } = require('../../util/templateUtil')
|
|
4
4
|
const ProjectReader = require('../../util/projectReader');
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ module.exports = class MtaTemplate extends require('../templateBase') {
|
|
|
17
17
|
async run() {
|
|
18
18
|
const projectDescriptor = await this.projectReader.read()
|
|
19
19
|
if (!exists(join(this.projectPath, 'mta.yaml'))) {
|
|
20
|
-
await copyFiles(
|
|
20
|
+
await copyFiles(join(__dirname, 'files'), this.projectPath, projectDescriptor);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// Re-applying the dependent merging part of other facets if necessary.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Please do not modify this file. This file may be overwritten.
|
|
2
|
+
|
|
3
|
+
{{- $approuterDeployment := .Values.approuter }}
|
|
4
|
+
{{- $ := merge (dict "name" "approuter" "deployment" .Values.approuter ) . }}
|
|
5
|
+
{{- $approuterUrl := (include "cap.deploymentHostFull" $ )}}
|
|
6
|
+
|
|
7
|
+
{{- $sidecarDeployment := .Values.sidecar }}
|
|
8
|
+
{{- $ = merge (dict "name" "sidecar" "deployment" .Values.sidecar ) . }}
|
|
9
|
+
{{- $sidecarUrl := (include "cap.deploymentHostFull" $ )}}
|
|
10
|
+
|
|
11
|
+
apiVersion: v1
|
|
12
|
+
kind: ConfigMap
|
|
13
|
+
metadata:
|
|
14
|
+
name: "{{ .Release.Name }}-mtxs-configmap"
|
|
15
|
+
namespace: "{{ .Release.Namespace }}"
|
|
16
|
+
data:
|
|
17
|
+
CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-"
|
|
18
|
+
CDS_MULTITENANCY_MTXS_ENABLED: "true"
|
|
19
|
+
CDS_MULTITENANCY_APPUI_URL: {{ printf "https://%s" $approuterUrl }}
|
|
20
|
+
CDS_MULTITENANCY_SIDECAR_URL: {{ printf "https://%s" $sidecarUrl }}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cap-mtx-sidecar",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@sap/cds": "^6.
|
|
5
|
-
"@sap/cds-mtxs": "^1.
|
|
6
|
-
"@sap/hdi-deploy": "^4.
|
|
7
|
-
"@sap/xssec": "^3.2.
|
|
8
|
-
"express": "^4.18.
|
|
9
|
-
"hdb": "^0.19.
|
|
4
|
+
"@sap/cds": "^6.3.1",
|
|
5
|
+
"@sap/cds-mtxs": "^1.3.1",
|
|
6
|
+
"@sap/hdi-deploy": "^4.5.1",
|
|
7
|
+
"@sap/xssec": "^3.2.14",
|
|
8
|
+
"express": "^4.18.2",
|
|
9
|
+
"hdb": "^0.19.5",
|
|
10
10
|
"passport": "^0.6.0"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"start": "cds run",
|
|
14
14
|
"build": "npm ci && npx -p @sap/cds-dk@^6 cds build ../.. --for mtx-sidecar --production && cd gen && npm ci"
|
|
15
15
|
},
|
|
16
|
-
"engines": {
|
|
17
|
-
"node": "^16.15.0"
|
|
18
|
-
},
|
|
19
16
|
"cds": {
|
|
20
17
|
"requires": {
|
|
21
18
|
"db": "sql-mt",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Please do not modify this file. This file may be overwritten.
|
|
2
|
+
|
|
3
|
+
{{- $approuterDeployment := .Values.approuter }}
|
|
4
|
+
{{- $ := merge (dict "name" "approuter" "deployment" .Values.approuter ) . }}
|
|
5
|
+
{{- $approuterUrl := (include "cap.deploymentHostFull" $ )}}
|
|
6
|
+
|
|
7
|
+
apiVersion: v1
|
|
8
|
+
kind: ConfigMap
|
|
9
|
+
metadata:
|
|
10
|
+
name: "{{ .Release.Name }}-mtxs-configmap"
|
|
11
|
+
namespace: "{{ .Release.Namespace }}"
|
|
12
|
+
data:
|
|
13
|
+
CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-"
|
|
14
|
+
CDS_MULTITENANCY_APPUI_URL: {{ printf "https://%s" $approuterUrl }}
|
|
15
|
+
SUBSCRIPTION_URL: {{ printf "https://${tenant_subdomain}-%s" $approuterUrl }}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
{{-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{{- include "cap.service-instance" (merge (dict "defaultParameters" $defaultParameters . )) }}
|
|
19
|
-
{{ end }}
|
|
1
|
+
{{- $srvHostFull := include "cap.deploymentHostFull" (merge (dict "name" "srv" "deployment" .Values.srv) . ) }}
|
|
2
|
+
{{- $defaultAppUrls := dict
|
|
3
|
+
"getDependencies" (printf "https://%s%s" $srvHostFull .Values.saas_registry.getDependencies)
|
|
4
|
+
"onSubscription" (printf "https://%s%s" $srvHostFull .Values.saas_registry.onSubscription)
|
|
5
|
+
"onSubscriptionAsync" false
|
|
6
|
+
"onUnSubscriptionAsync" false
|
|
7
|
+
"callbackTimeoutMillis" 300000
|
|
8
|
+
}}
|
|
9
|
+
{{- $defaultParameters := dict
|
|
10
|
+
"xsappname" .Values.xsuaa.parameters.xsappname
|
|
11
|
+
"appName" .Values.xsuaa.parameters.xsappname
|
|
12
|
+
"displayName" .Chart.Name
|
|
13
|
+
"description" .Chart.Description
|
|
14
|
+
"category" "CAP Application"
|
|
15
|
+
"appUrls" $defaultAppUrls
|
|
16
|
+
}}
|
|
17
|
+
{{- include "cap.service-instance" (merge (dict "defaultParameters" $defaultParameters ) .) }}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
srv:
|
|
3
|
+
bindings:
|
|
4
|
+
saas-registry:
|
|
5
|
+
serviceInstanceName: saas-registry
|
|
6
|
+
service-manager:
|
|
7
|
+
fromSecret: null
|
|
8
|
+
{{#cap.hasXsuaa}}
|
|
9
|
+
xsuaa:
|
|
10
|
+
parameters:
|
|
11
|
+
tenant-mode: shared
|
|
12
|
+
{{/cap.hasXsuaa}}
|
|
13
|
+
saas_registry:
|
|
14
|
+
serviceOfferingName: saas-registry
|
|
15
|
+
servicePlanName: application
|
|
16
|
+
{{#cap.isNodejs}}
|
|
17
|
+
getDependencies: "/-/cds/saas-provisioning/dependencies"
|
|
18
|
+
onSubscription: "/-/cds/saas-provisioning/tenant/{tenantId}"
|
|
19
|
+
{{/cap.isNodejs}}
|
|
20
|
+
{{#cap.isJava}}
|
|
21
|
+
getDependencies: "/mt/v1.0/subscriptions/dependencies"
|
|
22
|
+
onSubscription: "/mt/v1.0/subscriptions/tenants/{tenantId}"
|
|
23
|
+
sidecar:
|
|
24
|
+
bindings:
|
|
25
|
+
{{#cap.hasXsuaa}}
|
|
26
|
+
auth:
|
|
27
|
+
serviceInstanceName: xsuaa
|
|
28
|
+
{{/cap.hasXsuaa}}
|
|
29
|
+
service-manager:
|
|
30
|
+
fromSecret: null
|
|
31
|
+
image:
|
|
32
|
+
repository: <your-container-registry>/{{cap.appName}}-sidecar
|
|
33
|
+
tag: latest
|
|
34
|
+
resources:
|
|
35
|
+
limits:
|
|
36
|
+
ephemeral-storage: 1G
|
|
37
|
+
memory: 500M
|
|
38
|
+
requests:
|
|
39
|
+
ephemeral-storage: 1G
|
|
40
|
+
cpu: 500m
|
|
41
|
+
memory: 500M
|
|
42
|
+
health_check:
|
|
43
|
+
liveness:
|
|
44
|
+
path: /
|
|
45
|
+
readiness:
|
|
46
|
+
path: /
|
|
47
|
+
{{/cap.isJava}}
|
|
@@ -6,13 +6,6 @@
|
|
|
6
6
|
"grant-as-authority-to-apps": [
|
|
7
7
|
"$XSAPPNAME(application,sap-provisioning,tenant-onboarding)"
|
|
8
8
|
]
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"name": "$XSAPPNAME.cds.Subscriber",
|
|
12
|
-
"description": "Subscribe to applications"
|
|
13
9
|
}
|
|
14
|
-
],
|
|
15
|
-
"authorities": [
|
|
16
|
-
"$XSAPPNAME.cds.Subscriber"
|
|
17
10
|
]
|
|
18
11
|
}
|