From 5ce33f4b17fe79b45efcb612e8d14b6d4eae861d Mon Sep 17 00:00:00 2001 From: Yuanxun Gu Date: Mon, 25 Aug 2025 15:38:04 +0200 Subject: [PATCH 1/8] feat: add kymaModules configuration for KymaModule kind in values files --- .../templates/kyma-modules.yaml | 15 +++++++++++++++ .../values.ci.yaml | 6 ++++++ .../values.yaml | 7 ++++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml diff --git a/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml b/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml new file mode 100644 index 0000000..4e2f683 --- /dev/null +++ b/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml @@ -0,0 +1,15 @@ +{{- range $item := .Values.kymaModules }} + {{- if and ($item) (ne $item.name "") }} +--- +apiVersion: environment.btp.sap.crossplane.io/v1alpha1 +kind: KymaModule +metadata: + name: aas-adapter-dev-{{required "A valid value is required! (.Values.kymaModules[].moduleName)" $item.moduleName}} +spec: + kymaEnvironmentBindingRef: + name: {{ required "A valid value is required! (.Values.kymaModules[].kymaEnvironmentBinding)" $item.kymaEnvironmentBinding }} + forProvider: + name: api-gateway + channel: {{ required "A valid value is required! (.Values.kymaModules[].releaseChannel)" $item.releaseChannel }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml b/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml index 764bfb8..f86d3d2 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml +++ b/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml @@ -58,3 +58,9 @@ kymaEnvironmentBindings: writeConnectionSecretToRef: name: "demo-kyma-binding-local" namespace: "default" +######################################################################################################################## +# -- kymaModules contains configuration of kind: KymaModule. +kymaModules: + - moduleName: "test-module" + kymaEnvironmentBinding: "test-binding" + releaseChannel: "regular" diff --git a/helm/charts/crossplane-provider-sap-btp-environment/values.yaml b/helm/charts/crossplane-provider-sap-btp-environment/values.yaml index 30f13a8..8c4a3fd 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/values.yaml +++ b/helm/charts/crossplane-provider-sap-btp-environment/values.yaml @@ -65,4 +65,9 @@ kymaEnvironmentBindings: writeConnectionSecretToRef: name: "demo-kyma-binding-local" namespace: "default" -######################################################################################################################## \ No newline at end of file +######################################################################################################################## +# -- kymaModules contains configuration of kind: KymaModule. +kymaModules: + - moduleName: "test-module" + kymaEnvironmentBinding: "" + releaseChannel: "regular" \ No newline at end of file From 604ed8b7a05fe25ea34c782328717fcc8f231543 Mon Sep 17 00:00:00 2001 From: ricogu Date: Mon, 25 Aug 2025 13:39:21 +0000 Subject: [PATCH 2/8] chore(ci): update helm/charts/crossplane-provider-sap-btp-environment/Chart.yaml.version 0.0.19 -> 0.0.20 --- helm/charts/crossplane-provider-sap-btp-environment/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/charts/crossplane-provider-sap-btp-environment/Chart.yaml b/helm/charts/crossplane-provider-sap-btp-environment/Chart.yaml index d78db77..776a10e 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/Chart.yaml +++ b/helm/charts/crossplane-provider-sap-btp-environment/Chart.yaml @@ -17,7 +17,7 @@ icon: "https://avatars.githubusercontent.com/u/45158470?s=48&v=4" # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.19 +version: 0.0.20 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. From 9269597b8ac75709dc4a90edf1e230425dfc10e0 Mon Sep 17 00:00:00 2001 From: ricogu Date: Mon, 25 Aug 2025 13:39:22 +0000 Subject: [PATCH 3/8] chore(ci): update Helm Chart helm/charts/crossplane-provider-sap-btp-environment/README.md file --- helm/charts/crossplane-provider-sap-btp-environment/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helm/charts/crossplane-provider-sap-btp-environment/README.md b/helm/charts/crossplane-provider-sap-btp-environment/README.md index bfbf195..b4af57e 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/README.md +++ b/helm/charts/crossplane-provider-sap-btp-environment/README.md @@ -2,7 +2,7 @@ # crossplane-provider-sap-btp-environment -![Version: 0.0.19](https://img.shields.io/badge/Version-0.0.19-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.2](https://img.shields.io/badge/AppVersion-1.1.2-informational?style=flat-square) +![Version: 0.0.20](https://img.shields.io/badge/Version-0.0.20-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.2](https://img.shields.io/badge/AppVersion-1.1.2-informational?style=flat-square) A Helm Chart to template crossplane manifests to manage Cloud Foundry or BTP Kyma environments on BTP. @@ -24,6 +24,7 @@ A Helm Chart to template crossplane manifests to manage Cloud Foundry or BTP Kym | kymaEnvironmentBindings[0].writeConnectionSecretToRef | object | `{"name":"demo-kyma-binding-local","namespace":"default"}` | *optional* - When a Crossplane Provider creates a managed resource it may generate resource-specific details, like usernames, passwords or connection details like an IP address. Crossplane stores these details in a Kubernetes Secret object specified by the `writeConnectionSecretToRef` values. Learn more about Crossplane concept [Managed Resources Fields](https://docs.crossplane.io/latest/concepts/managed-resources/#writeconnectionsecrettoref)! | | kymaEnvironments | list | `[{"btpSapCrossplaneProviderConfigRefName":"","cloudManagementRef":{"name":"dev-eu01"},"forProvider":{"administrators":["...@sap.com"],"autoScalerMax":3,"autoScalerMin":3,"machineType":"m5.xlarge","oidc":{"clientID":"","groupsClaim":"groups","issuerURL":"https://.accounts400.ondemand.com","signingAlgs":["RS256"],"usernameClaim":"email","usernamePrefix":"-"},"parameters":null,"region":"eu-west-2"},"name":"","planName":"aws","subaccountRef":{"name":"dev-eu01"},"writeConnectionSecretToRef":{"name":"demo-kyma-kubeconfig-local","namespace":"default"}}]` | kymaEnvironments contains configuration of [kind: KymaEnvironment](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/environment.btp.sap.crossplane.io/KymaEnvironment/v1alpha1@v1.1.2). | | kymaEnvironments[0].writeConnectionSecretToRef | object | `{"name":"demo-kyma-kubeconfig-local","namespace":"default"}` | *optional* - When a Crossplane Provider creates a managed resource it may generate resource-specific details, like usernames, passwords or connection details like an IP address. Crossplane stores these details in a Kubernetes Secret object specified by the `writeConnectionSecretToRef` values. Learn more about Crossplane concept [Managed Resources Fields](https://docs.crossplane.io/latest/concepts/managed-resources/#writeconnectionsecrettoref)! | +| kymaModules | list | `[{"kymaEnvironmentBinding":"","moduleName":"test-module","releaseChannel":"regular"}]` | kymaModules contains configuration of kind: KymaModule. | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) \ No newline at end of file From 63e4286fcd2af1aaebcb3784e0da8f132178f0d1 Mon Sep 17 00:00:00 2001 From: Yuanxun Gu Date: Mon, 25 Aug 2025 16:28:41 +0200 Subject: [PATCH 4/8] feat: update kymaModules configuration to use 'name' and 'forProvider' fields --- .../templates/kyma-modules.yaml | 5 ++--- .../crossplane-provider-sap-btp-environment/values.ci.yaml | 6 ++++-- .../crossplane-provider-sap-btp-environment/values.yaml | 6 ++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml b/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml index 4e2f683..720f52d 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml +++ b/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml @@ -4,12 +4,11 @@ apiVersion: environment.btp.sap.crossplane.io/v1alpha1 kind: KymaModule metadata: - name: aas-adapter-dev-{{required "A valid value is required! (.Values.kymaModules[].moduleName)" $item.moduleName}} + name: {{required "A valid value is required! (.Values.kymaModules[].name)" $item.name }} spec: kymaEnvironmentBindingRef: name: {{ required "A valid value is required! (.Values.kymaModules[].kymaEnvironmentBinding)" $item.kymaEnvironmentBinding }} forProvider: - name: api-gateway - channel: {{ required "A valid value is required! (.Values.kymaModules[].releaseChannel)" $item.releaseChannel }} + {{- toYaml $item.forProvider | nindent 4 }} {{- end }} {{- end }} \ No newline at end of file diff --git a/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml b/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml index f86d3d2..3423c44 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml +++ b/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml @@ -61,6 +61,8 @@ kymaEnvironmentBindings: ######################################################################################################################## # -- kymaModules contains configuration of kind: KymaModule. kymaModules: - - moduleName: "test-module" + - name: "test-name" kymaEnvironmentBinding: "test-binding" - releaseChannel: "regular" + forProvider: + name: "api-gateway" + releaseChannel: "regular" diff --git a/helm/charts/crossplane-provider-sap-btp-environment/values.yaml b/helm/charts/crossplane-provider-sap-btp-environment/values.yaml index 8c4a3fd..49243d3 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/values.yaml +++ b/helm/charts/crossplane-provider-sap-btp-environment/values.yaml @@ -68,6 +68,8 @@ kymaEnvironmentBindings: ######################################################################################################################## # -- kymaModules contains configuration of kind: KymaModule. kymaModules: - - moduleName: "test-module" + - name: "" kymaEnvironmentBinding: "" - releaseChannel: "regular" \ No newline at end of file + forProvider: + name: "api-gateway" + releaseChannel: "regular" \ No newline at end of file From 582e799d332dabe628d8fa5ad123bff3f3199fbe Mon Sep 17 00:00:00 2001 From: ricogu Date: Mon, 25 Aug 2025 14:29:12 +0000 Subject: [PATCH 5/8] chore(ci): update Helm Chart helm/charts/crossplane-provider-sap-btp-environment/README.md file --- helm/charts/crossplane-provider-sap-btp-environment/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/charts/crossplane-provider-sap-btp-environment/README.md b/helm/charts/crossplane-provider-sap-btp-environment/README.md index b4af57e..488a9ee 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/README.md +++ b/helm/charts/crossplane-provider-sap-btp-environment/README.md @@ -24,7 +24,7 @@ A Helm Chart to template crossplane manifests to manage Cloud Foundry or BTP Kym | kymaEnvironmentBindings[0].writeConnectionSecretToRef | object | `{"name":"demo-kyma-binding-local","namespace":"default"}` | *optional* - When a Crossplane Provider creates a managed resource it may generate resource-specific details, like usernames, passwords or connection details like an IP address. Crossplane stores these details in a Kubernetes Secret object specified by the `writeConnectionSecretToRef` values. Learn more about Crossplane concept [Managed Resources Fields](https://docs.crossplane.io/latest/concepts/managed-resources/#writeconnectionsecrettoref)! | | kymaEnvironments | list | `[{"btpSapCrossplaneProviderConfigRefName":"","cloudManagementRef":{"name":"dev-eu01"},"forProvider":{"administrators":["...@sap.com"],"autoScalerMax":3,"autoScalerMin":3,"machineType":"m5.xlarge","oidc":{"clientID":"","groupsClaim":"groups","issuerURL":"https://.accounts400.ondemand.com","signingAlgs":["RS256"],"usernameClaim":"email","usernamePrefix":"-"},"parameters":null,"region":"eu-west-2"},"name":"","planName":"aws","subaccountRef":{"name":"dev-eu01"},"writeConnectionSecretToRef":{"name":"demo-kyma-kubeconfig-local","namespace":"default"}}]` | kymaEnvironments contains configuration of [kind: KymaEnvironment](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/environment.btp.sap.crossplane.io/KymaEnvironment/v1alpha1@v1.1.2). | | kymaEnvironments[0].writeConnectionSecretToRef | object | `{"name":"demo-kyma-kubeconfig-local","namespace":"default"}` | *optional* - When a Crossplane Provider creates a managed resource it may generate resource-specific details, like usernames, passwords or connection details like an IP address. Crossplane stores these details in a Kubernetes Secret object specified by the `writeConnectionSecretToRef` values. Learn more about Crossplane concept [Managed Resources Fields](https://docs.crossplane.io/latest/concepts/managed-resources/#writeconnectionsecrettoref)! | -| kymaModules | list | `[{"kymaEnvironmentBinding":"","moduleName":"test-module","releaseChannel":"regular"}]` | kymaModules contains configuration of kind: KymaModule. | +| kymaModules | list | `[{"forProvider":{"name":"api-gateway","releaseChannel":"regular"},"kymaEnvironmentBinding":"","name":""}]` | kymaModules contains configuration of kind: KymaModule. | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) \ No newline at end of file From 30256cc36d9f948dcd489a4c4c03eceed6fd0a4d Mon Sep 17 00:00:00 2001 From: Yuanxun Gu Date: Mon, 25 Aug 2025 16:30:06 +0200 Subject: [PATCH 6/8] feat: enforce required validation for 'forProvider' field in kymaModules configuration --- .../templates/kyma-modules.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml b/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml index 720f52d..f52681b 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml +++ b/helm/charts/crossplane-provider-sap-btp-environment/templates/kyma-modules.yaml @@ -9,6 +9,6 @@ spec: kymaEnvironmentBindingRef: name: {{ required "A valid value is required! (.Values.kymaModules[].kymaEnvironmentBinding)" $item.kymaEnvironmentBinding }} forProvider: - {{- toYaml $item.forProvider | nindent 4 }} + {{- required "A valid value is required! (.Values.kymaModules[].forProvider)" $item.forProvider | toYaml | trim | nindent 4 }} {{- end }} {{- end }} \ No newline at end of file From f09f7d3fad7271ee7180904e195b15a2ef6b5eec Mon Sep 17 00:00:00 2001 From: Yuanxun Gu Date: Mon, 25 Aug 2025 16:39:15 +0200 Subject: [PATCH 7/8] feat: rename 'releaseChannel' to 'channel' in kymaModules configuration --- .../crossplane-provider-sap-btp-environment/values.ci.yaml | 2 +- helm/charts/crossplane-provider-sap-btp-environment/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml b/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml index 3423c44..531ea74 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml +++ b/helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml @@ -65,4 +65,4 @@ kymaModules: kymaEnvironmentBinding: "test-binding" forProvider: name: "api-gateway" - releaseChannel: "regular" + channel: "regular" diff --git a/helm/charts/crossplane-provider-sap-btp-environment/values.yaml b/helm/charts/crossplane-provider-sap-btp-environment/values.yaml index 49243d3..58681d4 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/values.yaml +++ b/helm/charts/crossplane-provider-sap-btp-environment/values.yaml @@ -72,4 +72,4 @@ kymaModules: kymaEnvironmentBinding: "" forProvider: name: "api-gateway" - releaseChannel: "regular" \ No newline at end of file + channel: "regular" \ No newline at end of file From 11d5dcbb5ed46b3aa68879f02185c3994d45a736 Mon Sep 17 00:00:00 2001 From: ricogu Date: Mon, 25 Aug 2025 14:39:40 +0000 Subject: [PATCH 8/8] chore(ci): update Helm Chart helm/charts/crossplane-provider-sap-btp-environment/README.md file --- helm/charts/crossplane-provider-sap-btp-environment/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/charts/crossplane-provider-sap-btp-environment/README.md b/helm/charts/crossplane-provider-sap-btp-environment/README.md index 488a9ee..57cc6c6 100644 --- a/helm/charts/crossplane-provider-sap-btp-environment/README.md +++ b/helm/charts/crossplane-provider-sap-btp-environment/README.md @@ -24,7 +24,7 @@ A Helm Chart to template crossplane manifests to manage Cloud Foundry or BTP Kym | kymaEnvironmentBindings[0].writeConnectionSecretToRef | object | `{"name":"demo-kyma-binding-local","namespace":"default"}` | *optional* - When a Crossplane Provider creates a managed resource it may generate resource-specific details, like usernames, passwords or connection details like an IP address. Crossplane stores these details in a Kubernetes Secret object specified by the `writeConnectionSecretToRef` values. Learn more about Crossplane concept [Managed Resources Fields](https://docs.crossplane.io/latest/concepts/managed-resources/#writeconnectionsecrettoref)! | | kymaEnvironments | list | `[{"btpSapCrossplaneProviderConfigRefName":"","cloudManagementRef":{"name":"dev-eu01"},"forProvider":{"administrators":["...@sap.com"],"autoScalerMax":3,"autoScalerMin":3,"machineType":"m5.xlarge","oidc":{"clientID":"","groupsClaim":"groups","issuerURL":"https://.accounts400.ondemand.com","signingAlgs":["RS256"],"usernameClaim":"email","usernamePrefix":"-"},"parameters":null,"region":"eu-west-2"},"name":"","planName":"aws","subaccountRef":{"name":"dev-eu01"},"writeConnectionSecretToRef":{"name":"demo-kyma-kubeconfig-local","namespace":"default"}}]` | kymaEnvironments contains configuration of [kind: KymaEnvironment](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/environment.btp.sap.crossplane.io/KymaEnvironment/v1alpha1@v1.1.2). | | kymaEnvironments[0].writeConnectionSecretToRef | object | `{"name":"demo-kyma-kubeconfig-local","namespace":"default"}` | *optional* - When a Crossplane Provider creates a managed resource it may generate resource-specific details, like usernames, passwords or connection details like an IP address. Crossplane stores these details in a Kubernetes Secret object specified by the `writeConnectionSecretToRef` values. Learn more about Crossplane concept [Managed Resources Fields](https://docs.crossplane.io/latest/concepts/managed-resources/#writeconnectionsecrettoref)! | -| kymaModules | list | `[{"forProvider":{"name":"api-gateway","releaseChannel":"regular"},"kymaEnvironmentBinding":"","name":""}]` | kymaModules contains configuration of kind: KymaModule. | +| kymaModules | list | `[{"forProvider":{"channel":"regular","name":"api-gateway"},"kymaEnvironmentBinding":"","name":""}]` | kymaModules contains configuration of kind: KymaModule. | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) \ No newline at end of file