Skip to content

Commit 3d8f200

Browse files
authored
feat: helm chart crossplane-provider-btp-security - SubaccountApiCredential & RoleCollectionAssignment subaccountApiCredentialRef added (#48)
1 parent 7b39f95 commit 3d8f200

File tree

6 files changed

+65
-7
lines changed

6 files changed

+65
-7
lines changed

helm/charts/crossplane-provider-btp-security/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ icon: "https://avatars.githubusercontent.com/u/45158470?s=48&v=4"
1717
# This is the chart version. This version number should be incremented each time you make changes
1818
# to the chart and its templates, including the app version.
1919
# Versions are expected to follow Semantic Versioning (https://semver.org/)
20-
version: 0.0.14
20+
version: 0.0.15
2121
# This is the version number of the application being deployed. This version number should be
2222
# incremented each time you make changes to the application. Versions are not expected to
2323
# follow Semantic Versioning. They should reflect the version the application is using.

helm/charts/crossplane-provider-btp-security/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# crossplane-provider-btp-security
44

5-
![Version: 0.0.14](https://img.shields.io/badge/Version-0.0.14-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)
5+
![Version: 0.0.15](https://img.shields.io/badge/Version-0.0.15-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)
66

77
A Helm Chart to template crossplane manifests to manage BTP resources such as Directory, TrustConfiguration and RoleCollection Assignment on BTP.
88

@@ -23,11 +23,17 @@ A Helm Chart to template crossplane manifests to manage BTP resources such as Di
2323
| globalaccountTrustConfigurations[0].name | string | - | Name of the GlobalaccountTrustConfiguration resource - [CRD Browser](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/GlobalaccountTrustConfiguration/v1alpha1@v1.1.2?path=metadata). |
2424
| globalaccountTrustConfigurations[0].writeConnectionSecretToRef | list | `[]` | optional |
2525
| roleCollectionAssignments | list | object | `roleCollectionAssignments[].` orchestrate [`kind: RoleCollectionAssignment`](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2) of [BTP Accounts](https://help.sap.com/docs/btp/sap-business-technology-platform/account-model). |
26-
| roleCollectionAssignments[0] | object | `{"apiCredentials":[],"btpSapCrossplaneProviderConfigRefName":"","forProvider":[],"name":"","writeConnectionSecretToRef":[]}` | 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)! |
27-
| roleCollectionAssignments[0].apiCredentials | list | `[]` | [apiCredentials](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2) CRD |
26+
| roleCollectionAssignments[0] | object | `{"apiCredentials":[],"btpSapCrossplaneProviderConfigRefName":"","forProvider":[],"name":"","subaccountApiCredentialRef":[],"writeConnectionSecretToRef":[]}` | 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)! |
27+
| roleCollectionAssignments[0].apiCredentials | list | `[]` | optional [apiCredentials](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2) CRD |
2828
| roleCollectionAssignments[0].forProvider | list | `[]` | [forProvider](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2) CRD |
2929
| roleCollectionAssignments[0].name | string | - | Name of the RoleCollectionAssignment resource - [CRD Browser](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2?path=metadata). |
30+
| roleCollectionAssignments[0].subaccountApiCredentialRef | list | `[]` | optional [subaccountApiCredentialRef](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2) CRD |
3031
| roleCollectionAssignments[0].writeConnectionSecretToRef | list | `[]` | optional |
32+
| subaccountApiCredentials | list | object | `subaccountApiCredentials[].` orchestrate [`kind: SubaccountApiCredential`](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/SubaccountApiCredential/v1alpha1@v1.3.0) of [BTP Accounts](https://help.sap.com/docs/btp/sap-business-technology-platform/account-model). |
33+
| subaccountApiCredentials[0] | object | `{"btpSapCrossplaneProviderConfigRefName":"","forProvider":[],"name":"","writeConnectionSecretToRef":[]}` | 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)! |
34+
| subaccountApiCredentials[0].forProvider | list | `[]` | [forProvider](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/SubaccountApiCredential/v1alpha1@v1.3.0) CRD |
35+
| subaccountApiCredentials[0].name | string | - | Name of the GlobalaccountTrustConfiguration resource - [CRD Browser](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/SubaccountApiCredential/v1alpha1@v1.3.0). |
36+
| subaccountApiCredentials[0].writeConnectionSecretToRef | list | `[]` | optional |
3137
| subaccountTrustConfigurations | list | object | `subaccountTrustConfigurations[].` orchestrate [`kind: SubaccountTrustConfiguration`](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/SubaccountTrustConfiguration/v1alpha1@v1.1.2) of [BTP Accounts](https://help.sap.com/docs/btp/sap-business-technology-platform/account-model). |
3238
| subaccountTrustConfigurations[0] | object | `{"btpSapCrossplaneProviderConfigRefName":"","forProvider":[],"name":"","writeConnectionSecretToRef":[]}` | 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)! |
3339
| subaccountTrustConfigurations[0].forProvider | list | `[]` | [forProvider](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/SubaccountTrustConfiguration/v1alpha1@v1.1.2) CRD |

helm/charts/crossplane-provider-btp-security/templates/role-collection-assignment.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ spec:
1717
apiCredentials:
1818
{{- $item.apiCredentials | toYaml | nindent 4 }}
1919
{{- end }}
20+
{{- if $item.subaccountApiCredentialRef}}
21+
subaccountApiCredentialRef:
22+
{{- $item.subaccountApiCredentialRef | toYaml | nindent 4 }}
23+
{{- end }}
2024
{{- if $item.writeConnectionSecretToRef}}
2125
writeConnectionSecretToRef:
2226
{{- $item.writeConnectionSecretToRef | toYaml | nindent 4 }}
2327
{{- end }}
2428
{{- end }}
25-
{{- end }}
29+
{{- end }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- range $item := .Values.subaccountApiCredentials }}
2+
{{- if and ($item) (ne $item.name "") }}
3+
---
4+
apiVersion: security.btp.sap.crossplane.io/v1alpha1
5+
kind: SubaccountApiCredential
6+
metadata:
7+
name: {{required "A valid value is required! (.Values.subaccountApiCredentials[].name)" $item.name | lower }}
8+
labels:
9+
openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}"
10+
openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}"
11+
spec:
12+
providerConfigRef:
13+
name: {{ required "A valid value is required! (.Values.subaccountApiCredentials[].btpSapCrossplaneProviderConfigRefName)" $item.btpSapCrossplaneProviderConfigRefName | lower }}
14+
forProvider:
15+
{{- required "A valid value is required! (.Values.subaccountApiCredentials[].forProvider)" $item.forProvider | toYaml | nindent 4 }}
16+
{{- if $item.writeConnectionSecretToRef}}
17+
writeConnectionSecretToRef:
18+
{{- $item.writeConnectionSecretToRef | toYaml | nindent 4 }}
19+
{{- end }}
20+
{{- end }}
21+
{{- end }}

