@sap/cds-dk 7.2.0 → 7.3.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.
Files changed (105) hide show
  1. package/bin/activate.js +2 -2
  2. package/bin/add.js +1 -1
  3. package/bin/build.js +6 -3
  4. package/bin/compile/index.js +9 -5
  5. package/bin/env.js +0 -3
  6. package/bin/extend.js +29 -3
  7. package/bin/import.js +7 -3
  8. package/bin/init.js +31 -37
  9. package/bin/push.js +10 -6
  10. package/bin/repl.js +23 -43
  11. package/bin/watch.js +5 -9
  12. package/lib/bind/bindingResolver.js +2 -1
  13. package/lib/bind/index.js +1 -1
  14. package/lib/build/{buildTaskHandler.js → buildPlugin.js} +40 -27
  15. package/lib/build/buildTaskEngine.js +75 -74
  16. package/lib/build/buildTaskFactory.js +39 -32
  17. package/lib/build/buildTaskProvider.js +24 -19
  18. package/lib/build/buildTaskProviderFactory.js +125 -58
  19. package/lib/build/constants.js +6 -4
  20. package/lib/build/index.js +7 -3
  21. package/lib/build/plugins.js +35 -0
  22. package/lib/build/provider/{buildTaskHandlerEdmx.js → edmxBuildPlugin.js} +11 -7
  23. package/lib/build/provider/{buildTaskHandlerFeatureToggles.js → featureToggleBuildPlugin.js} +5 -5
  24. package/lib/build/provider/fiori/index.js +5 -6
  25. package/lib/build/provider/hana/index.js +54 -30
  26. package/lib/build/provider/{buildTaskHandlerInternal.js → internalBuildPlugin.js} +14 -10
  27. package/lib/build/provider/{buildTaskProviderInternal.js → internalBuildTaskProvider.js} +27 -28
  28. package/lib/build/provider/java/index.js +30 -24
  29. package/lib/build/provider/mtx/index.js +4 -4
  30. package/lib/build/provider/mtx/resourcesTarBuilder.js +8 -8
  31. package/lib/build/provider/mtx-extension/index.js +17 -9
  32. package/lib/build/provider/mtx-sidecar/index.js +17 -11
  33. package/lib/build/provider/nodejs/index.js +14 -13
  34. package/lib/build/util.js +5 -0
  35. package/lib/client/auth_manager.js +6 -12
  36. package/lib/client/base_command.js +1 -1
  37. package/lib/client/download_legacy.js +43 -0
  38. package/lib/client/params.js +6 -0
  39. package/lib/client/push.js +41 -1
  40. package/lib/client/settings_manager.js +28 -17
  41. package/lib/compile/openapi/csdl2openapi.js +1 -1
  42. package/lib/env/schema.js +36 -0
  43. package/lib/env/schemas/cds-rc.json +101 -0
  44. package/lib/import/common.js +23 -10
  45. package/lib/import/importapi.js +2 -2
  46. package/lib/import/message.js +3 -1
  47. package/lib/import/odata/v4parser.js +23 -7
  48. package/lib/index.js +11 -0
  49. package/lib/init/constants.js +5 -2
  50. package/lib/init/index.js +2 -3
  51. package/lib/init/template/_merging/registry-mta.js +33 -0
  52. package/lib/init/template/approuter/files/mta.yaml.hbs +1 -1
  53. package/lib/init/template/approuter/index.js +9 -9
  54. package/lib/init/template/connectivity/index.js +5 -4
  55. package/lib/init/template/destination/index.js +2 -5
  56. package/lib/init/template/helm/subcharts/content-deployment/Chart.yaml +4 -4
  57. package/lib/init/template/helm/subcharts/content-deployment/templates/_helpers.tpl +4 -2
  58. package/lib/init/template/helm/subcharts/content-deployment/templates/job.yaml +4 -3
  59. package/lib/init/template/helm/subcharts/content-deployment/values.schema.json +9 -83
  60. package/lib/init/template/helm/subcharts/content-deployment/values.yaml +54 -15
  61. package/lib/init/template/helm/subcharts/service-instance/Chart.yaml +4 -4
  62. package/lib/init/template/helm/subcharts/service-instance/templates/serviceinstance.yaml +1 -1
  63. package/lib/init/template/helm/subcharts/service-instance/values.schema.json +0 -17
  64. package/lib/init/template/helm/subcharts/service-instance/values.yaml +28 -0
  65. package/lib/init/template/helm/subcharts/web-application/Chart.yaml +5 -5
  66. package/lib/init/template/helm/subcharts/web-application/templates/_api.tpl +60 -0
  67. package/lib/init/template/helm/subcharts/web-application/templates/_helpers.tpl +34 -73
  68. package/lib/init/template/helm/subcharts/web-application/templates/api-rule.yaml +4 -4
  69. package/lib/init/template/helm/subcharts/web-application/templates/deployment.yaml +96 -17
  70. package/lib/init/template/helm/subcharts/web-application/templates/network-policy.yaml +19 -3
  71. package/lib/init/template/helm/subcharts/web-application/templates/pod-disruption-budget.yaml +3 -3
  72. package/lib/init/template/helm/subcharts/web-application/templates/rbac.yaml +26 -0
  73. package/lib/init/template/helm/subcharts/web-application/templates/secret.yaml +1 -1
  74. package/lib/init/template/helm/subcharts/web-application/templates/service-account.yaml +1 -1
  75. package/lib/init/template/helm/subcharts/web-application/templates/service-binding.yaml +1 -1
  76. package/lib/init/template/helm/subcharts/web-application/templates/service.yaml +21 -3
  77. package/lib/init/template/helm/subcharts/web-application/templates/virtual-service.yaml +36 -0
  78. package/lib/init/template/helm/subcharts/web-application/values.schema.json +535 -142
  79. package/lib/init/template/helm/subcharts/web-application/values.yaml +168 -44
  80. package/lib/init/template/html5-repo/index.js +27 -3
  81. package/lib/init/template/mta/index.js +9 -3
  82. package/lib/init/template/nodejs/files/.vscode/launch.json +0 -3
  83. package/lib/init/template/notifications/files/mta.yaml.hbs +17 -0
  84. package/lib/init/template/notifications/files/notificationtypes.json.hbs +16 -0
  85. package/lib/init/template/notifications/files/package.json.hbs +14 -0
  86. package/lib/init/template/notifications/index.js +52 -0
  87. package/lib/init/template/postgres/files/mta.yaml.hbs +27 -0
  88. package/lib/init/template/postgres/files/package.json.hbs +5 -0
  89. package/lib/init/template/postgres/index.js +52 -0
  90. package/lib/init/util/projectReader.js +0 -1
  91. package/lib/util/pruneAxiosErrors.js +25 -8
  92. package/lib/util/term.js +1 -2
  93. package/lib/watch/livereload-server.js +38 -2
  94. package/lib/watch/node-watch.js +3 -2
  95. package/npm-shrinkwrap.json +334 -335
  96. package/package.json +2 -2
  97. package/lib/init/template/helm/subcharts/content-deployment/templating.md +0 -37
  98. package/lib/init/template/helm/subcharts/content-deployment/values-lint.yaml +0 -5
  99. package/lib/init/template/helm/subcharts/content-deployment/values.md +0 -1011
  100. package/lib/init/template/helm/subcharts/service-instance/templating.md +0 -18
  101. package/lib/init/template/helm/subcharts/service-instance/values-lint.yaml +0 -2
  102. package/lib/init/template/helm/subcharts/service-instance/values.md +0 -186
  103. package/lib/init/template/helm/subcharts/web-application/templating.md +0 -51
  104. package/lib/init/template/helm/subcharts/web-application/values-lint.yaml +0 -8
  105. package/lib/init/template/helm/subcharts/web-application/values.md +0 -1363
