Skip to content

Commit 51a5c98

Browse files
ricogusk31337
andauthored
feat: crossplane-provider-sap-btp-environment - kymaEnvironmentBinding added (#25)
--------- Co-authored-by: ricogu <ricogu@users.noreply.github.com> Co-authored-by: Steffen <5519671+sk31337@users.noreply.github.com> Co-authored-by: Steffen Brunner <steffen.brunner@sap.com> Co-authored-by: sk31337 <sk31337@users.noreply.github.com>
1 parent 65c0e12 commit 51a5c98

File tree

5 files changed

+63
-3
lines changed

5 files changed

+63
-3
lines changed

helm/charts/crossplane-provider-sap-btp-environment/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.15
20+
version: 0.0.16
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-sap-btp-environment/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# crossplane-provider-sap-btp-environment
44

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: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square)
5+
![Version: 0.0.16](https://img.shields.io/badge/Version-0.0.16-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square)
66

77
A Helm Chart to template crossplane manifests to manage Cloud Foundry or BTP Kyma environments on BTP.
88

@@ -21,6 +21,13 @@ A Helm Chart to template crossplane manifests to manage Cloud Foundry or BTP Kym
2121
| cloudFoundryEnvironments | list | object | cloudFoundryEnvironments contains configuration of [cloudfoundry Environments](https://pages.github.tools.sap/cloud-orchestration/browser/Providers/provider-btp-account/environment.btp.sap.crossplane.io/cloudfoundryenvironment/v1alpha1). |
2222
| cloudFoundryEnvironments[0] | object | `{"btpSapCrossplaneProviderConfigRefName":"","cloudManagementRef":{"name":"dev-eu01"},"forProvider":{"initialOrgManagers":[""],"landscape":""},"name":"","subaccountRef":{"name":"dev-eu01"},"writeConnectionSecretToRef":[]}` | btpSapCrossplaneProviderConfigRefName defines crossplane provider configuration reference name (identifier) of a ...! |
2323
| cloudFoundryEnvironments[0].writeConnectionSecretToRef | list | `[]` | *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)! |
24+
| kymaEnvironmentBindings[0].btpSapCrossplaneProviderConfigRefName | string | `""` | |
25+
| kymaEnvironmentBindings[0].cloudManagementRef.name | string | `"dev-eu01"` | |
26+
| kymaEnvironmentBindings[0].forProvider.rotationInterval | string | `"6h"` | |
27+
| kymaEnvironmentBindings[0].forProvider.ttl | string | `"8h"` | |
28+
| kymaEnvironmentBindings[0].kymaEnvironmentRef.name | string | `"my-kyma-instance"` | |
29+
| kymaEnvironmentBindings[0].name | string | `""` | |
30+
| 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)! |
2431
| kymaEnvironments[0].btpSapCrossplaneProviderConfigRefName | string | `""` | |
2532
| kymaEnvironments[0].cloudManagementRef.name | string | `"dev-eu01"` | |
2633
| kymaEnvironments[0].forProvider.administrators[0] | string | `"...@sap.com"` | |
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{- range $item := .Values.kymaEnvironmentBindings }}
2+
{{- if and ($item) (ne $item.name "") }}
3+
---
4+
apiVersion: environment.btp.sap.crossplane.io/v1alpha1
5+
kind: KymaEnvironmentBinding
6+
metadata:
7+
name: {{required "A valid value is required! (.Values.kymaEnvironmentBindings[].btpSapCrossplaneProviderConfigRefName)" $item.btpSapCrossplaneProviderConfigRefName | lower }}-{{required "A valid value is required! (.Values.kymaEnvironments[].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.kymaEnvironments[].btpSapCrossplaneProviderConfigRefName)" $item.btpSapCrossplaneProviderConfigRefName }}
14+
forProvider:
15+
{{ required "A valid value is required! (.Values.kymaEnvironmentBindings[].forProvider)" $item.forProvider | toYaml | nindent 4 }}
16+
cloudManagementRef:
17+
{{ required "A valid value is required! (.Values.kymaEnvironmentBindings[].cloudManagementRef)" $item.cloudManagementRef | toYaml | nindent 4 }}
18+
kymaEnvironmentRef:
19+
name: {{required "A valid value is required! (.Values.kymaEnvironmentBindings[].kymaEnvironmentRef.name)" $item.kymaEnvironmentRef.name }}
20+
{{- if $item.writeConnectionSecretToRef}}
21+
writeConnectionSecretToRef:
22+
{{- $item.writeConnectionSecretToRef | toYaml | nindent 4 }}
23+
{{- end }}
24+
{{- end }}
25+
{{- end }}

helm/charts/crossplane-provider-sap-btp-environment/values.ci.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,17 @@ kymaEnvironments:
4444
writeConnectionSecretToRef:
4545
name: "demo-kyma-kubeconfig-local"
4646
namespace: "default"
47-
########################################################################################################################
47+
########################################################################################################################
48+
kymaEnvironmentBindings:
49+
- btpSapCrossplaneProviderConfigRefName: "btpSapCrossplaneProviderConfigRefName"
50+
name: "name"
51+
kymaEnvironmentRef:
52+
name: "my-kyma-instance"
53+
forProvider:
54+
rotationInterval: "6h"
55+
ttl: "8h"
56+
cloudManagementRef:
57+
name: "dev-eu01"
58+
writeConnectionSecretToRef:
59+
name: "demo-kyma-binding-local"
60+
namespace: "default"

helm/charts/crossplane-provider-sap-btp-environment/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,18 @@ kymaEnvironments:
4848
name: "demo-kyma-kubeconfig-local"
4949
namespace: "default"
5050
########################################################################################################################
51+
kymaEnvironmentBindings:
52+
- btpSapCrossplaneProviderConfigRefName: ""
53+
name: ""
54+
kymaEnvironmentRef:
55+
name: "my-kyma-instance"
56+
forProvider:
57+
rotationInterval: "6h"
58+
ttl: "8h"
59+
cloudManagementRef:
60+
name: "dev-eu01"
61+
# -- *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.
62+
# 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)!
63+
writeConnectionSecretToRef:
64+
name: "demo-kyma-binding-local"
65+
namespace: "default"

0 commit comments

Comments
 (0)