@sap/cds-dk 6.0.4 → 6.1.3
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 +60 -1
- package/bin/add.js +29 -16
- package/bin/compile/index.js +7 -2
- package/bin/fix-redirects.js +4 -2
- package/bin/init.js +5 -0
- package/bin/login.js +20 -4
- package/bin/pull.js +58 -0
- package/bin/push.js +52 -0
- package/bin/subscribe.js +45 -0
- package/lib/bind/bindingUtil.js +1 -2
- package/lib/cds.js +2 -3
- package/lib/client/activate.js +17 -16
- package/lib/client/auth_manager.js +10 -5
- package/lib/client/base_command.js +4 -6
- package/lib/client/extend.js +3 -2
- package/lib/client/helper/cf_helper.js +1 -0
- package/lib/client/helper/errors.js +11 -0
- package/lib/client/helper/logging.js +3 -10
- package/lib/client/helper/url_helper.js +7 -3
- package/lib/client/index.js +1 -1
- package/lib/client/params.js +9 -6
- package/lib/client/pull.js +48 -0
- package/lib/client/push.js +45 -0
- package/lib/client/settings_manager.js +81 -27
- package/lib/compile/openapi/csdl2openapi.js +135 -163
- package/lib/compile/openapi/index.js +0 -1
- package/lib/import/common.js +9 -1
- package/lib/import/odata/metadataconverter/MetadataConverter.js +17 -4
- package/lib/import/odata/v2parser.js +50 -26
- package/lib/import/odata/v4parser.js +110 -29
- package/lib/import/openapi/importOpenAPI.js +3 -3
- package/lib/init/constants.js +9 -3
- package/lib/init/template/_merging/registry-mta.js +284 -0
- package/lib/init/template/approuter/files/xs-app.json.hbs +7 -7
- package/lib/init/template/approuter/index.js +22 -32
- package/lib/init/template/auditlog/index.js +7 -9
- package/lib/init/template/data/index.js +2 -4
- package/lib/init/template/extensibility/files/cds.package.json +7 -0
- package/lib/init/template/extensibility/files/cds.package.json.hbs +9 -0
- package/lib/init/template/extensibility/files/xs-security.json.hbs +26 -0
- package/lib/init/template/extensibility/index.js +48 -0
- package/lib/init/template/hana/files/java/cdsrc.json.hbs +1 -1
- package/lib/init/template/hana/files/java/profile.cdsrc.json.hbs +2 -2
- package/lib/init/template/hana/files/mta.yaml.hbs +10 -0
- package/lib/init/template/hana/files/nodejs/cds.package.json.hbs +1 -1
- package/lib/init/template/hana/files/nodejs/cds.profile.package.json.hbs +2 -2
- package/lib/init/template/hana/index.js +74 -61
- package/lib/init/template/kibana-logging/index.js +31 -37
- package/lib/init/template/lint/files/.eslint/rules/no-entity-moo.js +14 -14
- package/lib/init/template/mta/files/mta.yaml.hbs +1 -1
- package/lib/init/template/mta/index.js +13 -7
- package/lib/init/template/mtx/index.js +2 -142
- package/lib/init/template/multitenancy/files/cds.package.json +7 -0
- package/lib/init/template/multitenancy/files/cds.package.json.hbs +9 -0
- package/lib/init/template/{mtx → multitenancy}/files/dependencies.package.json +1 -1
- package/lib/init/template/multitenancy/files/java/.cdsrc.json +19 -0
- package/lib/init/template/multitenancy/files/java/package.json +31 -0
- package/lib/init/template/{mtx → multitenancy}/files/mta.yaml.hbs +13 -6
- package/lib/init/template/multitenancy/files/xs-security.json.hbs +18 -0
- package/lib/init/template/multitenancy/index.js +109 -0
- package/lib/init/template/nodejs/files/package.json.hbs +4 -1
- package/lib/init/template/templateBase.js +2 -1
- package/lib/init/template/toggles/files/cds.package.json +7 -0
- package/lib/init/template/toggles/files/cds.package.json.hbs +9 -0
- package/lib/init/template/toggles/index.js +24 -0
- package/lib/init/template/xsuaa/files/mta.yaml.hbs +10 -0
- package/lib/init/template/xsuaa/index.js +44 -33
- package/lib/init/util/projectReader.js +12 -7
- package/lib/init/util/templateUtil.js +113 -111
- package/lib/k8s/ChartAdder.js +13 -3
- package/lib/k8s/ChartBuilder.js +6 -0
- package/lib/k8s/buildModel.js +1 -3
- package/lib/k8s/connectivity/index.js +5 -5
- package/lib/k8s/deployment/index.js +2 -4
- package/lib/k8s/deployment/subchart/Chart.yaml +1 -1
- package/lib/k8s/deployment/subchart/templates/_helpers.tpl +22 -11
- package/lib/k8s/deployment/subchart/templates/deployment.yaml +12 -5
- package/lib/k8s/deployment/subchart/templates/network-policy.yaml +3 -1
- package/lib/k8s/deployment/subchart/templates/pod-disruption-budget.yaml +1 -1
- package/lib/k8s/deployment/subchart/values.md +812 -0
- package/lib/k8s/deployment/subchart/values.schema.json +125 -30
- package/lib/k8s/deployment/subchart/values.yaml +7 -3
- package/lib/k8s/hana-deployer/index.js +10 -0
- package/lib/k8s/hana-deployer/templates/hana-deployer-job.yaml +8 -0
- package/lib/k8s/html5-apps-deployer/index.js +10 -0
- package/lib/k8s/html5-apps-deployer/templates/html5-apps-deployer-job.yaml +8 -0
- package/lib/k8s/index.js +2 -2
- package/lib/k8s/resources/helm/chart/schemas/values.root.schema.json +11 -0
- package/lib/k8s/resources/helm/chart/schemas/values.schema.json +479 -0
- package/lib/k8s/resources/helm/chart/templates/_deployment_helpers.tpl +1 -159
- package/lib/k8s/resources/helm/chart/templates/_helpers.tpl +0 -33
- package/lib/k8s/resources/helm/chart/templates/_sapcp_helpers.tpl +1 -1
- package/lib/lint/Linter.js +155 -158
- package/lib/lint/io.js +12 -5
- package/npm-shrinkwrap.json +214 -74
- package/package.json +5 -4
- package/lib/init/template/_merging/existences.js +0 -297
- package/lib/init/template/mtx/files/cds.package.json +0 -12
- package/lib/init/template/mtx/files/cds.package.json.hbs +0 -14
- package/lib/init/template/mtx/files/java/.cdsrc.json +0 -17
- package/lib/init/template/mtx/files/java/package.json +0 -43
- package/lib/init/template/mtx/files/java/server.js +0 -30
- package/lib/init/template/mtx/files/xs-security.json.hbs +0 -48
- package/lib/lint/.eslintrc.js +0 -3
|
@@ -10,19 +10,27 @@
|
|
|
10
10
|
"properties": {
|
|
11
11
|
"global": {
|
|
12
12
|
"$id": "#/properties/global",
|
|
13
|
+
"title": "Helm global values",
|
|
14
|
+
"description": "For more information, see https://helm.sh/docs/chart_template_guide/subcharts_and_globals/#global-chart-values",
|
|
13
15
|
"type": "object",
|
|
14
16
|
"x-ignore-untested": true,
|
|
15
17
|
"additionalProperties": true,
|
|
16
18
|
"properties": {
|
|
17
19
|
"imagePullSecret": {
|
|
18
20
|
"$id": "#/properties/global/imagePullSecret",
|
|
21
|
+
"title": "Image Pull Secret configuration",
|
|
22
|
+
"description": "For more information, see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/",
|
|
19
23
|
"additionalProperties": true,
|
|
20
24
|
"type": "object",
|
|
21
25
|
"properties": {
|
|
22
26
|
"name": {
|
|
27
|
+
"title": "Secret name",
|
|
28
|
+
"description": "Name of the Kubernetes Secret, used as an image pull secret (must be of type kubernetes.io/dockerconfigjson). Can't be used with the `dockerconfigjson` option.",
|
|
23
29
|
"$ref": "#/definitions/KubernetesName"
|
|
24
30
|
},
|
|
25
31
|
"dockerconfigjson": {
|
|
32
|
+
"title": "Secret content",
|
|
33
|
+
"description": "The content for the dynamically generated Kubernetes Secret, which will be used as an image pull secret. Can't be used with the `name` option.",
|
|
26
34
|
"type": "string"
|
|
27
35
|
}
|
|
28
36
|
},
|
|
@@ -42,27 +50,53 @@
|
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
52
|
}
|
|
53
|
+
},
|
|
54
|
+
"image": {
|
|
55
|
+
"$id": "#/properties/global/image",
|
|
56
|
+
"title": "Image configuration",
|
|
57
|
+
"description": "Either name or repository is required.",
|
|
58
|
+
"type": "object",
|
|
59
|
+
"required": [],
|
|
60
|
+
"additionalProperties": true,
|
|
61
|
+
"properties": {
|
|
62
|
+
"tag": {
|
|
63
|
+
"$id": "#/properties/image/global/properties/tag",
|
|
64
|
+
"$ref": "#/definitions/ImageTag"
|
|
65
|
+
},
|
|
66
|
+
"registry": {
|
|
67
|
+
"$id": "#/properties/image/global/properties/registry",
|
|
68
|
+
"$ref": "#/definitions/ImageRegistry"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
45
71
|
}
|
|
46
72
|
}
|
|
47
73
|
},
|
|
48
74
|
"nameOverride": {
|
|
49
75
|
"$id": "#/properties/nameOverride",
|
|
76
|
+
"title": "Chart name override",
|
|
77
|
+
"description": "Will be used instead of the `.Chart.Name`, e.g. when generating the Deployment name.",
|
|
50
78
|
"type": "string",
|
|
51
79
|
"pattern": "[0-9a-z][0-9a-z-.]*"
|
|
52
80
|
},
|
|
53
81
|
"fullnameOverride": {
|
|
54
82
|
"$id": "#/properties/fullnameOverride",
|
|
83
|
+
"title": "Override for the `.fullname` helper function.",
|
|
84
|
+
"description": "Will be used as an override for the `.fullname` helper function (i.e. `.Release.Name-.Chart.Name`).",
|
|
55
85
|
"type": "string",
|
|
56
86
|
"pattern": "[0-9a-z][0-9a-z-.]*"
|
|
57
87
|
},
|
|
58
88
|
"replicaCount": {
|
|
59
89
|
"$id": "#/properties/replicaCount",
|
|
90
|
+
"title": "Replica count",
|
|
91
|
+
"description": "Number of desired pods within the Deployment.",
|
|
60
92
|
"type": "integer",
|
|
61
93
|
"minimum": 1,
|
|
62
94
|
"default": 1
|
|
63
95
|
},
|
|
64
96
|
"port": {
|
|
65
97
|
"$id": "#/properties/port",
|
|
98
|
+
"title": "Port",
|
|
99
|
+
"description": "Application's exposed port.",
|
|
66
100
|
"type": "integer",
|
|
67
101
|
"minimum": 1,
|
|
68
102
|
"maximum": 65535,
|
|
@@ -70,6 +104,8 @@
|
|
|
70
104
|
},
|
|
71
105
|
"serviceAccountName": {
|
|
72
106
|
"$id": "#/properties/serviceAccountName",
|
|
107
|
+
"title": "Service Account name",
|
|
108
|
+
"description": "Name of the Service Account assigned to pods.",
|
|
73
109
|
"default": "default",
|
|
74
110
|
"allOf": [
|
|
75
111
|
{
|
|
@@ -79,6 +115,7 @@
|
|
|
79
115
|
},
|
|
80
116
|
"image": {
|
|
81
117
|
"$id": "#/properties/image",
|
|
118
|
+
"title": "Image configuration",
|
|
82
119
|
"type": "object",
|
|
83
120
|
"required": [
|
|
84
121
|
"repository"
|
|
@@ -87,27 +124,36 @@
|
|
|
87
124
|
"properties": {
|
|
88
125
|
"repository": {
|
|
89
126
|
"$id": "#/properties/image/properties/repository",
|
|
127
|
+
"title": "Repository of the image",
|
|
128
|
+
"description": "Should also include the image name (i.e. everything before the `:` sign).",
|
|
90
129
|
"type": "string",
|
|
91
130
|
"pattern": "^[\\w-./:]*[@sha256]*$"
|
|
92
131
|
},
|
|
93
132
|
"tag": {
|
|
94
133
|
"$id": "#/properties/image/properties/tag",
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
134
|
+
"$ref": "#/definitions/ImageTag"
|
|
135
|
+
},
|
|
136
|
+
"registry": {
|
|
137
|
+
"$id": "#/properties/image/properties/registry",
|
|
138
|
+
"$ref": "#/definitions/ImageRegistry"
|
|
99
139
|
}
|
|
100
140
|
}
|
|
101
141
|
},
|
|
102
142
|
"imagePullSecret": {
|
|
103
143
|
"$id": "#/properties/imagePullSecret",
|
|
144
|
+
"title": "Image Pull Secret configuration",
|
|
145
|
+
"description": "For more information, see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/",
|
|
104
146
|
"additionalProperties": false,
|
|
105
147
|
"type": "object",
|
|
106
148
|
"properties": {
|
|
107
149
|
"name": {
|
|
150
|
+
"title": "Secret name",
|
|
151
|
+
"description": "Name of the Kubernetes Secret, used as an image pull secret (must be of type kubernetes.io/dockerconfigjson). Can't be used with the `dockerconfigjson` option.",
|
|
108
152
|
"$ref": "#/definitions/KubernetesName"
|
|
109
153
|
},
|
|
110
154
|
"dockerconfigjson": {
|
|
155
|
+
"title": "Secret content",
|
|
156
|
+
"description": "The content for the dynamically generated Kubernetes Secret, which will be used as an image pull secret. Can't be used with the `name` option.",
|
|
111
157
|
"type": "string"
|
|
112
158
|
}
|
|
113
159
|
},
|
|
@@ -130,10 +176,13 @@
|
|
|
130
176
|
},
|
|
131
177
|
"additionalVolumes": {
|
|
132
178
|
"$id": "#/properties/additionalVolumes",
|
|
179
|
+
"title": "Additional Pod volumes",
|
|
180
|
+
"description": "List of volumes, which should be mounted into Pods",
|
|
133
181
|
"type": "array",
|
|
134
182
|
"additionalItems": false,
|
|
135
183
|
"default": [],
|
|
136
184
|
"items": {
|
|
185
|
+
"title": "Additional volume configuration",
|
|
137
186
|
"type": "object",
|
|
138
187
|
"additionalProperties": true,
|
|
139
188
|
"required": [
|
|
@@ -142,10 +191,12 @@
|
|
|
142
191
|
],
|
|
143
192
|
"properties": {
|
|
144
193
|
"name": {
|
|
194
|
+
"title": "Name of the volume",
|
|
145
195
|
"type": "string",
|
|
146
196
|
"$ref": "#/definitions/KubernetesName"
|
|
147
197
|
},
|
|
148
198
|
"volumeMount": {
|
|
199
|
+
"title": "Volume mount configuration",
|
|
149
200
|
"type": "object",
|
|
150
201
|
"required": [
|
|
151
202
|
"mountPath"
|
|
@@ -153,19 +204,25 @@
|
|
|
153
204
|
"additionalProperties": false,
|
|
154
205
|
"properties": {
|
|
155
206
|
"mountPath": {
|
|
207
|
+
"description": "Path within a Pod, where the volume should be mounted.",
|
|
156
208
|
"type": "string",
|
|
157
209
|
"pattern": "^[^:]*$"
|
|
158
210
|
},
|
|
159
211
|
"mountPropagation": {
|
|
160
|
-
"
|
|
212
|
+
"description": "Mount propagation allows for sharing volumes mounted by a container to other containers in the same pod, or even to other pods on the same node.",
|
|
213
|
+
"type": "string",
|
|
214
|
+
"enum": ["None", "HostToContainer"]
|
|
161
215
|
},
|
|
162
216
|
"readOnly": {
|
|
217
|
+
"description": "Whether mounted volume should be in read-only mode.",
|
|
163
218
|
"type": "boolean"
|
|
164
219
|
},
|
|
165
220
|
"subPath": {
|
|
221
|
+
"description": "Sub-path inside the referenced volume instead of its root.",
|
|
166
222
|
"type": "string"
|
|
167
223
|
},
|
|
168
224
|
"subPathExpr": {
|
|
225
|
+
"description": "Similar to the `subPath`, but can be constructed using the downward API environment variables. For more info, see https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath-expanded-environment",
|
|
169
226
|
"type": "string"
|
|
170
227
|
}
|
|
171
228
|
}
|
|
@@ -175,11 +232,13 @@
|
|
|
175
232
|
},
|
|
176
233
|
"ha": {
|
|
177
234
|
"$id": "#/properties/ha",
|
|
235
|
+
"title": "High Availability configuration",
|
|
178
236
|
"type": "object",
|
|
179
237
|
"additionalProperties": false,
|
|
180
238
|
"properties": {
|
|
181
239
|
"enabled": {
|
|
182
240
|
"$id": "#/properties/ha/properties/enabled",
|
|
241
|
+
"description": "Enables additional high-availability related configuration, like Pod Disruption Budget and Topology Spread Constraints.",
|
|
183
242
|
"type": "boolean",
|
|
184
243
|
"default": true
|
|
185
244
|
}
|
|
@@ -187,6 +246,7 @@
|
|
|
187
246
|
},
|
|
188
247
|
"resources": {
|
|
189
248
|
"$id": "#/properties/resources",
|
|
249
|
+
"title": "Pod resources configuration",
|
|
190
250
|
"type": "object",
|
|
191
251
|
"additionalProperties": false,
|
|
192
252
|
"required": [
|
|
@@ -196,6 +256,7 @@
|
|
|
196
256
|
"properties": {
|
|
197
257
|
"requests": {
|
|
198
258
|
"type": "object",
|
|
259
|
+
"description": "Minimal required resources for the application to operate, that will be reserved for each replica.",
|
|
199
260
|
"additionalProperties": false,
|
|
200
261
|
"required": [
|
|
201
262
|
"cpu",
|
|
@@ -203,21 +264,17 @@
|
|
|
203
264
|
],
|
|
204
265
|
"properties": {
|
|
205
266
|
"cpu": {
|
|
267
|
+
"description": "CPU resource units, as described here https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu",
|
|
206
268
|
"$id": "#/properties/resources/properties/requests/properties/cpu",
|
|
207
|
-
"
|
|
208
|
-
{
|
|
209
|
-
"type": "number"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"type": "string"
|
|
213
|
-
}
|
|
214
|
-
]
|
|
269
|
+
"type": ["string", "number"]
|
|
215
270
|
},
|
|
216
271
|
"ephemeral-storage": {
|
|
272
|
+
"description": "Size of the local ephemeral storage, measured in bytes. For more info, see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#local-ephemeral-storage",
|
|
217
273
|
"$id": "#/properties/resources/properties/requests/properties/ephemeral-storage",
|
|
218
274
|
"type": "string"
|
|
219
275
|
},
|
|
220
276
|
"memory": {
|
|
277
|
+
"description": "Amount of memory, mesaured in bytes. For more info, see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory",
|
|
221
278
|
"$id": "#/properties/resources/properties/requests/properties/memory",
|
|
222
279
|
"type": "string"
|
|
223
280
|
}
|
|
@@ -225,27 +282,24 @@
|
|
|
225
282
|
},
|
|
226
283
|
"limits": {
|
|
227
284
|
"type": "object",
|
|
285
|
+
"description": "",
|
|
228
286
|
"additionalProperties": false,
|
|
229
287
|
"required": [
|
|
230
288
|
"memory"
|
|
231
289
|
],
|
|
232
290
|
"properties": {
|
|
233
291
|
"cpu": {
|
|
292
|
+
"description": "CPU resource units, as described here https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu",
|
|
234
293
|
"$id": "#/properties/resources/properties/limits/properties/cpu",
|
|
235
|
-
"
|
|
236
|
-
{
|
|
237
|
-
"type": "number"
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"type": "string"
|
|
241
|
-
}
|
|
242
|
-
]
|
|
294
|
+
"type": ["string", "number"]
|
|
243
295
|
},
|
|
244
296
|
"ephemeral-storage": {
|
|
297
|
+
"description": "Size of the local ephemeral storage, measured in bytes. For more info, see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#local-ephemeral-storage",
|
|
245
298
|
"$id": "#/properties/resources/properties/limits/properties/ephemeral-storage",
|
|
246
299
|
"type": "string"
|
|
247
300
|
},
|
|
248
301
|
"memory": {
|
|
302
|
+
"description": "Amount of memory, mesaured in bytes. For more info, see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory",
|
|
249
303
|
"$id": "#/properties/resources/properties/limits/properties/memory",
|
|
250
304
|
"type": "string"
|
|
251
305
|
}
|
|
@@ -255,15 +309,18 @@
|
|
|
255
309
|
},
|
|
256
310
|
"health_check": {
|
|
257
311
|
"$id": "#/properties/health_check",
|
|
312
|
+
"title": "Health-check configuration",
|
|
258
313
|
"type": "object",
|
|
259
314
|
"additionalProperties": false,
|
|
260
315
|
"properties": {
|
|
261
316
|
"liveness": {
|
|
262
317
|
"$id": "#/properties/health_check/properties/liveness",
|
|
318
|
+
"description": "Liveness-probe configuration.",
|
|
263
319
|
"type": "object",
|
|
264
320
|
"additionalProperties": false,
|
|
265
321
|
"properties": {
|
|
266
322
|
"path": {
|
|
323
|
+
"description": "HTTP path used by Kubernetes, to perform health-check calls.",
|
|
267
324
|
"type": "string",
|
|
268
325
|
"default": "/healthz"
|
|
269
326
|
}
|
|
@@ -271,10 +328,12 @@
|
|
|
271
328
|
},
|
|
272
329
|
"readiness": {
|
|
273
330
|
"$id": "#/properties/health_check/properties/readiness",
|
|
331
|
+
"description": "Readiness-probe configuration.",
|
|
274
332
|
"type": "object",
|
|
275
333
|
"additionalProperties": false,
|
|
276
334
|
"properties": {
|
|
277
335
|
"path": {
|
|
336
|
+
"description": "HTTP path used by Kubernetes, to perform health-check calls.",
|
|
278
337
|
"type": "string",
|
|
279
338
|
"default": "/healthz"
|
|
280
339
|
}
|
|
@@ -284,24 +343,21 @@
|
|
|
284
343
|
},
|
|
285
344
|
"startupTimeout": {
|
|
286
345
|
"$id": "#/properties/startupTimeout",
|
|
346
|
+
"description": "Initial timeout in seconds, during which the app must start giving the response to the liveness-probe.",
|
|
287
347
|
"type": "integer",
|
|
288
348
|
"minimum": 1,
|
|
289
349
|
"default": 30
|
|
290
350
|
},
|
|
291
351
|
"env": {
|
|
292
352
|
"$id": "#/properties/env",
|
|
353
|
+
"description": "Key-value map of environment variables, which should be added to the Pod spec.",
|
|
293
354
|
"type": "object",
|
|
294
355
|
"patternProperties": {
|
|
295
356
|
"^[-._a-zA-Z][-._a-zA-Z0-9]*$": {
|
|
296
357
|
"$comment": "regex above copied from https://github.com/kubernetes/kubernetes/blob/ea0764452222146c47ec826977f49d7001b0ea8c/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go#L402",
|
|
297
|
-
"
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"type": "integer"
|
|
303
|
-
}
|
|
304
|
-
]
|
|
358
|
+
"not": {
|
|
359
|
+
"type": ["null", "object", "array"]
|
|
360
|
+
}
|
|
305
361
|
}
|
|
306
362
|
},
|
|
307
363
|
"additionalProperties": false,
|
|
@@ -309,6 +365,7 @@
|
|
|
309
365
|
},
|
|
310
366
|
"envSecretNames": {
|
|
311
367
|
"$id": "#/properties/envSecretNames",
|
|
368
|
+
"description": "List of Kubernetes Secret names, used as sources for the Pod's environment variables.",
|
|
312
369
|
"type": "array",
|
|
313
370
|
"uniqueItems": true,
|
|
314
371
|
"items": {
|
|
@@ -318,15 +375,18 @@
|
|
|
318
375
|
},
|
|
319
376
|
"expose": {
|
|
320
377
|
"$id": "#/properties/expose",
|
|
378
|
+
"title": "",
|
|
321
379
|
"type": "object",
|
|
322
380
|
"additionalProperties": false,
|
|
323
381
|
"properties": {
|
|
324
382
|
"host": {
|
|
325
383
|
"$id": "#/properties/expose/properties/host",
|
|
384
|
+
"description": "Specifies the service's dns name for inbound external traffic. If it doesn't contain a dot, the default cluster domain will be appended.",
|
|
326
385
|
"type": "string"
|
|
327
386
|
},
|
|
328
387
|
"enabled": {
|
|
329
388
|
"$id": "#/properties/expose/properties/enabled",
|
|
389
|
+
"description": "Expose the application to the internet.",
|
|
330
390
|
"type": "boolean",
|
|
331
391
|
"default": true
|
|
332
392
|
}
|
|
@@ -334,6 +394,7 @@
|
|
|
334
394
|
},
|
|
335
395
|
"bindings": {
|
|
336
396
|
"$id": "#/properties/bindings",
|
|
397
|
+
"title": "Service Binding configuration",
|
|
337
398
|
"type": "object",
|
|
338
399
|
"additionalProperties": false,
|
|
339
400
|
"patternProperties": {
|
|
@@ -347,6 +408,7 @@
|
|
|
347
408
|
],
|
|
348
409
|
"properties": {
|
|
349
410
|
"fromSecret": {
|
|
411
|
+
"description": "Name of a Kubernetes Secret, with the binding content, compliant to the SAP Kubernetes Service Binding spec https://github.tools.sap/Kubernetes-Service-Bindings/doc/",
|
|
350
412
|
"$ref": "#/definitions/KubernetesName"
|
|
351
413
|
}
|
|
352
414
|
}
|
|
@@ -356,36 +418,49 @@
|
|
|
356
418
|
"additionalProperties": false,
|
|
357
419
|
"properties": {
|
|
358
420
|
"serviceInstanceName": {
|
|
421
|
+
"description": "Name of a BTP Operator Service Instance, created by the `service-instance` Helm chart. Can't be used with the `serviceInstanceFullname` option.",
|
|
359
422
|
"$ref": "#/definitions/KubernetesName"
|
|
360
423
|
},
|
|
361
424
|
"serviceInstanceFullname": {
|
|
425
|
+
"description": "Full name of a BTP Operator Service Instance. Can't be used with the `serviceInstanceName` option.",
|
|
362
426
|
"$ref": "#/definitions/KubernetesName"
|
|
363
427
|
},
|
|
364
428
|
"externalName": {
|
|
429
|
+
"description": "The name for the service binding in SAP BTP",
|
|
365
430
|
"type": "string"
|
|
366
431
|
},
|
|
367
432
|
"secretName": {
|
|
433
|
+
"description": "The name of the secret where the credentials are stored.",
|
|
368
434
|
"$ref": "#/definitions/KubernetesName"
|
|
369
435
|
},
|
|
370
436
|
"parameters": {
|
|
437
|
+
"description": "Some services support the provisioning of additional configuration parameters during the bind request. For the list of supported parameters, check the documentation of the particular service offering.",
|
|
371
438
|
"type": "object"
|
|
372
439
|
},
|
|
373
440
|
"parametersFrom": {
|
|
441
|
+
"description": "List of sources to populate parameters.",
|
|
374
442
|
"type": "array",
|
|
375
443
|
"items": {
|
|
376
444
|
"anyOf": [
|
|
377
445
|
{
|
|
378
446
|
"type": "object",
|
|
447
|
+
"description": "Kubernetes Secret as a parameters source.",
|
|
379
448
|
"additionalProperties": false,
|
|
380
449
|
"properties": {
|
|
381
450
|
"secretKeyRef": {
|
|
382
451
|
"type": "object",
|
|
383
452
|
"additionalProperties": false,
|
|
453
|
+
"required": [
|
|
454
|
+
"name",
|
|
455
|
+
"key"
|
|
456
|
+
],
|
|
384
457
|
"properties": {
|
|
385
458
|
"name": {
|
|
459
|
+
"description": "Name of a Secret.",
|
|
386
460
|
"$ref": "#/definitions/KubernetesName"
|
|
387
461
|
},
|
|
388
462
|
"key": {
|
|
463
|
+
"description": "Key in that Secret, which contains a string that represents the json to include in the set of parameters to be sent to the broker.",
|
|
389
464
|
"type": "string"
|
|
390
465
|
}
|
|
391
466
|
}
|
|
@@ -394,16 +469,23 @@
|
|
|
394
469
|
},
|
|
395
470
|
{
|
|
396
471
|
"type": "object",
|
|
472
|
+
"description": "Kubernetes Config Map as a parameters source.",
|
|
397
473
|
"additionalProperties": false,
|
|
398
474
|
"properties": {
|
|
399
475
|
"configMapKeyRef": {
|
|
400
476
|
"type": "object",
|
|
401
477
|
"additionalProperties": false,
|
|
478
|
+
"required": [
|
|
479
|
+
"name",
|
|
480
|
+
"key"
|
|
481
|
+
],
|
|
402
482
|
"properties": {
|
|
403
483
|
"name": {
|
|
484
|
+
"description": "Name of a Config Map",
|
|
404
485
|
"$ref": "#/definitions/KubernetesName"
|
|
405
486
|
},
|
|
406
487
|
"key": {
|
|
488
|
+
"description": "Key in that Config Map, which contains a string that represents the json to include in the set of parameters to be sent to the broker.",
|
|
407
489
|
"type": "string"
|
|
408
490
|
}
|
|
409
491
|
}
|
|
@@ -414,6 +496,7 @@
|
|
|
414
496
|
}
|
|
415
497
|
},
|
|
416
498
|
"credentialsRotationPolicy": {
|
|
499
|
+
"description": "Holds automatic credentials rotation configuration. For more details, see https://github.com/SAP/sap-btp-service-operator#spec-1",
|
|
417
500
|
"type": "object"
|
|
418
501
|
}
|
|
419
502
|
},
|
|
@@ -444,6 +527,18 @@
|
|
|
444
527
|
"type": "string",
|
|
445
528
|
"$comment": "running `kubectl create secret generic invalid_name` will print this regex",
|
|
446
529
|
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
|
|
447
|
-
}
|
|
530
|
+
},
|
|
531
|
+
"ImageRegistry": {
|
|
532
|
+
"type": "string",
|
|
533
|
+
"title": "Image registry",
|
|
534
|
+
"description": "Image registry e.g. docker.io",
|
|
535
|
+
"pattern": "^[\\w-./]+$"
|
|
536
|
+
},
|
|
537
|
+
"ImageTag": {
|
|
538
|
+
"title": "Image tag",
|
|
539
|
+
"description": "Image tag without the name (everything after the `:` sign, potentially including the `@sha256` section at the end).",
|
|
540
|
+
"type": "string",
|
|
541
|
+
"$comment": "Copied from https://github.com/containers/image/blob/18d58d29fdc4fc32fb8a8a6d186b829b217f1bf5/docker/reference/regexp.go#L68-L70",
|
|
542
|
+
"pattern": "^((?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?/)?[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?)(?::([\\w][\\w.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$" }
|
|
448
543
|
}
|
|
449
544
|
}
|
|
@@ -2,6 +2,9 @@ global:
|
|
|
2
2
|
imagePullSecret: {}
|
|
3
3
|
# name: ""
|
|
4
4
|
# dockerconfigjson: ""
|
|
5
|
+
image: {}
|
|
6
|
+
# registry: gcr.io/my-project
|
|
7
|
+
# tag: latest
|
|
5
8
|
|
|
6
9
|
replicaCount: 1
|
|
7
10
|
port: 8080
|
|
@@ -10,9 +13,10 @@ serviceAccountName: default
|
|
|
10
13
|
# To use a digest, change those values like that
|
|
11
14
|
# repository: nginx@sha256
|
|
12
15
|
# tag: 2834dc507516af02784808c5f48b7cbe38b8ed5d0f4837f16e78d00deb7e7767
|
|
13
|
-
image:
|
|
14
|
-
# repository:
|
|
15
|
-
|
|
16
|
+
image: {}
|
|
17
|
+
# repository: repo/image
|
|
18
|
+
# registry: gcr.io/my-project
|
|
19
|
+
# tag: latest
|
|
16
20
|
|
|
17
21
|
imagePullSecret: {}
|
|
18
22
|
# name: ""
|
|
@@ -31,10 +31,18 @@ spec:
|
|
|
31
31
|
image: {{ include "cap.image" $ }}
|
|
32
32
|
imagePullPolicy: {{ include "cap.imagePullPolicy" $ }}
|
|
33
33
|
env:
|
|
34
|
+
{{- range $k, $v := .Values.hana_deployer.env }}
|
|
35
|
+
- name: {{ $k }}
|
|
36
|
+
value: {{ $v | quote }}
|
|
37
|
+
{{- end }}
|
|
38
|
+
- name: SERVICE_BINDING_ROOT
|
|
39
|
+
value: /bindings
|
|
34
40
|
- name: EXIT
|
|
35
41
|
value: 'true'
|
|
36
42
|
volumeMounts:
|
|
37
43
|
{{- include "cap.sapcp.bindingsVolumeMounts" $ | nindent 10 }}
|
|
44
|
+
resources:
|
|
45
|
+
{{- toYaml .Values.hana_deployer.resources | nindent 10 }}
|
|
38
46
|
---
|
|
39
47
|
{{ include "cap.sapcp.bindings" $ }}
|
|
40
48
|
{{ end }}
|
|
@@ -22,6 +22,16 @@ module.exports = wrapFeature('html5_apps_deployer', {
|
|
|
22
22
|
html5_apps_repo: {
|
|
23
23
|
serviceInstanceName: 'html5-apps-repo-host'
|
|
24
24
|
}
|
|
25
|
+
},
|
|
26
|
+
resources: {
|
|
27
|
+
limits: {
|
|
28
|
+
cpu: "2000m",
|
|
29
|
+
memory: "1G"
|
|
30
|
+
},
|
|
31
|
+
requests: {
|
|
32
|
+
cpu: "1000m",
|
|
33
|
+
memory: "1G"
|
|
34
|
+
}
|
|
25
35
|
}
|
|
26
36
|
}
|
|
27
37
|
}
|
|
@@ -35,7 +35,15 @@ spec:
|
|
|
35
35
|
imagePullPolicy: {{ include "cap.imagePullPolicy" $ }}
|
|
36
36
|
volumeMounts:
|
|
37
37
|
{{- include "cap.sapcp.bindingsVolumeMounts" $ | nindent 10 }}
|
|
38
|
+
resources:
|
|
39
|
+
{{- toYaml .Values.html5_apps_deployer.resources | nindent 10 }}
|
|
38
40
|
env:
|
|
41
|
+
{{- range $k, $v := .Values.html5_apps_deployer.env }}
|
|
42
|
+
- name: {{ $k }}
|
|
43
|
+
value: {{ $v | quote }}
|
|
44
|
+
{{- end }}
|
|
45
|
+
- name: SERVICE_BINDING_ROOT
|
|
46
|
+
value: /bindings
|
|
39
47
|
- name: EXIT_PROCESS_AFTER_UPLOAD
|
|
40
48
|
value: "true"
|
|
41
49
|
- name: PORT
|
package/lib/k8s/index.js
CHANGED
|
@@ -44,7 +44,7 @@ async function addChart(context, path = 'chart', _features) {
|
|
|
44
44
|
const model = await context.get('model');
|
|
45
45
|
|
|
46
46
|
const mergeSemantics = {
|
|
47
|
-
|
|
47
|
+
additions: []
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
context.add('chartPath', path);
|
|
@@ -93,7 +93,7 @@ async function addChart(context, path = 'chart', _features) {
|
|
|
93
93
|
const builder = new ChartBuilder({ path, rootPath: projectPath });
|
|
94
94
|
await builder.begin();
|
|
95
95
|
|
|
96
|
-
const chartAdder = new ChartAdder({ builder, chartValues, chartDependencies,
|
|
96
|
+
const chartAdder = new ChartAdder({ builder, chartValues, chartDependencies, resources: resource('helm/chart'), app: model.app, mergeSemantics });
|
|
97
97
|
await chartAdder.execute();
|
|
98
98
|
|
|
99
99
|
let values;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"allOf": [{ "$ref": "./values.schema.json" }],
|
|
4
|
+
"properties": {
|
|
5
|
+
"srv": {
|
|
6
|
+
"$id": "#/properties/srv",
|
|
7
|
+
"description": "Deployment",
|
|
8
|
+
"$ref": "./charts/web-application/values.schema.json"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|