From 43c28232f7ebd9c9a01d41ed1cd2dc14d8302bd5 Mon Sep 17 00:00:00 2001 From: i325261 Date: Fri, 29 May 2026 16:37:36 +0200 Subject: [PATCH 1/2] [Misc] Update CHANGELOG and propagate subscriptionDependency in CAPApplication templates --- CHANGELOG.md | 6 ++++++ lib/util.js | 3 +++ package.json | 2 +- .../expectedChart/templates/cap-operator-cros-ias.yaml | 3 +++ .../expectedChart/templates/cap-operator-cros-svc-ias.yaml | 3 +++ .../expectedChart/templates/cap-operator-cros-svc.yaml | 3 +++ test/files/expectedChart/templates/cap-operator-cros.yaml | 3 +++ .../templates/cap-operator-cros-ias.yaml | 3 +++ .../templates/cap-operator-cros-modified-svc.yaml | 3 +++ .../templates/cap-operator-cros-modified.yaml | 3 +++ .../templates/cap-operator-cros-mta.yaml | 3 +++ .../templates/cap-operator-cros-svc-ias.yaml | 3 +++ .../templates/cap-operator-cros-svc.yaml | 3 +++ .../templates/cap-operator-cros.yaml | 3 +++ 14 files changed, 43 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d2ad20..d53f4e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). The format is based on [Keep a Changelog](http://keepachangelog.com/). +## Version 0.16.1 - 29-May-2026 + +### Fixed + +- `subscriptionDependency` field from `serviceInstances` is now propagated to the `btp.services` section in the CAPApplication template. + ## Version 0.16.0 - 29-May-2026 ### Added diff --git a/lib/util.js b/lib/util.js index 8c9b213..e95ba49 100644 --- a/lib/util.js +++ b/lib/util.js @@ -314,6 +314,9 @@ function writeCAPApplicationCRO(yaml, hasIas, isService) { ' name: {{ $v.name | default "invalidValue" }}', ' {{- end }}', ' secret: {{ $v.secretName | default "invalidValue" }}', + ' {{- if hasKey $serviceInstance "subscriptionDependency" }}', + ' subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }}', + ' {{- end }}', '{{- end }}', '{{- end }}' ]) diff --git a/package.json b/package.json index f8efba9..15893bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cap-js/cap-operator-plugin", - "version": "0.16.0", + "version": "0.16.1", "description": "Add/Build Plugin for CAP Operator", "homepage": "https://github.com/cap-js/cap-operator-plugin/blob/main/README.md", "repository": { diff --git a/test/files/expectedChart/templates/cap-operator-cros-ias.yaml b/test/files/expectedChart/templates/cap-operator-cros-ias.yaml index 9d32442..f938fd5 100644 --- a/test/files/expectedChart/templates/cap-operator-cros-ias.yaml +++ b/test/files/expectedChart/templates/cap-operator-cros-ias.yaml @@ -36,6 +36,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- 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 a8e4ea9..27ba804 100644 --- a/test/files/expectedChart/templates/cap-operator-cros-svc-ias.yaml +++ b/test/files/expectedChart/templates/cap-operator-cros-svc-ias.yaml @@ -33,6 +33,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- diff --git a/test/files/expectedChart/templates/cap-operator-cros-svc.yaml b/test/files/expectedChart/templates/cap-operator-cros-svc.yaml index a8e4ea9..27ba804 100644 --- a/test/files/expectedChart/templates/cap-operator-cros-svc.yaml +++ b/test/files/expectedChart/templates/cap-operator-cros-svc.yaml @@ -33,6 +33,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- diff --git a/test/files/expectedChart/templates/cap-operator-cros.yaml b/test/files/expectedChart/templates/cap-operator-cros.yaml index 9d32442..f938fd5 100644 --- a/test/files/expectedChart/templates/cap-operator-cros.yaml +++ b/test/files/expectedChart/templates/cap-operator-cros.yaml @@ -36,6 +36,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-ias.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-ias.yaml index 8c6b406..a61128a 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-ias.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-ias.yaml @@ -36,6 +36,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- 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 1bc463f..a0252c0 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified-svc.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified-svc.yaml @@ -33,6 +33,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified.yaml index 56f3972..cbea153 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-modified.yaml @@ -36,6 +36,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-mta.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-mta.yaml index 8647427..ab55d89 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-mta.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-mta.yaml @@ -36,6 +36,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- 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 8c8bd6d..0a8f89a 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc-ias.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc-ias.yaml @@ -33,6 +33,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc.yaml index 2a99b6b..a5cff1f 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros-svc.yaml @@ -33,6 +33,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- diff --git a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros.yaml b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros.yaml index f951f7d..931eaf8 100644 --- a/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros.yaml +++ b/test/files/expectedConfigurableTemplatesChart/templates/cap-operator-cros.yaml @@ -36,6 +36,9 @@ spec: name: {{ $v.name | default "invalidValue" }} {{- end }} secret: {{ $v.secretName | default "invalidValue" }} + {{- if hasKey $serviceInstance "subscriptionDependency" }} + subscriptionDependency: {{ get $serviceInstance "subscriptionDependency" }} + {{- end }} {{- end }} {{- end }} --- From ef3a813df9b8ae6eb8283ef82dd971a145bee7d1 Mon Sep 17 00:00:00 2001 From: i325261 Date: Fri, 29 May 2026 16:47:22 +0200 Subject: [PATCH 2/2] Update package-lock.json --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c5f95d..479ec80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cap-js/cap-operator-plugin", - "version": "0.16.0", + "version": "0.16.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cap-js/cap-operator-plugin", - "version": "0.16.0", + "version": "0.16.1", "license": "Apache-2.0", "dependencies": { "enquirer": "^2.4.1",