From a4880dfe0a0f34be458931dc30f2f67eee099bea Mon Sep 17 00:00:00 2001 From: Pavan Date: Fri, 20 Feb 2026 17:08:27 +0100 Subject: [PATCH] [Misc] Plugin: `providerSubaccountId` runtime support added Enhancement to source `providerSubaccountId` at runtime. - misc adjustments until the field becomes mandatory (soon). --- bin/cap-op-plugin.js | 7 +-- files/chart/values.yaml.hbs | 4 +- .../values.yaml.hbs | 4 +- files/runtime-values.yaml.hbs | 1 + lib/util.js | 3 +- test/cap-op-plugin.test.js | 46 +++++++++++-------- .../expectedChart/runtime-values-ias.yaml | 1 + .../expectedChart/runtime-values-svc-ias.yaml | 1 + .../expectedChart/runtime-values-svc.yaml | 1 + test/files/expectedChart/runtime-values.yaml | 1 + .../templates/cap-operator-cros-ias.yaml | 1 + .../templates/cap-operator-cros-svc-ias.yaml | 1 + .../templates/cap-operator-cros-svc.yaml | 1 + .../templates/cap-operator-cros.yaml | 1 + test/files/expectedChart/values-ias.yaml | 1 + test/files/expectedChart/values-svc-ias.yaml | 1 + test/files/expectedChart/values-svc.yaml | 1 + test/files/expectedChart/values.yaml | 1 + .../expectedChart/valuesWithDestination.yaml | 1 + test/files/expectedChart/valuesWithMTA.yaml | 1 + .../runtime-values-ias.yaml | 1 + .../runtime-values-svc.yaml | 1 + .../runtime-values.yaml | 1 + .../templates/cap-operator-cros-ias.yaml | 1 + .../cap-operator-cros-modified-svc.yaml | 1 + .../templates/cap-operator-cros-modified.yaml | 1 + .../templates/cap-operator-cros-mta.yaml | 1 + .../templates/cap-operator-cros-svc-ias.yaml | 1 + .../templates/cap-operator-cros-svc.yaml | 1 + .../templates/cap-operator-cros.yaml | 1 + .../values-ias.yaml | 1 + .../values-modified-svc.yaml | 1 + .../values-modified.yaml | 1 + .../values-svc-ias.yaml | 1 + .../values-svc.yaml | 1 + .../values.yaml | 1 + .../valuesWithMTA.yaml | 1 + test/files/input_values.yaml | 1 + test/files/input_values_wrong.yaml | 1 + .../files/runtime-values-of-simple-chart.yaml | 1 + ...untime-values-of-simple-service-chart.yaml | 1 + test/files/updatedValues.schema.json | 4 +- test/files/values-of-simple-chart-filled.yaml | 1 + ...values-of-simple-service-chart-filled.yaml | 1 + 44 files changed, 79 insertions(+), 27 deletions(-) diff --git a/bin/cap-op-plugin.js b/bin/cap-op-plugin.js index 3aa734f..33d70aa 100755 --- a/bin/cap-op-plugin.js +++ b/bin/cap-op-plugin.js @@ -184,8 +184,8 @@ async function generateRuntimeValues(option, inputYamlPath) { answerStruct = yaml.parse(await cds.utils.read(cds.utils.path.join(cds.root, inputYamlPath))) const requiredFields = isServiceOnly - ? ['appName', 'capOperatorSubdomain', 'clusterDomain', 'globalAccountId'] - : ['appName', 'capOperatorSubdomain', 'clusterDomain', 'globalAccountId', 'providerSubdomain', 'tenantId'] + ? ['appName', 'capOperatorSubdomain', 'clusterDomain', 'globalAccountId', 'providerSubaccountId'] + : ['appName', 'capOperatorSubdomain', 'clusterDomain', 'globalAccountId', 'providerSubaccountId', 'providerSubdomain', 'tenantId'] const missingFields = requiredFields.filter(field => !answerStruct[field]) if (missingFields.length) { @@ -198,6 +198,7 @@ async function generateRuntimeValues(option, inputYamlPath) { ['Enter CAP Operator subdomain (In kyma cluster it is "cap-op" by default): ', 'cap-op', true], ['Enter your cluster shoot domain: ', await getShootDomain(), true], ['Enter your global account ID: ', '', true], + ['Enter your provider sub-account ID: ', '', true], ...isServiceOnly ? [] : [['Enter your provider subdomain: ', '', true]], ...isServiceOnly ? [] : [['Enter your provider tenant ID: ', '', true]], ['Enter your HANA database instance ID: ', '', false], @@ -205,7 +206,7 @@ async function generateRuntimeValues(option, inputYamlPath) { ] const answerKeys = [ - 'appName', 'capOperatorSubdomain', 'clusterDomain', 'globalAccountId', + 'appName', 'capOperatorSubdomain', 'clusterDomain', 'globalAccountId', 'providerSubaccountId', ...isServiceOnly ? [] : ['providerSubdomain'], ...isServiceOnly ? [] : ['tenantId'], 'hanaInstanceId', 'imagePullSecret' diff --git a/files/chart/values.yaml.hbs b/files/chart/values.yaml.hbs index 7e9f118..c9a9e55 100644 --- a/files/chart/values.yaml.hbs +++ b/files/chart/values.yaml.hbs @@ -16,7 +16,9 @@ app: btp: # -- BTP Global account identifier where the application is hosted - globalAccountId: # mandatory let helm fail if not provided + globalAccountId: + # -- BTP Provider sub-account identifier where the application is hosted + providerSubaccountId: {{#isApp}} provider: # -- Subdomain of the provider sub-account where application services are created diff --git a/files/configurableTemplatesChart/values.yaml.hbs b/files/configurableTemplatesChart/values.yaml.hbs index e64b136..32dd55d 100644 --- a/files/configurableTemplatesChart/values.yaml.hbs +++ b/files/configurableTemplatesChart/values.yaml.hbs @@ -16,7 +16,9 @@ app: btp: # -- BTP Global account identifier where the application is hosted - globalAccountId: # mandatory let helm fail if not provided + globalAccountId: + # -- BTP Provider sub-account identifier where the application is hosted + providerSubaccountId: {{#isApp}} provider: # -- Subdomain of the provider sub-account where application services are created diff --git a/files/runtime-values.yaml.hbs b/files/runtime-values.yaml.hbs index 6d185b6..29edd20 100644 --- a/files/runtime-values.yaml.hbs +++ b/files/runtime-values.yaml.hbs @@ -56,6 +56,7 @@ app: btp: globalAccountId: {{globalAccountId}} + providerSubaccountId: {{providerSubaccountId}} {{#isApp}} provider: subdomain: {{providerSubdomain}} diff --git a/lib/util.js b/lib/util.js index 6ae3f41..6d9a2d5 100644 --- a/lib/util.js +++ b/lib/util.js @@ -280,7 +280,8 @@ function writeCAPApplicationCRO(yaml, hasIas, isService) { ' name: {{ .name }}', '{{- end }}', 'btpAppName: {{ include "appName" $ }}', - 'globalAccountId: {{ .Values.btp.globalAccountId }}' + 'globalAccountId: {{ .Values.btp.globalAccountId }}', + 'providerSubaccountId: {{ .Values.btp.providerSubaccountId }}' ]) if (!isService) { diff --git a/test/cap-op-plugin.test.js b/test/cap-op-plugin.test.js index bde8e11..c13d4f5 100644 --- a/test/cap-op-plugin.test.js +++ b/test/cap-op-plugin.test.js @@ -94,10 +94,11 @@ EXAMPLES rlQuestion.onSecondCall().callsArgWith(1, '') rlQuestion.onThirdCall().callsArgWith(1, 'c-abc.kyma.ondemand.com') rlQuestion.onCall(3).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') - rlQuestion.onCall(4).callsArgWith(1, 'bem-aad-sadad-123456789012') - rlQuestion.onCall(5).callsArgWith(1, 'dasdsd-1234-1234-1234-123456789012') - rlQuestion.onCall(6).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') - rlQuestion.onCall(7).callsArgWith(1, 'regcred') + rlQuestion.onCall(4).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') + rlQuestion.onCall(5).callsArgWith(1, 'bem-aad-sadad-123456789012') + rlQuestion.onCall(6).callsArgWith(1, 'dasdsd-1234-1234-1234-123456789012') + rlQuestion.onCall(7).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') + rlQuestion.onCall(8).callsArgWith(1, 'regcred') cds.root = bookshop await capOperatorPlugin('generate-runtime-values') @@ -131,10 +132,11 @@ EXAMPLES rlQuestion.onSecondCall().callsArgWith(1, '') rlQuestion.onThirdCall().callsArgWith(1, 'c-abc.kyma.ondemand.com') rlQuestion.onCall(3).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') - rlQuestion.onCall(4).callsArgWith(1, 'bem-aad-sadad-123456789012') - rlQuestion.onCall(5).callsArgWith(1, 'dasdsd-1234-1234-1234-123456789012') - rlQuestion.onCall(6).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') - rlQuestion.onCall(7).callsArgWith(1, 'regcred') + rlQuestion.onCall(4).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') + rlQuestion.onCall(5).callsArgWith(1, 'bem-aad-sadad-123456789012') + rlQuestion.onCall(6).callsArgWith(1, 'dasdsd-1234-1234-1234-123456789012') + rlQuestion.onCall(7).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') + rlQuestion.onCall(8).callsArgWith(1, 'regcred') cds.root = bookshop await capOperatorPlugin('generate-runtime-values') @@ -157,8 +159,9 @@ EXAMPLES rlQuestion.onSecondCall().callsArgWith(1, '') rlQuestion.onThirdCall().callsArgWith(1, 'c-abc.kyma.ondemand.com') rlQuestion.onCall(3).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') - rlQuestion.onCall(4).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') - rlQuestion.onCall(5).callsArgWith(1, 'regcred') + rlQuestion.onCall(4).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') + rlQuestion.onCall(5).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') + rlQuestion.onCall(6).callsArgWith(1, 'regcred') cds.root = bookshop await capOperatorPlugin('generate-runtime-values') @@ -250,10 +253,11 @@ EXAMPLES rlQuestion.onSecondCall().callsArgWith(1, '') rlQuestion.onThirdCall().callsArgWith(1, 'c-abc.kyma.ondemand.com') rlQuestion.onCall(3).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') - rlQuestion.onCall(4).callsArgWith(1, 'bem-aad-sadad-123456789012') - rlQuestion.onCall(5).callsArgWith(1, 'dasdsd-1234-1234-1234-123456789012') - rlQuestion.onCall(6).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') - rlQuestion.onCall(7).callsArgWith(1, 'regcred') + rlQuestion.onCall(4).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') + rlQuestion.onCall(5).callsArgWith(1, 'bem-aad-sadad-123456789012') + rlQuestion.onCall(6).callsArgWith(1, 'dasdsd-1234-1234-1234-123456789012') + rlQuestion.onCall(7).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') + rlQuestion.onCall(8).callsArgWith(1, 'regcred') cds.root = bookshop await capOperatorPlugin('generate-runtime-values') @@ -277,10 +281,11 @@ EXAMPLES rlQuestion.onSecondCall().callsArgWith(1, '') rlQuestion.onThirdCall().callsArgWith(1, 'c-abc.kyma.ondemand.com') rlQuestion.onCall(3).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') - rlQuestion.onCall(4).callsArgWith(1, 'bem-aad-sadad-123456789012') - rlQuestion.onCall(5).callsArgWith(1, 'dasdsd-1234-1234-1234-123456789012') - rlQuestion.onCall(6).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') - rlQuestion.onCall(7).callsArgWith(1, 'regcred') + rlQuestion.onCall(4).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') + rlQuestion.onCall(5).callsArgWith(1, 'bem-aad-sadad-123456789012') + rlQuestion.onCall(6).callsArgWith(1, 'dasdsd-1234-1234-1234-123456789012') + rlQuestion.onCall(7).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') + rlQuestion.onCall(8).callsArgWith(1, 'regcred') cds.root = bookshop await capOperatorPlugin('generate-runtime-values') @@ -304,8 +309,9 @@ EXAMPLES rlQuestion.onSecondCall().callsArgWith(1, '') rlQuestion.onThirdCall().callsArgWith(1, 'c-abc.kyma.ondemand.com') rlQuestion.onCall(3).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') - rlQuestion.onCall(4).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') - rlQuestion.onCall(5).callsArgWith(1, 'regcred') + rlQuestion.onCall(4).callsArgWith(1, 'dc94db56-asda-adssa-dada-123456789012') + rlQuestion.onCall(5).callsArgWith(1, 'sdasd-4c4d-4d4d-4d4d-123456789012') + rlQuestion.onCall(6).callsArgWith(1, 'regcred') cds.root = bookshop await capOperatorPlugin('generate-runtime-values') diff --git a/test/files/expectedChart/runtime-values-ias.yaml b/test/files/expectedChart/runtime-values-ias.yaml index 07ddbc6..b58a43d 100644 --- a/test/files/expectedChart/runtime-values-ias.yaml +++ b/test/files/expectedChart/runtime-values-ias.yaml @@ -28,6 +28,7 @@ app: app: istio-ingressgateway btp: globalAccountId: dc94db56-asda-adssa-dada-123456789012 + providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 provider: subdomain: bem-aad-sadad-123456789012 tenantId: dasdsd-1234-1234-1234-123456789012 diff --git a/test/files/expectedChart/runtime-values-svc-ias.yaml b/test/files/expectedChart/runtime-values-svc-ias.yaml index 9561c60..64d887a 100644 --- a/test/files/expectedChart/runtime-values-svc-ias.yaml +++ b/test/files/expectedChart/runtime-values-svc-ias.yaml @@ -16,6 +16,7 @@ app: app: istio-ingressgateway btp: globalAccountId: dc94db56-asda-adssa-dada-123456789012 + providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 imagePullSecrets: - regcred workloads: diff --git a/test/files/expectedChart/runtime-values-svc.yaml b/test/files/expectedChart/runtime-values-svc.yaml index e6c8290..82d40e9 100644 --- a/test/files/expectedChart/runtime-values-svc.yaml +++ b/test/files/expectedChart/runtime-values-svc.yaml @@ -11,6 +11,7 @@ app: app: istio-ingressgateway btp: globalAccountId: dc94db56-asda-adssa-dada-123456789012 + providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 imagePullSecrets: - regcred workloads: diff --git a/test/files/expectedChart/runtime-values.yaml b/test/files/expectedChart/runtime-values.yaml index 050bee5..a8094fa 100644 --- a/test/files/expectedChart/runtime-values.yaml +++ b/test/files/expectedChart/runtime-values.yaml @@ -20,6 +20,7 @@ app: app: istio-ingressgateway btp: globalAccountId: dc94db56-asda-adssa-dada-123456789012 + providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 provider: subdomain: bem-aad-sadad-123456789012 tenantId: dasdsd-1234-1234-1234-123456789012 diff --git a/test/files/expectedChart/templates/cap-operator-cros-ias.yaml b/test/files/expectedChart/templates/cap-operator-cros-ias.yaml index 0b786c6..ad5fb47 100644 --- a/test/files/expectedChart/templates/cap-operator-cros-ias.yaml +++ b/test/files/expectedChart/templates/cap-operator-cros-ias.yaml @@ -18,6 +18,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} provider: subDomain: {{ .Values.btp.provider.subdomain }} tenantId: {{ .Values.btp.provider.tenantId }} diff --git a/test/files/expectedChart/templates/cap-operator-cros-svc-ias.yaml b/test/files/expectedChart/templates/cap-operator-cros-svc-ias.yaml index fbfec8f..d2e64d9 100644 --- a/test/files/expectedChart/templates/cap-operator-cros-svc-ias.yaml +++ b/test/files/expectedChart/templates/cap-operator-cros-svc-ias.yaml @@ -18,6 +18,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} btp: services: {{- $serviceInstances := .Values.serviceInstances }} diff --git a/test/files/expectedChart/templates/cap-operator-cros-svc.yaml b/test/files/expectedChart/templates/cap-operator-cros-svc.yaml index da4c8ee..491aab8 100644 --- a/test/files/expectedChart/templates/cap-operator-cros-svc.yaml +++ b/test/files/expectedChart/templates/cap-operator-cros-svc.yaml @@ -13,6 +13,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} btp: services: {{- $serviceInstances := .Values.serviceInstances }} diff --git a/test/files/expectedChart/templates/cap-operator-cros.yaml b/test/files/expectedChart/templates/cap-operator-cros.yaml index 679ca82..0a1f498 100644 --- a/test/files/expectedChart/templates/cap-operator-cros.yaml +++ b/test/files/expectedChart/templates/cap-operator-cros.yaml @@ -13,6 +13,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} provider: subDomain: {{ .Values.btp.provider.subdomain }} tenantId: {{ .Values.btp.provider.tenantId }} diff --git a/test/files/expectedChart/values-ias.yaml b/test/files/expectedChart/values-ias.yaml index b9ee4dd..a5f7a44 100644 --- a/test/files/expectedChart/values-ias.yaml +++ b/test/files/expectedChart/values-ias.yaml @@ -103,6 +103,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null provider: subdomain: null tenantId: null diff --git a/test/files/expectedChart/values-svc-ias.yaml b/test/files/expectedChart/values-svc-ias.yaml index 4294176..0475110 100644 --- a/test/files/expectedChart/values-svc-ias.yaml +++ b/test/files/expectedChart/values-svc-ias.yaml @@ -65,6 +65,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null imagePullSecrets: [] workloads: server: diff --git a/test/files/expectedChart/values-svc.yaml b/test/files/expectedChart/values-svc.yaml index 9e0a926..be42e5b 100644 --- a/test/files/expectedChart/values-svc.yaml +++ b/test/files/expectedChart/values-svc.yaml @@ -60,6 +60,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null imagePullSecrets: [] workloads: server: diff --git a/test/files/expectedChart/values.yaml b/test/files/expectedChart/values.yaml index 614b165..92652ec 100644 --- a/test/files/expectedChart/values.yaml +++ b/test/files/expectedChart/values.yaml @@ -94,6 +94,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null provider: subdomain: null tenantId: null diff --git a/test/files/expectedChart/valuesWithDestination.yaml b/test/files/expectedChart/valuesWithDestination.yaml index 614b165..92652ec 100644 --- a/test/files/expectedChart/valuesWithDestination.yaml +++ b/test/files/expectedChart/valuesWithDestination.yaml @@ -94,6 +94,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null provider: subdomain: null tenantId: null diff --git a/test/files/expectedChart/valuesWithMTA.yaml b/test/files/expectedChart/valuesWithMTA.yaml index 2012d88..0974cf4 100644 --- a/test/files/expectedChart/valuesWithMTA.yaml +++ b/test/files/expectedChart/valuesWithMTA.yaml @@ -120,6 +120,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null provider: subdomain: null tenantId: null diff --git a/test/files/expectedConfigurableTemplatesChart/runtime-values-ias.yaml b/test/files/expectedConfigurableTemplatesChart/runtime-values-ias.yaml index ba79d0d..eb50f3b 100644 --- a/test/files/expectedConfigurableTemplatesChart/runtime-values-ias.yaml +++ b/test/files/expectedConfigurableTemplatesChart/runtime-values-ias.yaml @@ -28,6 +28,7 @@ app: app: istio-ingressgateway btp: globalAccountId: dc94db56-asda-adssa-dada-123456789012 + providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 provider: subdomain: bem-aad-sadad-123456789012 tenantId: dasdsd-1234-1234-1234-123456789012 diff --git a/test/files/expectedConfigurableTemplatesChart/runtime-values-svc.yaml b/test/files/expectedConfigurableTemplatesChart/runtime-values-svc.yaml index 123db5e..4bd636c 100644 --- a/test/files/expectedConfigurableTemplatesChart/runtime-values-svc.yaml +++ b/test/files/expectedConfigurableTemplatesChart/runtime-values-svc.yaml @@ -11,6 +11,7 @@ app: app: istio-ingressgateway btp: globalAccountId: dc94db56-asda-adssa-dada-123456789012 + providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 imagePullSecrets: - regcred hanaInstanceId: sdasd-4c4d-4d4d-4d4d-123456789012 diff --git a/test/files/expectedConfigurableTemplatesChart/runtime-values.yaml b/test/files/expectedConfigurableTemplatesChart/runtime-values.yaml index de7f7ed..a46ea22 100644 --- a/test/files/expectedConfigurableTemplatesChart/runtime-values.yaml +++ b/test/files/expectedConfigurableTemplatesChart/runtime-values.yaml @@ -20,6 +20,7 @@ app: app: istio-ingressgateway btp: globalAccountId: dc94db56-asda-adssa-dada-123456789012 + providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 provider: subdomain: bem-aad-sadad-123456789012 tenantId: dasdsd-1234-1234-1234-123456789012 diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-ias.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-ias.yaml index fab18c6..7ddb3bb 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-ias.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-ias.yaml @@ -18,6 +18,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} provider: subDomain: {{ .Values.btp.provider.subdomain }} tenantId: {{ .Values.btp.provider.tenantId }} diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified-svc.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified-svc.yaml index 38832bf..c36be6d 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified-svc.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified-svc.yaml @@ -13,6 +13,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} btp: services: {{- $serviceInstances := .Values.serviceInstances }} diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified.yaml index 88cd34a..3521819 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified.yaml @@ -13,6 +13,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} provider: subDomain: {{ .Values.btp.provider.subdomain }} tenantId: {{ .Values.btp.provider.tenantId }} diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-mta.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-mta.yaml index 67f096d..8341b38 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-mta.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-mta.yaml @@ -13,6 +13,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} provider: subDomain: {{ .Values.btp.provider.subdomain }} tenantId: {{ .Values.btp.provider.tenantId }} diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc-ias.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc-ias.yaml index 51f77d1..c8a0a39 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc-ias.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc-ias.yaml @@ -18,6 +18,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} btp: services: {{- $serviceInstances := .Values.serviceInstances }} diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc.yaml index e53bb93..54d1e24 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc.yaml @@ -13,6 +13,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} btp: services: {{- $serviceInstances := .Values.serviceInstances }} diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros.yaml index 20c988b..3d04886 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros.yaml @@ -13,6 +13,7 @@ spec: {{- end }} btpAppName: {{ include "appName" $ }} globalAccountId: {{ .Values.btp.globalAccountId }} + providerSubaccountId: {{ .Values.btp.providerSubaccountId }} provider: subDomain: {{ .Values.btp.provider.subdomain }} tenantId: {{ .Values.btp.provider.tenantId }} diff --git a/test/files/expectedConfigurableTemplatesChart/values-ias.yaml b/test/files/expectedConfigurableTemplatesChart/values-ias.yaml index c58ca43..fdc5b51 100644 --- a/test/files/expectedConfigurableTemplatesChart/values-ias.yaml +++ b/test/files/expectedConfigurableTemplatesChart/values-ias.yaml @@ -103,6 +103,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null provider: subdomain: null tenantId: null diff --git a/test/files/expectedConfigurableTemplatesChart/values-modified-svc.yaml b/test/files/expectedConfigurableTemplatesChart/values-modified-svc.yaml index 8d4e74a..6adcc8b 100644 --- a/test/files/expectedConfigurableTemplatesChart/values-modified-svc.yaml +++ b/test/files/expectedConfigurableTemplatesChart/values-modified-svc.yaml @@ -60,6 +60,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null imagePullSecrets: [] workloads: server: diff --git a/test/files/expectedConfigurableTemplatesChart/values-modified.yaml b/test/files/expectedConfigurableTemplatesChart/values-modified.yaml index cb430eb..0020bba 100644 --- a/test/files/expectedConfigurableTemplatesChart/values-modified.yaml +++ b/test/files/expectedConfigurableTemplatesChart/values-modified.yaml @@ -94,6 +94,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null provider: subdomain: null tenantId: null diff --git a/test/files/expectedConfigurableTemplatesChart/values-svc-ias.yaml b/test/files/expectedConfigurableTemplatesChart/values-svc-ias.yaml index 264bcf1..41608f5 100644 --- a/test/files/expectedConfigurableTemplatesChart/values-svc-ias.yaml +++ b/test/files/expectedConfigurableTemplatesChart/values-svc-ias.yaml @@ -65,6 +65,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null imagePullSecrets: [] hanaInstanceId: null workloads: diff --git a/test/files/expectedConfigurableTemplatesChart/values-svc.yaml b/test/files/expectedConfigurableTemplatesChart/values-svc.yaml index 36cb949..1050305 100644 --- a/test/files/expectedConfigurableTemplatesChart/values-svc.yaml +++ b/test/files/expectedConfigurableTemplatesChart/values-svc.yaml @@ -60,6 +60,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null imagePullSecrets: [] hanaInstanceId: null workloads: diff --git a/test/files/expectedConfigurableTemplatesChart/values.yaml b/test/files/expectedConfigurableTemplatesChart/values.yaml index b1f3533..ed0521f 100644 --- a/test/files/expectedConfigurableTemplatesChart/values.yaml +++ b/test/files/expectedConfigurableTemplatesChart/values.yaml @@ -94,6 +94,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null provider: subdomain: null tenantId: null diff --git a/test/files/expectedConfigurableTemplatesChart/valuesWithMTA.yaml b/test/files/expectedConfigurableTemplatesChart/valuesWithMTA.yaml index c7fe38b..8baf049 100644 --- a/test/files/expectedConfigurableTemplatesChart/valuesWithMTA.yaml +++ b/test/files/expectedConfigurableTemplatesChart/valuesWithMTA.yaml @@ -120,6 +120,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null provider: subdomain: null tenantId: null diff --git a/test/files/input_values.yaml b/test/files/input_values.yaml index eeae9af..49ecd60 100644 --- a/test/files/input_values.yaml +++ b/test/files/input_values.yaml @@ -2,6 +2,7 @@ appName: bkshop capOperatorSubdomain: cap-op clusterDomain: c-abc.kyma.ondemand.com globalAccountId: dc94db56-asda-adssa-dada-123456789012 +providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 providerSubdomain: bem-aad-sadad-123456789012 tenantId: dasdsd-1234-1234-1234-123456789012 imagePullSecret: regcred diff --git a/test/files/input_values_wrong.yaml b/test/files/input_values_wrong.yaml index 7c64ebe..d679040 100644 --- a/test/files/input_values_wrong.yaml +++ b/test/files/input_values_wrong.yaml @@ -1,6 +1,7 @@ capOperatorSubdomain: cap-op clusterDomain: c-abc.kyma.ondemand.com globalAccountId: dc94db56-asda-adssa-dada-123456789012 +providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 providerSubdomain: bem-aad-sadad-123456789012 tenantId: dasdsd-1234-1234-1234-123456789012 imagePullSecret: regcred diff --git a/test/files/runtime-values-of-simple-chart.yaml b/test/files/runtime-values-of-simple-chart.yaml index 050bee5..a8094fa 100644 --- a/test/files/runtime-values-of-simple-chart.yaml +++ b/test/files/runtime-values-of-simple-chart.yaml @@ -20,6 +20,7 @@ app: app: istio-ingressgateway btp: globalAccountId: dc94db56-asda-adssa-dada-123456789012 + providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 provider: subdomain: bem-aad-sadad-123456789012 tenantId: dasdsd-1234-1234-1234-123456789012 diff --git a/test/files/runtime-values-of-simple-service-chart.yaml b/test/files/runtime-values-of-simple-service-chart.yaml index e6c8290..82d40e9 100644 --- a/test/files/runtime-values-of-simple-service-chart.yaml +++ b/test/files/runtime-values-of-simple-service-chart.yaml @@ -11,6 +11,7 @@ app: app: istio-ingressgateway btp: globalAccountId: dc94db56-asda-adssa-dada-123456789012 + providerSubaccountId: dc94db56-asda-adssa-dada-123456789012 imagePullSecrets: - regcred workloads: diff --git a/test/files/updatedValues.schema.json b/test/files/updatedValues.schema.json index e7e8923..955d5cf 100644 --- a/test/files/updatedValues.schema.json +++ b/test/files/updatedValues.schema.json @@ -2373,12 +2373,14 @@ }, "provider": { "$ref": "#/$defs/provider" + }, + "providerSubaccountId": { + "type": "string" } }, "additionalProperties": false, "type": "object", "required": [ - "globalAccountId", "provider" ] }, diff --git a/test/files/values-of-simple-chart-filled.yaml b/test/files/values-of-simple-chart-filled.yaml index 303fab4..2bfa6b9 100644 --- a/test/files/values-of-simple-chart-filled.yaml +++ b/test/files/values-of-simple-chart-filled.yaml @@ -94,6 +94,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null provider: subdomain: null tenantId: null diff --git a/test/files/values-of-simple-service-chart-filled.yaml b/test/files/values-of-simple-service-chart-filled.yaml index 426d401..f199c17 100644 --- a/test/files/values-of-simple-service-chart-filled.yaml +++ b/test/files/values-of-simple-service-chart-filled.yaml @@ -60,6 +60,7 @@ app: app: istio-ingressgateway btp: globalAccountId: null + providerSubaccountId: null imagePullSecrets: [] workloads: server: