@sap/cds-dk 6.6.2 → 6.7.1
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 +36 -1
- package/bin/add.js +5 -3
- package/bin/build/all.js +1 -1
- package/bin/cds.js +10 -8
- package/bin/env.js +4 -6
- package/bin/login.js +6 -4
- package/bin/migrate.js +0 -1
- package/bin/repl.js +1 -1
- package/bin/serve.js +7 -0
- package/bin/subscribe.js +5 -5
- package/bin/unsubscribe.js +4 -5
- package/bin/upgrade.js +67 -0
- package/bin/watch.js +8 -5
- package/lib/bind/bindingManager.js +3 -2
- package/lib/bind/cfKeyProvider.js +7 -6
- package/lib/bind/userCdsrcJsonStorageProvider.js +5 -4
- package/lib/cds.js +12 -0
- package/lib/client/activate.js +4 -3
- package/lib/client/auth_manager.js +4 -3
- package/lib/client/base_command.js +7 -2
- package/lib/client/helper/cf_helper.js +12 -11
- package/lib/client/helper/dependency_helper.js +3 -2
- package/lib/client/helper/logging.js +0 -7
- package/lib/client/params.js +4 -2
- package/lib/client/settings_manager.js +35 -34
- package/lib/client/tenant_action.js +78 -0
- package/lib/init/constants.js +1 -1
- package/lib/init/index.js +4 -4
- package/lib/init/template/_merging/registry-mta.js +31 -46
- package/lib/init/template/approuter/files/mta.yaml.hbs +12 -8
- package/lib/init/template/approuter/files/xs-app.json.hbs +0 -3
- package/lib/init/template/approuter/index.js +26 -34
- package/lib/init/template/auditlog/files/mta.yaml.hbs +2 -1
- package/lib/init/template/auditlog/index.js +8 -21
- package/lib/init/template/cf-manifest/files/manifest.yml.hbs +4 -4
- package/lib/init/template/cf-manifest/index.js +2 -1
- package/lib/init/template/connectivity/index.js +4 -5
- package/lib/init/template/data/index.js +19 -22
- package/lib/init/template/destinations/index.js +5 -17
- package/lib/init/template/enterprise-messaging/files/mta.yaml.hbs +2 -1
- package/lib/init/template/enterprise-messaging/index.js +7 -19
- package/lib/init/template/extensibility/index.js +3 -1
- package/lib/init/template/hana/files/mta.yaml.hbs +4 -5
- package/lib/init/template/hana/index.js +49 -84
- package/lib/init/template/helm/chart/templates/_helpers.tpl +4 -1
- package/lib/init/template/helm/files/Chart.yaml.hbs +1 -4
- package/lib/init/template/helm/index.js +45 -13
- package/lib/init/template/helm/subcharts/web-application/templates/_helpers.tpl +21 -31
- package/lib/init/template/helm/subcharts/web-application/templates/api-rule.yaml +3 -12
- package/lib/init/template/helm/subcharts/web-application/templates/deployment.yaml +12 -14
- package/lib/init/template/helm/subcharts/web-application/templates/network-policy.yaml +27 -4
- package/lib/init/template/helm/subcharts/web-application/templates/pod-disruption-budget.yaml +0 -2
- package/lib/init/template/helm/subcharts/web-application/templates/secret.yaml +2 -2
- package/lib/init/template/helm/subcharts/web-application/templates/service-account.yaml +2 -2
- package/lib/init/template/helm/subcharts/web-application/templates/service-binding.yaml +16 -13
- package/lib/init/template/helm/subcharts/web-application/templating.md +16 -9
- package/lib/init/template/helm/subcharts/web-application/values.md +317 -379
- package/lib/init/template/helm/subcharts/web-application/values.schema.json +87 -107
- package/lib/init/template/helm/subcharts/web-application/values.yaml +28 -2
- package/lib/init/template/html5-repo/index.js +6 -29
- package/lib/init/template/java/index.js +1 -1
- package/lib/init/template/kibana-logging/files/mta.yaml.hbs +2 -1
- package/lib/init/template/kibana-logging/index.js +5 -8
- package/lib/init/template/lint/index.js +8 -8
- package/lib/init/template/mta/files/mta.yaml.hbs +3 -2
- package/lib/init/template/mta/index.js +3 -2
- package/lib/init/template/multitenancy/files/mta.yaml.hbs +25 -31
- package/lib/init/template/multitenancy/files/{java/mtxs-configmap.yaml → mtxs-configmap-java.yaml} +1 -1
- package/lib/init/template/multitenancy/files/{mtxs-configmap.yaml → mtxs-configmap-nodejs.yaml} +5 -1
- package/lib/init/template/multitenancy/files/package.json.hbs +28 -0
- package/lib/init/template/multitenancy/files/package.sidecar.json.hbs +21 -0
- package/lib/init/template/multitenancy/files/values.yaml.hbs +16 -9
- package/lib/init/template/multitenancy/index.js +51 -99
- package/lib/init/template/nodejs/files/.vscode/extensions.json +1 -2
- package/lib/init/template/nodejs/files/.vscode/launch.json +2 -2
- package/lib/init/template/nodejs/files/.vscode/tasks.json +2 -2
- package/lib/init/template/nodejs/files/package.json.hbs +2 -2
- package/lib/init/template/nodejs/index.js +4 -3
- package/lib/init/template/pipeline/index.js +3 -2
- package/lib/init/template/samples/index.js +5 -4
- package/lib/init/template/sqlite/files/package.json.hbs +19 -0
- package/lib/init/template/sqlite/index.js +11 -0
- package/lib/init/template/toggles/index.js +3 -5
- package/lib/init/template/xsuaa/files/mta.yaml.hbs +4 -5
- package/lib/init/template/xsuaa/files/values.yaml.hbs +0 -2
- package/lib/init/template/xsuaa/index.js +14 -35
- package/lib/init/util/commandUtil.js +3 -2
- package/lib/init/util/fsUtil.js +19 -2
- package/lib/init/util/md5Tracking.js +36 -63
- package/lib/init/util/projectReader.js +12 -26
- package/lib/lint/Linter.js +0 -3
- package/lib/util/exec.js +2 -1
- package/lib/util/term.js +1 -1
- package/lib/watch/livereload-connect.js +5 -4
- package/lib/watch/livereload-server.js +3 -6
- package/lib/watch/node-watch.js +1 -1
- package/npm-shrinkwrap.json +569 -479
- package/package.json +4 -4
- package/readme.md +1 -1
- package/lib/client/subscription.js +0 -84
- package/lib/init/template/approuter/files/chart.yaml +0 -4
- package/lib/init/template/auditlog/files/auditlog.yaml +0 -4
- package/lib/init/template/destinations/files/destination.yaml +0 -4
- package/lib/init/template/enterprise-messaging/files/event-mesh.yaml +0 -4
- package/lib/init/template/hana/files/hana-deployer.yaml +0 -4
- package/lib/init/template/hana/files/hana.yaml +0 -4
- package/lib/init/template/html5-repo/files/html5-apps-deployer.yaml +0 -4
- package/lib/init/template/html5-repo/files/html5-apps-repo-host.yaml +0 -4
- package/lib/init/template/multitenancy/files/cds.package.json +0 -7
- package/lib/init/template/multitenancy/files/cds.package.json.hbs +0 -9
- package/lib/init/template/multitenancy/files/dependencies.package.json +0 -5
- package/lib/init/template/multitenancy/files/java/.cdsrc.json +0 -22
- package/lib/init/template/multitenancy/files/java/package.json +0 -33
- package/lib/init/template/multitenancy/files/saas-registry.yaml +0 -4
- package/lib/init/template/multitenancy/files/service-manager.yaml +0 -4
- package/lib/init/template/multitenancy/files/sidecar.yaml +0 -4
- package/lib/init/template/xsuaa/files/xsuaa.yaml +0 -4
|
@@ -32,10 +32,8 @@ spec:
|
|
|
32
32
|
{{- $envFromVars.vars | toYaml | nindent 8}}
|
|
33
33
|
{{- end }}
|
|
34
34
|
env:
|
|
35
|
-
{{- if .Values.bindings }}
|
|
36
35
|
- name: SERVICE_BINDING_ROOT
|
|
37
36
|
value: /bindings
|
|
38
|
-
{{- end }}
|
|
39
37
|
- name: PORT
|
|
40
38
|
value: {{ .Values.port | quote }}
|
|
41
39
|
- name: TMPDIR
|
|
@@ -52,40 +50,40 @@ spec:
|
|
|
52
50
|
- name: APPLICATION_URI
|
|
53
51
|
value: {{ include "web-application.applicationUri" . }}
|
|
54
52
|
{{- end }}
|
|
55
|
-
{{- $health := .Values.health_check | default .Values.health }}
|
|
56
53
|
livenessProbe:
|
|
57
|
-
{{- if
|
|
54
|
+
{{- if .Values.health.liveness.path }}
|
|
58
55
|
httpGet:
|
|
59
|
-
path: {{
|
|
56
|
+
path: {{ .Values.health.liveness.path }}
|
|
60
57
|
port: http
|
|
61
58
|
{{- else }}
|
|
62
59
|
tcpSocket:
|
|
63
60
|
port: {{ .Values.port }}
|
|
64
61
|
{{- end }}
|
|
65
62
|
readinessProbe:
|
|
66
|
-
{{- if
|
|
63
|
+
{{- if .Values.health.readiness.path }}
|
|
67
64
|
httpGet:
|
|
68
|
-
path: {{
|
|
65
|
+
path: {{ .Values.health.readiness.path }}
|
|
69
66
|
port: http
|
|
70
67
|
{{- else }}
|
|
71
68
|
tcpSocket:
|
|
72
69
|
port: {{ .Values.port }}
|
|
73
70
|
{{- end }}
|
|
74
71
|
startupProbe:
|
|
75
|
-
{{- if
|
|
72
|
+
{{- if .Values.health.liveness.path }}
|
|
76
73
|
httpGet:
|
|
77
|
-
path: {{
|
|
74
|
+
path: {{ .Values.health.liveness.path }}
|
|
78
75
|
port: http
|
|
79
76
|
{{- else }}
|
|
80
77
|
tcpSocket:
|
|
81
78
|
port: {{ .Values.port }}
|
|
82
79
|
{{- end }}
|
|
83
|
-
{{
|
|
84
|
-
failureThreshold: {{ div (add1 $startupTimeout) 2 }}
|
|
80
|
+
failureThreshold: {{ div (add1 .Values.startupTimeoutSeconds) 2 }}
|
|
85
81
|
periodSeconds: 2
|
|
86
82
|
volumeMounts:
|
|
87
83
|
- name: tmp
|
|
88
84
|
mountPath: /tmp
|
|
85
|
+
- name: bindings-root
|
|
86
|
+
mountPath: /bindings
|
|
89
87
|
{{- range $volume := .Values.additionalVolumes }}
|
|
90
88
|
- name: {{ $volume.name | quote }}
|
|
91
89
|
{{- toYaml $volume.volumeMount | nindent 10 }}
|
|
@@ -99,14 +97,13 @@ spec:
|
|
|
99
97
|
drop:
|
|
100
98
|
- ALL
|
|
101
99
|
privileged: false
|
|
102
|
-
readOnlyRootFilesystem: false
|
|
100
|
+
readOnlyRootFilesystem: {{ .Values.readOnlyRootFilesystem | default false }}
|
|
103
101
|
seccompProfile:
|
|
104
102
|
type: RuntimeDefault
|
|
105
103
|
restartPolicy: Always
|
|
106
104
|
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
|
107
105
|
securityContext:
|
|
108
106
|
runAsNonRoot: true
|
|
109
|
-
{{- if (include "web-application.ha" .) }}
|
|
110
107
|
topologySpreadConstraints:
|
|
111
108
|
{{- range $constraint := .Values.availability.topologySpreadConstraints }}
|
|
112
109
|
- labelSelector:
|
|
@@ -115,10 +112,11 @@ spec:
|
|
|
115
112
|
topologyKey: {{ $constraint.topologyKey }}
|
|
116
113
|
whenUnsatisfiable: {{ $constraint.whenUnsatisfiable }}
|
|
117
114
|
{{- end }}
|
|
118
|
-
{{- end }}
|
|
119
115
|
volumes:
|
|
120
116
|
- emptyDir: {}
|
|
121
117
|
name: tmp
|
|
118
|
+
- emptyDir: {}
|
|
119
|
+
name: bindings-root
|
|
122
120
|
{{- include "web-application.serviceVolumes" . | nindent 6 }}
|
|
123
121
|
{{- range $volume := .Values.additionalVolumes }}
|
|
124
122
|
-
|
|
@@ -1,18 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
{{- if .Values.networkSecurity.enabled -}}
|
|
2
2
|
kind: NetworkPolicy
|
|
3
|
+
apiVersion: networking.k8s.io/v1
|
|
3
4
|
metadata:
|
|
4
5
|
name: {{ include "web-application.fullname" . }}
|
|
5
6
|
labels: {{- include "web-application.labels" . | nindent 4 }}
|
|
6
7
|
spec:
|
|
7
8
|
ingress:
|
|
9
|
+
{{- if .Values.expose.enabled }}
|
|
8
10
|
- from:
|
|
9
11
|
- podSelector:
|
|
10
12
|
matchLabels:
|
|
11
13
|
app: istio-ingressgateway
|
|
12
14
|
namespaceSelector:
|
|
13
15
|
matchLabels:
|
|
14
|
-
name: istio-system
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
kubernetes.io/metadata.name: istio-system
|
|
17
|
+
{{- end }}
|
|
18
|
+
{{- if .Values.networkSecurity.allowNamespaceInternal }}
|
|
19
|
+
- from:
|
|
20
|
+
- podSelector: {}
|
|
21
|
+
{{- end }}
|
|
22
|
+
{{- range $netRule := .Values.networkSecurity.ingress }}
|
|
23
|
+
- from:
|
|
24
|
+
-
|
|
25
|
+
{{- if $netRule.namespace }}
|
|
26
|
+
namespaceSelector:
|
|
27
|
+
matchLabels:
|
|
28
|
+
kubernetes.io/metadata.name: {{ tpl $netRule.namespace $ }}
|
|
29
|
+
{{- end }}
|
|
30
|
+
{{- if $netRule.podLabelsSelector }}
|
|
31
|
+
podSelector:
|
|
32
|
+
matchLabels: {{ tpl ($netRule.podLabelsSelector | toYaml) $ | nindent 10 }}
|
|
33
|
+
{{- else }}
|
|
34
|
+
podSelector: {}
|
|
35
|
+
{{- end }}
|
|
36
|
+
{{- end }}
|
|
17
37
|
policyTypes:
|
|
18
38
|
- Ingress
|
|
39
|
+
podSelector:
|
|
40
|
+
matchLabels: {{- include "web-application.selectorLabels" . | nindent 6 }}
|
|
41
|
+
{{- end }}
|
package/lib/init/template/helm/subcharts/web-application/templates/pod-disruption-budget.yaml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
{{- if (include "web-application.ha" .) }}
|
|
2
1
|
apiVersion: policy/v1
|
|
3
2
|
kind: PodDisruptionBudget
|
|
4
3
|
metadata:
|
|
@@ -8,4 +7,3 @@ spec:
|
|
|
8
7
|
maxUnavailable: {{ .Values.availability.podDisruptionBudget.maxUnavailable }}
|
|
9
8
|
selector:
|
|
10
9
|
matchLabels: {{- include "web-application.selectorLabels" . | nindent 6 }}
|
|
11
|
-
{{- end }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{{ if or .Values.imagePullSecret.dockerconfigjson .Values.global.imagePullSecret.dockerconfigjson }}
|
|
1
|
+
{{- if or .Values.imagePullSecret.dockerconfigjson .Values.global.imagePullSecret.dockerconfigjson -}}
|
|
2
2
|
apiVersion: v1
|
|
3
3
|
kind: Secret
|
|
4
4
|
type: kubernetes.io/dockerconfigjson
|
|
@@ -7,4 +7,4 @@ metadata:
|
|
|
7
7
|
labels: {{- include "web-application.labels" . | nindent 4 }}
|
|
8
8
|
data:
|
|
9
9
|
.dockerconfigjson: {{ default .Values.global.imagePullSecret.dockerconfigjson .Values.imagePullSecret.dockerconfigjson }}
|
|
10
|
-
{{- end
|
|
10
|
+
{{- end }}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
{{-
|
|
2
|
-
{{-
|
|
1
|
+
{{- $bindings := omit .Values.bindings "defaultProperties" -}}
|
|
2
|
+
{{- range $name, $params := $bindings }}
|
|
3
|
+
{{- $defaultProperties := deepCopy $.Values.bindings.defaultProperties -}}
|
|
4
|
+
{{- $mergedParams := (deepCopy $params | mergeOverwrite $defaultProperties ) -}}
|
|
5
|
+
{{- if not $mergedParams.fromSecret }}
|
|
3
6
|
---
|
|
4
7
|
apiVersion: services.cloud.sap.com/v1
|
|
5
8
|
kind: ServiceBinding
|
|
@@ -7,22 +10,22 @@ metadata:
|
|
|
7
10
|
name: {{ include "web-application.bindingName" (dict "root" $ "name" $name) }}
|
|
8
11
|
labels: {{- include "web-application.labels" $ | nindent 4 }}
|
|
9
12
|
spec:
|
|
10
|
-
serviceInstanceName: {{include "web-application.serviceInstanceName" (dict "binding" $
|
|
13
|
+
serviceInstanceName: {{include "web-application.serviceInstanceName" (dict "binding" $mergedParams "root" $) }}
|
|
11
14
|
secretKey: credentials
|
|
12
|
-
{{- if $
|
|
13
|
-
externalName: {{ $
|
|
15
|
+
{{- if $mergedParams.externalName }}
|
|
16
|
+
externalName: {{ $mergedParams.externalName }}
|
|
14
17
|
{{- end }}
|
|
15
|
-
{{- if $
|
|
16
|
-
secretName: {{ tpl $
|
|
18
|
+
{{- if $mergedParams.secretName }}
|
|
19
|
+
secretName: {{ tpl $mergedParams.secretName $ }}
|
|
17
20
|
{{- end }}
|
|
18
|
-
{{- if $
|
|
19
|
-
parameters: {{ $
|
|
21
|
+
{{- if $mergedParams.parameters }}
|
|
22
|
+
parameters: {{ $mergedParams.parameters | toYaml | nindent 4 }}
|
|
20
23
|
{{- end }}
|
|
21
|
-
{{- if $
|
|
22
|
-
parametersFrom: {{ tpl ($
|
|
24
|
+
{{- if $mergedParams.parametersFrom }}
|
|
25
|
+
parametersFrom: {{ tpl ($mergedParams.parametersFrom | toYaml) $ | nindent 4 }}
|
|
23
26
|
{{- end }}
|
|
24
|
-
{{- if $
|
|
25
|
-
credentialsRotationPolicy: {{ $
|
|
27
|
+
{{- if $mergedParams.credentialsRotationPolicy }}
|
|
28
|
+
credentialsRotationPolicy: {{ $mergedParams.credentialsRotationPolicy | toYaml | nindent 4 }}
|
|
26
29
|
{{- end }}
|
|
27
30
|
{{- end }}
|
|
28
31
|
{{- end }}
|
|
@@ -20,17 +20,24 @@ env:
|
|
|
20
20
|
name: my-configmap-{{ .Release.Name }}
|
|
21
21
|
key: my-key
|
|
22
22
|
envFrom:
|
|
23
|
-
- configMapRef:
|
|
24
|
-
|
|
25
|
-
- secretRef:
|
|
23
|
+
- configMapRef:
|
|
24
|
+
name: my-configmap1-{{ .Release.Name }}
|
|
25
|
+
- secretRef:
|
|
26
26
|
name: my-secret-ref1-{{ .Release.Name }}
|
|
27
27
|
additionalVolumes:
|
|
28
|
-
- name: my-volume
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
- name: my-volume
|
|
29
|
+
secret:
|
|
30
|
+
secretName: my-secret-{{ .Release.Name }}
|
|
31
|
+
volumeMount:
|
|
32
|
+
mountPath: /etc/mysecret
|
|
33
|
+
readOnly: true
|
|
34
|
+
expose:
|
|
35
|
+
host: "{{ .Release.Name }}-app"
|
|
36
|
+
networkSecurity:
|
|
37
|
+
ingress:
|
|
38
|
+
- namespace: "{{ .Release.Namespace }}"
|
|
39
|
+
podLabelsSelector:
|
|
40
|
+
app: "{{ .Release.Name }}-my-app"
|
|
34
41
|
bindings:
|
|
35
42
|
hana:
|
|
36
43
|
serviceInstanceName: hana-{{ .Release.Name }}
|