Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helm/charts/crossplane-provider-sap-btp-account/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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.12
version: 0.0.13
# 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.
Expand Down
4 changes: 2 additions & 2 deletions helm/charts/crossplane-provider-sap-btp-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# crossplane-provider-sap-btp-account

![Version: 0.0.12](https://img.shields.io/badge/Version-0.0.12-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.13](https://img.shields.io/badge/Version-0.0.13-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 SAP BTP resources.

Expand All @@ -18,7 +18,7 @@ A Helm chart to template crossplane manifests to manage SAP BTP resources.
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| accounts | list | {} | accounts contains information and configuration about a specifig [BTP Global Account](https://help.sap.com/docs/btp/sap-business-technology-platform/getting-global-account). :exclamation::exclamation: Managing BTP Global Accounts is NOT possible at the moment :exclamation::exclamation: |
| accounts[0] | object | `{"btpSapCrossplaneProviderConfigRefName":"","subAccounts":[{"entitlements":[{"amount":0,"name":"","permitNumericQuota":false,"serviceName":"","servicePlanName":""}],"forProvider":{"betaEnabled":null,"description":"","displayName":"","region":"eu01","subaccountAdmins":["[email protected]"],"subdomain":"dev-eu01","usedForProduction":"NOT_USED_FOR_PRODUCTION"},"metadata":{"annotations":{"CloudManagement":{"crossplane.io/external-name":"..."},"ServiceManager":{"crossplane.io/external-name":"..."}}},"name":"","services":{"cloudManagement":false,"serviceManager":false},"subscriptions":[{"appName":"","name":"","parameters":{},"planName":"","writeConnectionSecretToRef":{"name":"","namespace":"ns1"}}]}]}` | btpSapCrossplaneProviderConfigRefName defines crossplane provider configuration reference name (identifier) of a [BTP Global Account](https://help.sap.com/docs/btp/sap-business-technology-platform/getting-global-account)! |
| accounts[0] | object | `{"btpSapCrossplaneProviderConfigRefName":"","subAccounts":[{"entitlements":[{"amount":0,"name":"","permitNumericQuota":false,"serviceName":"","servicePlanName":""}],"forProvider":{"betaEnabled":null,"description":"","displayName":"","region":"eu01","subaccountAdmins":["[email protected]"],"subdomain":"dev-eu01","usedForProduction":"NOT_USED_FOR_PRODUCTION"},"metadata":{"annotations":{"CloudManagement":{"crossplane.io/external-name":"..."},"ServiceManager":{"crossplane.io/external-name":"..."}}},"name":"","services":{"cloudManagement":false,"cloudManagementConfiguration":{"writeConnectionSecretToRef":{}},"serviceManager":false,"serviceManagerConfiguration":{"writeConnectionSecretToRef":{}}},"subscriptions":[{"appName":"","name":"","parameters":{},"planName":"","writeConnectionSecretToRef":{"name":"","namespace":"ns1"}}]}]}` | btpSapCrossplaneProviderConfigRefName defines crossplane provider configuration reference name (identifier) of a [BTP Global Account](https://help.sap.com/docs/btp/sap-business-technology-platform/getting-global-account)! |
| accounts[0].subAccounts | list | {} | subAccounts contains information and configuration about [BTP Sub-Accounts](https://help.sap.com/docs/btp/sap-business-technology-platform/account-model#loio8d6e3a0fa4ab43e4a421d3ed08128afa). |
| accounts[0].subAccounts[0].entitlements | list | {} | entitlements defines [BTP Entitlements](https://help.sap.com/docs/btp/sap-business-technology-platform/entitlements-and-quotas) for this [BTP Sub-Account](https://help.sap.com/docs/btp/sap-business-technology-platform/account-model#loio8d6e3a0fa4ab43e4a421d3ed08128afa). Learn more about managing BTP Entitlement with crossplane [here](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/account.btp.sap.crossplane.io/Entitlement/[email protected]). |
| accounts[0].subAccounts[0].entitlements[0].amount | int | `0` | Used when permitNumericQuota=true. Only set amount for multitenant applications and services that do not permit a numeric quota assignment! |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ spec:
name: {{required "A valid value is required! (.Values.accounts[].subAccounts[].name)" $item.name | lower }}
subaccountRef:
name: {{required "A valid value is required! (.Values.accounts[].subAccounts[].name)" $item.name | lower }}
{{- if and $item.services.cloudManagementConfiguration $item.services.cloudManagementConfiguration.writeConnectionSecretToRef }}
writeConnectionSecretToRef: {{- $item.services.cloudManagementConfiguration.writeConnectionSecretToRef | toYaml | nindent 4 }}
{{- else }}
writeConnectionSecretToRef:
name: cis-{{required "A valid value is required! (.Values.accounts[].btpSapCrossplaneProviderConfigRefName)" $account.btpSapCrossplaneProviderConfigRefName | lower }}-{{required "A valid value is required! (.Values.accounts[].subAccounts[].name)" $item.name | lower }}
namespace: default
namespace: default
{{- end}}
{{- end }}
{{- end }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ metadata:
openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}"
{{- template "ServiceManager.annotations" $item }}
spec:
{{- if and $item.services.serviceManagerConfiguration $item.services.serviceManagerConfiguration.writeConnectionSecretToRef }}
writeConnectionSecretToRef: {{- $item.services.serviceManagerConfiguration.writeConnectionSecretToRef | toYaml | nindent 4 }}
{{- else }}
writeConnectionSecretToRef:
# !!! TODO: Make this configurable !!!
name: btp-service-manager-{{required "A valid value is required! (.Values.accounts[].btpSapCrossplaneProviderConfigRefName)" $account.btpSapCrossplaneProviderConfigRefName}}-{{required "A valid value is required! (.Values.accounts[].subAccounts[].name)" $item.name | lower }}
# !!! TODO: Make this configurable !!!
name: btp-service-manager-{{ required "A valid value is required! (.Values.accounts[].btpSapCrossplaneProviderConfigRefName)" $account.btpSapCrossplaneProviderConfigRefName }}-{{ required "A valid value is required! (.Values.accounts[].subAccounts[].name)" $item.name | lower }}
namespace: default
{{- end }}
forProvider:
subaccountRef:
name: {{required "A valid value is required! (.Values.accounts[].subAccounts[].name)" $item.name | lower }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,15 @@ accounts:
- [email protected]
services:
serviceManager: true
serviceManagerConfiguration:
writeConnectionSecretToRef:
name: btp-service-manager-test
namespace: test-namespace
cloudManagement: true
cloudManagementConfiguration:
writeConnectionSecretToRef:
name: cis-test
namespace: test-namespace
entitlements:
- name: "entitlement-1"
serviceName: "service-name"
Expand Down
4 changes: 4 additions & 0 deletions helm/charts/crossplane-provider-sap-btp-account/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ accounts:
# Please make sure the P/I/D users, used in the Secrets referenced in the `ProviderConfig` are part of your Subaccount's `subaccountAdmins``.
# Note: updating subaccountAdmins on an existing Subaccount is not yet supported by the provider. We are aware of this issue.
serviceManager: false
serviceManagerConfiguration:
writeConnectionSecretToRef: {}
# -- Enable/Disable (true/false) BTP Cloud Management Service.
cloudManagement: false
cloudManagementConfiguration:
writeConnectionSecretToRef: {}
# -- entitlements defines [BTP Entitlements](https://help.sap.com/docs/btp/sap-business-technology-platform/entitlements-and-quotas) for this [BTP Sub-Account](https://help.sap.com/docs/btp/sap-business-technology-platform/account-model#loio8d6e3a0fa4ab43e4a421d3ed08128afa).
# Learn more about managing BTP Entitlement with crossplane [here](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/account.btp.sap.crossplane.io/Entitlement/[email protected]).
# @default -- {}
Expand Down