helm/charts/crossplane-provider-btp-security/values.ci.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ roleCollectionAssignments:
3737
origin: "origin"
3838
roleCollectionName: "roleCollectionName"
3939
userName: "userName"
40+
subaccountApiCredentialRef:
41+
name: "name"
4042
apiCredentials:
4143
env:
4244
name: "name"
@@ -62,4 +64,14 @@ globalaccountTrustConfigurations:
6264
writeConnectionSecretToRef:
6365
name: "name"
6466
namespace: "namespace"
65-
########################################################################################################################
67+
########################################################################################################################
68+
subaccountApiCredentials:
69+
- name: "poc-mcp-btp-kyma"
70+
btpSapCrossplaneProviderConfigRefName: "btpSapCrossplaneProviderConfigRefName"
71+
forProvider:
72+
subaccountRef:
73+
name: poc-mcp-btp-kyma
74+
writeConnectionSecretToRef:
75+
name: xsuaa-creds-my-subaccount
76+
namespace: default
77+
########################################################################################################################

helm/charts/crossplane-provider-btp-security/values.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ roleCollectionAssignments:
2323
name: ""
2424
# -- [forProvider](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2) CRD
2525
forProvider: []
26-
# -- [apiCredentials](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2) CRD
26+
# -- optional [apiCredentials](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2) CRD
2727
apiCredentials: []
28+
# -- optional [subaccountApiCredentialRef](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/RoleCollectionAssignment/v1alpha1@v1.1.2) CRD
29+
subaccountApiCredentialRef: []
2830
# -- optional
2931
writeConnectionSecretToRef: []
3032
########################################################################################################################
@@ -41,3 +43,16 @@ globalaccountTrustConfigurations:
4143
# -- optional
4244
writeConnectionSecretToRef: []
4345
########################################################################################################################
46+
# -- `subaccountApiCredentials[].` orchestrate [`kind: SubaccountApiCredential`](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/SubaccountApiCredential/v1alpha1@v1.3.0) of [BTP Accounts](https://help.sap.com/docs/btp/sap-business-technology-platform/account-model).
47+
# @default -- object
48+
subaccountApiCredentials:
49+
# -- 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)!
50+
- btpSapCrossplaneProviderConfigRefName: ""
51+
# subaccountApiCredentials[0].name -- Name of the GlobalaccountTrustConfiguration resource - [CRD Browser](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/SubaccountApiCredential/v1alpha1@v1.3.0).
52+
# @default -- -
53+
name: ""
54+
# -- [forProvider](https://doc.crds.dev/github.com/SAP/crossplane-provider-btp/security.btp.sap.crossplane.io/SubaccountApiCredential/v1alpha1@v1.3.0) CRD
55+
forProvider: []
56+
# -- optional
57+
writeConnectionSecretToRef: []
58+
########################################################################################################################

0 commit comments

Comments
 (0)