@@ -91,7 +91,7 @@ async function cds_import_from_openapi(filepath, options = {}) {
91
91
  filepath = await common.isValidInputFile(path.resolve(process.cwd(), filepath));
92
92
  const src = await common.getContentFromFile(filepath);
93
93
  let csn = openapi.openAPI2csn(src);
94
- options.inputFileVersion = 'rest';
94
+ options.inputFileKind = 'rest';
95
95
  return csn;
96
96
  }
97
97
 
@@ -106,6 +106,6 @@ async function cds_import_from_asyncapi(filepath, options = {}) {
106
106
  filepath = await common.isValidInputFile(path.resolve(process.cwd(), filepath));
107
107
  const src = await common.getContentFromFile(filepath);
108
108
  let csn = asyncapi.asyncapi2csn(src);
109
- options.inputFileVersion = 'odata';
109
+ options.inputFileKind = 'odata';
110
110
  return csn;
111
111
  }
@@ -34,7 +34,9 @@ const messages = {
34
34
  BINARY_MAXLENGTH: 'WARNING: MaxLength for type Edm.Binary should not exceed 5000.',
35
35
  SCALE_GT_PRECISION: 'WARNING: Scale value should not be greater than Precision value.',
36
36
  FIXED_PRECISION_VARIABLE_SCALE: 'WARNING: Fixed Precision with Variable or Floating Scale is not supported in CDS.',
37
- NULLABLE_KEY: 'WARNING: Key element cannot be Nullable.'
37
+ NULLABLE_KEY: 'WARNING: Key element cannot be Nullable.',
38
+ COLLISION_DETECTED: `INFO: Element name collision detected. Adding suffix to affected type category.`,
39
+ SPECIFY_CONFIG: 'For --config option, please specify correct JSON Object.',
38
40
  };
39
41
 
40
42
  function getMessages() {
@@ -9,7 +9,7 @@ let common = require("../common");
9
9
  let versionInfo = require("../../../package.json").version;
10
10
  let Multimap = require("./util/MultiMap");
11
11
  const ignoreObjects = ["$Reference"]; // add all the objects that needs to be ignored for parsing.
12
- const { warn } = require("../../util/term");
12
+ const { warn, info } = require("../../util/term");
13
13
  const MetadataConverterFactory = require("./metadataconverter/MetadataConverterFactory");
14
14
 
15
15
  const edmPrimitiveTypes = [
@@ -1216,6 +1216,12 @@ function _parseAnnotations(schemaAnnotations, csnDefs, parserContext) {
1216
1216
  });
1217
1217
  }
1218
1218
 
1219
+ function _addSuffixForCollisionTypes(fqName, suffix) {
1220
+ console.log(info(`INFO: Due to collision in ${fqName} suffix "${suffix}" is added.`));
1221
+ const suffixedFqElementName = (fqName + suffix);
1222
+ return suffixedFqElementName;
1223
+ }
1224
+
1219
1225
  function _parseEntityContainer(csnDefs, entityContainerElements, parserContext) {
1220
1226
  const entityContainerElementNames = Object.keys(entityContainerElements);
1221
1227
  const redundantElementNames = [];
@@ -1241,16 +1247,26 @@ function _parseEntityContainer(csnDefs, entityContainerElements, parserContext)
1241
1247
  let fqDefRefName = _resolveAliasedElementName(definitionRefName, parserContext);
1242
1248
  let fqElementName = parserContext.primarySchema + "." + ecElement;
1243
1249
 
1244
- /**
1245
- * For now we don't support the collision between entitycontainer element name
1246
- * and any of the schema elemetents like entitytype, complextype, etc.
1247
- * TODO: In future we might have to support it.
1248
- */
1249
1250
  if (csnDefs[fqElementName] && csnDefs[fqElementName].kind !== kind) {
1250
- throw new Error(messages.ELEMENT_NAME_COLLISION + ecElement);
1251
+ console.log(info(messages.COLLISION_DETECTED));
1252
+ let suffixedFqElementName;
1253
+ // Check the type category that experienced the collision
1254
+ if (parserContext.complexTypes.includes(fqElementName)) {
1255
+ suffixedFqElementName = _addSuffixForCollisionTypes(fqElementName, "_ComplexType");
1256
+ } else if (parserContext.enumTypes.includes(fqElementName)) {
1257
+ suffixedFqElementName = _addSuffixForCollisionTypes(fqElementName, "_EnumType");
1258
+ } else if (parserContext.typeDefinitions.includes(fqElementName)) {
1259
+ suffixedFqElementName = _addSuffixForCollisionTypes(fqElementName, "_TypeDefinition");
1260
+ }
1261
+ // copy the definition with new suffixed name and delete the old definition from csnDefs
1262
+ csnDefs[suffixedFqElementName] = csnDefs[fqElementName];
1263
+ delete csnDefs[fqElementName];
1251
1264
  }
1252
1265
 
1253
1266
  if (fqElementName !== fqDefRefName) {
1267
+ if (csnDefs[fqElementName] && !parserContext.entityToEntitySetMap.get(fqElementName)) {
1268
+ fqElementName = _addSuffixForCollisionTypes(fqElementName, "_EntityType");
1269
+ }
1254
1270
  csnDefs[fqElementName] = Object.assign({}, csnDefs[fqDefRefName]);
1255
1271
  /**
1256
1272
  * Capture all the defintion reference element name which are no
package/lib/index.js CHANGED
@@ -18,3 +18,14 @@ cds.extend (cds.compile.to.constructor) .with (class {
18
18
  if (cds.compile.to.constructor.name === 'Object') { // not a class as in cds 7
19
19
  cds.compile.to.xsuaa = require('./compile/to-xsuaa')
20
20
  }
21
+
22
+ cds.schema = cds.schema || {} // backward compatibility
23
+ cds.extend (cds.schema) .with ( {
24
+ overlay4: require('./env/schema')
25
+ })
26
+
27
+ // set build API, potentially removing the old API facade from sap/cds 7
28
+ delete cds.__proto__?.build
29
+ cds.extend (cds.constructor) .with (class {
30
+ get build() { return super.build = require('./build') }
31
+ })
@@ -4,7 +4,7 @@ module.exports = {
4
4
  COMMAND_INIT: 'init',
5
5
  COMMAND_ADD: 'add',
6
6
 
7
- MAVEN_ARCHETYPE_VERSION: '2.2.0',
7
+ MAVEN_ARCHETYPE_VERSION: '2.3.0',
8
8
 
9
9
  OPTIONS: Object.freeze({
10
10
  JAVA: 'java',
@@ -24,6 +24,7 @@ module.exports = {
24
24
  EXTENSIBILITY: 'extensibility',
25
25
  XSUAA: 'xsuaa',
26
26
  HANA: 'hana',
27
+ POSTGRES: 'postgres',
27
28
  SQLITE: 'sqlite',
28
29
  H2: 'h2',
29
30
  ENTERPRISE_MESSAGING: 'enterprise-messaging',
@@ -38,7 +39,9 @@ module.exports = {
38
39
  LINT_GLOBAL: 'lint:global',
39
40
  LINT_DEV: 'lint:dev',
40
41
  HELM: 'helm',
41
- TYPER: 'typer'
42
+ TYPER: 'typer',
43
+ HTML5_REPO: 'html5-repo',
44
+ NOTIFICATIONS: 'notifications'
42
45
  }),
43
46
 
44
47
  PROJECT_TYPE: Object.freeze({ nodejs: 1, java: 2, unknown: 3 }),
package/lib/init/index.js CHANGED
@@ -126,9 +126,8 @@ module.exports = class CDSGenerator {
126
126
  }
127
127
 
128
128
  async stepInit(projectName, options) {
129
-
130
- if (!cds.cli?.command) {
131
- // called from CAP generator
129
+ if (options) {
130
+ // called from CAP generator with options
132
131
  cds.cli = {
133
132
  command: COMMAND_INIT,
134
133
  // keep caller independent from internal names
@@ -112,6 +112,17 @@ const hdiContainer = {
112
112
  }]
113
113
  }
114
114
 
115
+ const notificationTypesDeployer = {
116
+ in: 'modules',
117
+ where: [{
118
+ property: 'name',
119
+ isEqualTo: 'notification-content-deployment'
120
+ }, {
121
+ property: 'type',
122
+ isEqualTo: 'nodejs'
123
+ }]
124
+ }
125
+
115
126
  const serviceManager = {
116
127
  in: 'resources',
117
128
  where: [{
@@ -126,6 +137,25 @@ const serviceManager = {
126
137
  }]
127
138
  }
128
139
 
140
+ const postgres = {
141
+ in: 'resources',
142
+ where: [{
143
+ property: 'parameters.service',
144
+ isEqualTo: 'postgresql-db',
145
+ }]
146
+ }
147
+
148
+ const postgresDeployer = {
149
+ in: 'modules',
150
+ where: [{
151
+ property: 'type',
152
+ isEqualTo: 'nodejs',
153
+ }, {
154
+ property: 'path',
155
+ isEqualTo: 'gen/pg',
156
+ }]
157
+ }
158
+
129
159
  const saasRegistry = {
130
160
  in: 'resources',
131
161
  where: [{
@@ -254,7 +284,10 @@ module.exports = {
254
284
  enterpriseMessaging,
255
285
  hdbDeployer,
256
286
  hdiContainer,
287
+ notificationTypesDeployer,
257
288
  serviceManager,
289
+ postgres,
290
+ postgresDeployer,
258
291
  saasRegistry,
259
292
  redis,
260
293
  srvApi4,
@@ -19,7 +19,7 @@ modules:
19
19
 
20
20
  - name: {{appName}}
21
21
  type: approuter.nodejs
22
- path: {{& approuterPath }}
22
+ path: {{& appPath}}
23
23
  parameters:
24
24
  keep-existing-routes: true
25
25
  disk-quota: 256M
@@ -3,7 +3,7 @@ const { exists } = cds.utils
3
3
  const { join } = require('path')
4
4
  const { readProject } = require('../../util/projectReader')
5
5
  const { mergeJSON, mergeYAML, sort } = require('../../util/merge')
6
- const { XSUAA, KIBANA } = require('../../constants').OPTIONS
6
+ const { XSUAA, KIBANA, HTML5_REPO } = require('../../constants').OPTIONS
7
7
  const {
8
8
  srvNode4, srvJava4, mtxSidecar4, approuter, // Modules
9
9
  xsuaa, // BTP Services
@@ -16,8 +16,7 @@ const { copyAndTrack, parseMd5File, writeMd5File } = require('../../util/md5')
16
16
  module.exports = class ApprouterTemplate extends require('../templateBase') {
17
17
 
18
18
  static hasFacet(env) {
19
- return exists(join(env.folders.app, 'router', 'xs-app.json')) ||
20
- exists(join(env.folders.app, 'xs-app.json'))
19
+ return exists(join(env.folders.app, 'xs-app.json'))
21
20
  }
22
21
 
23
22
  getDependencies() {
@@ -25,20 +24,20 @@ module.exports = class ApprouterTemplate extends require('../templateBase') {
25
24
  }
26
25
 
27
26
  getRelatedFacets() {
28
- return [KIBANA]
27
+ return [KIBANA, HTML5_REPO]
29
28
  }
30
29
 
31
30
  async run() {
32
- const { approuterPath } = await readProject()
33
- const appPackageJSONPath = join(approuterPath, 'package.json')
31
+ const { appPath = 'app' } = await readProject()
32
+ const appPackageJSONPath = join(appPath, 'package.json')
34
33
  await mergeJSON(appPackageJSONPath, join(__dirname, 'files', 'package.json'))
35
34
  await sort(appPackageJSONPath, 'dependencies')
36
- await mergeJSON(join(approuterPath, 'default-env.json'), join(__dirname, 'files', 'default-env.json'))
35
+ await mergeJSON(join(appPath, 'default-env.json'), join(__dirname, 'files', 'default-env.json'))
37
36
  }
38
37
 
39
38
  async runDependentMerging(context = {}) {
40
39
  const project = await readProject()
41
- const { isNodejs, isJava, isExtensible, isMultitenant, hasMta, hasHelm, srvPath, approuterPath } = project
40
+ const { isNodejs, isJava, isExtensible, isMultitenant, hasMta, hasHelm, srvPath, appPath } = project
42
41
 
43
42
  if (hasMta) {
44
43
  const srv = (isNodejs ? srvNode4 : srvJava4)(srvPath)
@@ -115,9 +114,10 @@ module.exports = class ApprouterTemplate extends require('../templateBase') {
115
114
  }
116
115
 
117
116
  if (isIndependentCommand) await writeMd5File(join('chart', '.cds-add-helm-files.md5'), context.newTrackingData);
117
+
118
118
  }
119
119
 
120
- const xsAppPath = join(approuterPath, 'xs-app.json')
120
+ const xsAppPath = join(appPath, 'xs-app.json')
121
121
  const additions = isExtensible ? [{ ...approuterExtensibility, at: 0 }] : []
122
122
  await mergeJSON(xsAppPath, join(__dirname, 'files', 'xs-app.json.hbs'), project, { additions })
123
123
  }
@@ -1,6 +1,6 @@
1
1
  const { join } = require('path')
2
2
  const { readProject } = require('../../util/projectReader')
3
- const { mergeJSON, mergeYAML } = require('../../util/merge')
3
+ const { mergeYAML } = require('../../util/merge')
4
4
  const { copyAndTrack, parseMd5File, writeMd5File } = require('../../util/md5')
5
5
  const { srvJava4, srvNode4, connectivity } = require('../_merging/registry-mta')
6
6
 
@@ -11,9 +11,10 @@ module.exports = class ConnectivityTemplate extends require('../templateBase') {
11
11
  }
12
12
 
13
13
  async run() {
14
- const project = await readProject()
15
- const { configFile } = project
16
- await mergeJSON(configFile, join(__dirname, 'files', 'package.json.hbs'), project)
14
+ // Disable setting cds.requires.connectivity for now.
15
+ // const project = await readProject()
16
+ // const { configFile } = project
17
+ // await mergeJSON(configFile, join(__dirname, 'files', 'package.json.hbs'), project)
17
18
  }
18
19
 
19
20
  async runDependentMerging(context = {}) {
@@ -22,7 +22,7 @@ module.exports = class DestinationTemplate extends require('../templateBase') {
22
22
 
23
23
  async runDependentMerging(context = {}) {
24
24
  const project = await readProject()
25
- const { isJava, hasHelm, hasDestination, hasMta, srvPath, hasHtml5Repo } = project
25
+ const { isJava, hasHelm, hasDestination, hasMta, srvPath } = project
26
26
 
27
27
  if (hasMta) {
28
28
  const srv = (isJava ? srvJava4 : srvNode4)(srvPath)
@@ -36,7 +36,6 @@ module.exports = class DestinationTemplate extends require('../templateBase') {
36
36
 
37
37
  if (hasHelm) {
38
38
  const binding = hasDestination && { srv: { bindings: { destination: { serviceInstanceName: 'destination' }}}}
39
- const html5Binding = hasHtml5Repo && { 'html5-apps-deployer': { bindings: { destination: { serviceInstanceName: 'destination' }}}}
40
39
 
41
40
  //in case facet is being added to the already exisiting charts folder
42
41
  let isIndependentCommand = false
@@ -48,13 +47,11 @@ module.exports = class DestinationTemplate extends require('../templateBase') {
48
47
  join('chart', 'values.yaml'),
49
48
  {
50
49
  ...binding,
51
- ...html5Binding,
52
50
  destination: {
53
51
  serviceOfferingName: 'destination',
54
52
  servicePlanName: 'lite',
55
53
  parameters: {
56
- version: '1.0.0',
57
- ...(hasHtml5Repo) && { HTML5Runtime_enabled: true }
54
+ version: '1.0.0'
58
55
  }
59
56
  }
60
57
  }
@@ -1,7 +1,7 @@
1
1
  apiVersion: v2
2
- name: content-deployment
3
2
  description: A Helm Chart for creating a Content Deployment job
4
- type: application
5
- version: 0.1.0
3
+ name: content-deployment
6
4
  sources:
7
- - "https://github.tools.sap/unified-runtime/content-deployment"
5
+ - https://github.tools.sap/unified-runtime/content-deployment
6
+ type: application
7
+ version: 1.3.0
@@ -118,6 +118,8 @@ Name of the imagePullSecret
118
118
  {{- $ips.global.name }}
119
119
  {{- else if or $ips.local.dockerconfigjson $ips.global.dockerconfigjson }}
120
120
  {{- include "content-deployment.internal.fullname" . }}
121
+ {{- else }}
122
+ {{- "image-pull-secret" }}
121
123
  {{- end }}
122
124
  {{- end }}
123
125
 
@@ -128,9 +130,9 @@ Calculate the final image name
128
130
  {{- $tag := .Values.image.tag | default .Values.global.image.tag | default "latest" }}
129
131
  {{- $registry := .Values.image.registry | default .Values.global.image.registry }}
130
132
  {{- if $registry }}
131
- {{- $registry | trimSuffix "/" }}/{{ .Values.image.repository }}:{{ $tag }}
133
+ {{- $registry | trimSuffix "/" | trimPrefix "https://" }}/{{ .Values.image.repository | trimSuffix "/" }}:{{ $tag }}
132
134
  {{- else }}
133
- {{- .Values.image.repository }}:{{ $tag }}
135
+ {{- .Values.image.repository | trimSuffix "/" | trimPrefix "https://" }}:{{ $tag }}
134
136
  {{- end }}
135
137
  {{- end }}
136
138
 
@@ -50,15 +50,16 @@ spec:
50
50
  drop:
51
51
  - ALL
52
52
  privileged: false
53
+ runAsNonRoot: true
54
+ {{- if .Values.runAsUser }}
55
+ runAsUser: {{ .Values.runAsUser }}
56
+ {{- end }}
53
57
  readOnlyRootFilesystem: false
54
58
  volumeMounts:
55
59
  - mountPath: /tmp
56
60
  name: tmp
57
61
  {{- include "content-deployment.internal.serviceMounts" . | nindent 8 }}
58
62
  restartPolicy: OnFailure
59
- securityContext:
60
- runAsNonRoot: true
61
- runAsUser: 1000
62
63
  volumes:
63
64
  - name: tmp
64
65
  emptyDir: {}