diff --git a/helm/charts/crossplane-provider-cloudfoundry/.ci.config.yaml b/helm/charts/crossplane-provider-cloudfoundry/.ci.config.yaml new file mode 100644 index 0000000..ea4fde3 --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/.ci.config.yaml @@ -0,0 +1,21 @@ +# pipeline feature flags obsolete (Bash Scripts) + +jfrog.sh: + enabled: true + + +# pipeline feature flags +yamllint: + enable: true +helm-docs: + enable: true +helm-chart-linting: + enable: true +helm-chart-validation: + enable: true +helm-chart-version-bump: + enable: true +helm-chart-dependency-update: + enable: true +k8s-manifest-templating: + enable: false \ No newline at end of file diff --git a/helm/charts/crossplane-provider-cloudfoundry/Chart.yaml b/helm/charts/crossplane-provider-cloudfoundry/Chart.yaml new file mode 100644 index 0000000..e2902f8 --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +appVersion: 0.3.0 +description: A Helm Chart to template crossplane manifests to manage BTP Cloud Foundry + resources on BTP. +icon: https://avatars.githubusercontent.com/u/45158470?s=48&v=4 +name: crossplane-provider-cloudfoundry +sources: + - https://github.com/openmcp-project/blueprint-building-blocks +type: application +version: 0.1.0 + diff --git a/helm/charts/crossplane-provider-cloudfoundry/README.md b/helm/charts/crossplane-provider-cloudfoundry/README.md new file mode 100644 index 0000000..daaa168 --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/README.md @@ -0,0 +1,31 @@ + + +# crossplane-provider-cloudfoundry + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.3.0](https://img.shields.io/badge/AppVersion-0.3.0-informational?style=flat-square) + +A Helm Chart to template crossplane manifests to manage BTP Cloud Foundry resources on BTP. + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| apps | list | object | `apps[].` orchestrate `kind: App` of BTP Cloud foundry. | +| orgMembers | list | `[{"cloudfoundryProviderConfigRefName":"","forProvider":[],"name":""}]` | `orgMembers[].` orchestrate `kind: OrgMembers` of BTP Cloud foundry. | +| organizations | list | `[{"cloudfoundryProviderConfigRefName":"","externalName":"","forProvider":[],"name":""}]` | `organizations[].` orchestrate `kind: Organization` of BTP Cloud foundry. | +| organizations[0].externalName | string | `""` | must match the actual name of the Cloud Foundry organization in BTP! | +| routes | list | `[{"cloudfoundryProviderConfigRefName":"","forProvider":[],"name":""}]` | `routes[].` orchestrate `kind: Route` of BTP Cloud foundry. | +| secrets[0].data | list | `[]` | *(optional)* [data](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/) *(map[string][]byte)* Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in [here](https://tools.ietf.org/html/rfc4648#section-4) | +| secrets[0].name | string | `""` | defines k8s `metadata.name` value of `kind: Secret` | +| secrets[0].namespace | string | `""` | *(optional)* defines k8s [`metadata.namespace`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: Secret` | +| secrets[0].stringData | list | `[]` | *(optional)* [stringData](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/) *(map[string]string)* allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. | +| serviceCredentialsBindings | list | `[{"cloudfoundryProviderConfigRefName":"","forProvider":[],"name":""}]` | `serviceCredentialsBindings[].` orchestrate `kind: ServiceKey` of BTP Cloud foundry. | +| serviceInstances | list | `[{"cloudfoundryProviderConfigRefName":"","forProvider":[],"name":""}]` | `serviceInstances[].` orchestrate `kind: ServiceInstance` of BTP Cloud foundry. | +| spaceMembers | list | `[{"cloudfoundryProviderConfigRefName":"","forProvider":[],"name":""}]` | `spaceMembers[].` orchestrate `kind: SpaceMembers` of BTP Cloud foundry. | + +---------------------------------------------- +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 diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/NOTES.txt b/helm/charts/crossplane-provider-cloudfoundry/templates/NOTES.txt new file mode 100644 index 0000000..e69de29 diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/app.yaml b/helm/charts/crossplane-provider-cloudfoundry/templates/app.yaml new file mode 100644 index 0000000..c7eafec --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/templates/app.yaml @@ -0,0 +1,17 @@ +{{- range $item := .Values.apps }} + {{- if and ($item) (ne $item.name "") }} +--- +apiVersion: cloudfoundry.crossplane.io/v1alpha1 +kind: App +metadata: + name: {{required "A valid value is required! (.Values.apps[].name)" $item.name | lower }} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" +spec: + providerConfigRef: + name: {{required "A valid value is required! (.Values.apps[].cloudfoundryProviderConfigRefName)" $item.cloudfoundryProviderConfigRefName }} + forProvider: + {{- required "A valid value is required! (.Values.spaces[].forProvider)" $item.forProvider | toYaml | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/org-members.yaml b/helm/charts/crossplane-provider-cloudfoundry/templates/org-members.yaml new file mode 100644 index 0000000..5dcb6aa --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/templates/org-members.yaml @@ -0,0 +1,17 @@ +{{- range $item := .Values.orgMembers }} + {{- if and ($item) (ne $item.name "") }} +--- +apiVersion: cloudfoundry.crossplane.io/v1alpha1 +kind: OrgMembers +metadata: + name: {{required "A valid value is required! (.Values.orgMembers[].name)" $item.name | lower }} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" +spec: + providerConfigRef: + name: {{required "A valid value is required! (.Values.orgMembers[].cloudfoundryProviderConfigRefName)" $item.cloudfoundryProviderConfigRefName }} + forProvider: + {{- required "A valid value is required! (.Values.spaces[].forProvider)" $item.forProvider | toYaml | nindent 4 }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/organization.yaml b/helm/charts/crossplane-provider-cloudfoundry/templates/organization.yaml new file mode 100644 index 0000000..5c36dbd --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/templates/organization.yaml @@ -0,0 +1,19 @@ +{{- range $item := .Values.organizations }} + {{- if and ($item) (ne $item.name "") }} +--- +apiVersion: cloudfoundry.crossplane.io/v1alpha1 +kind: Organization +metadata: + name: {{required "A valid value is required! (.Values.organizations[].name)" $item.name | lower }} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" + annotations: + crossplane.io/external-name: {{required "A valid value is required! (.Values.organizations[].externalName)" $item.externalName }} +spec: + providerConfigRef: + name: {{required "A valid value is required! (.Values.apps[].cloudfoundryProviderConfigRefName)" $item.cloudfoundryProviderConfigRefName }} + forProvider: + {{- required "A valid value is required! (.Values.spaces[].forProvider)" $item.forProvider | toYaml | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/route.yaml b/helm/charts/crossplane-provider-cloudfoundry/templates/route.yaml new file mode 100644 index 0000000..6688f9f --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/templates/route.yaml @@ -0,0 +1,17 @@ +{{- range $item := .Values.routes }} + {{- if and ($item) (ne $item.name "") }} +--- +apiVersion: cloudfoundry.crossplane.io/v1alpha1 +kind: Route +metadata: + name: {{required "A valid value is required! (.Values.routes[].name)" $item.name | lower }} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" +spec: + providerConfigRef: + name: {{required "A valid value is required! (.Values.routes[].cloudfoundryProviderConfigRefName)" $item.cloudfoundryProviderConfigRefName }} + forProvider: + {{- required "A valid value is required! (.Values.spaces[].forProvider)" $item.forProvider | toYaml | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/secrets/generic-secret.yaml b/helm/charts/crossplane-provider-cloudfoundry/templates/secrets/generic-secret.yaml new file mode 100644 index 0000000..d645ccd --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/templates/secrets/generic-secret.yaml @@ -0,0 +1,24 @@ +{{- range $item := .Values.secrets}} + {{- if and ($item) (ne $item.name "")}} +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{required "A valid value is required! (.Values.secrets[].name)" $item.name | lower | quote}} + namespace: {{required "A valid value is required! (.Values.secrets[].namespace)" $item.namespace | lower | quote}} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" + {{- if $item.stringData}} +stringData: + {{- range $key, $value := $item.stringData }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} + {{- if $item.data}} +data: + {{- toYaml $item.data | nindent 4 }} + {{- end }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/service-credential-binding.yaml b/helm/charts/crossplane-provider-cloudfoundry/templates/service-credential-binding.yaml new file mode 100644 index 0000000..ed9725a --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/templates/service-credential-binding.yaml @@ -0,0 +1,17 @@ +{{- range $item := .Values.serviceCredentialsBindings }} + {{- if and ($item) (ne $item.name "") }} +--- +apiVersion: cloudfoundry.crossplane.io/v1alpha1 +kind: ServiceCredentialBinding +metadata: + name: {{required "A valid value is required! (.Values.serviceKeys[].name)" $item.name | lower }} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" +spec: + providerConfigRef: + name: {{required "A valid value is required! (.Values.serviceKeys[].cloudfoundryProviderConfigRefName)" $item.cloudfoundryProviderConfigRefName }} + forProvider: + {{- required "A valid value is required! (.Values.spaces[].forProvider)" $item.forProvider | toYaml | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/service-instance.yaml b/helm/charts/crossplane-provider-cloudfoundry/templates/service-instance.yaml new file mode 100644 index 0000000..b1ebf74 --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/templates/service-instance.yaml @@ -0,0 +1,17 @@ +{{- range $item := .Values.serviceInstances }} + {{- if and ($item) (ne $item.name "") }} +--- +apiVersion: cloudfoundry.crossplane.io/v1alpha1 +kind: ServiceInstance +metadata: + name: {{required "A valid value is required! (.Values.serviceInstances[].name)" $item.name | lower }} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" +spec: + providerConfigRef: + name: {{required "A valid value is required! (.Values.serviceInstances[].cloudfoundryProviderConfigRefName)" $item.cloudfoundryProviderConfigRefName }} + forProvider: + {{- required "A valid value is required! (.Values.spaces[].forProvider)" $item.forProvider | toYaml | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/space-members.yaml b/helm/charts/crossplane-provider-cloudfoundry/templates/space-members.yaml new file mode 100644 index 0000000..642ddf0 --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/templates/space-members.yaml @@ -0,0 +1,17 @@ +{{- range $item := .Values.spaceMembers }} + {{- if and ($item) (ne $item.name "") }} +--- +apiVersion: cloudfoundry.crossplane.io/v1alpha1 +kind: SpaceMembers +metadata: + name: {{required "A valid value is required! (.Values.spaceMembers[].name)" $item.name | lower }} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" +spec: + providerConfigRef: + name: {{required "A valid value is required! (.Values.spaceMembers[].cloudfoundryProviderConfigRefName)" $item.cloudfoundryProviderConfigRefName }} + forProvider: + {{- toYaml $item.forProvider | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/charts/crossplane-provider-cloudfoundry/templates/spaces.yaml b/helm/charts/crossplane-provider-cloudfoundry/templates/spaces.yaml new file mode 100644 index 0000000..82f7d71 --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/templates/spaces.yaml @@ -0,0 +1,17 @@ +{{- range $item := .Values.spaces }} + {{- if and ($item) (ne $item.name "") }} +--- +apiVersion: cloudfoundry.crossplane.io/v1alpha1 +kind: Space +metadata: + name: {{required "A valid value is required! (.Values.spaces[].name)" $item.name | lower }} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" +spec: + providerConfigRef: + name: {{required "A valid value is required! (.Values.spaces[].cloudfoundryProviderConfigRefName)" $item.cloudfoundryProviderConfigRefName }} + forProvider: + {{- required "A valid value is required! (.Values.spaces[].forProvider)" $item.forProvider | toYaml | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/charts/crossplane-provider-cloudfoundry/values.ci.yaml b/helm/charts/crossplane-provider-cloudfoundry/values.ci.yaml new file mode 100644 index 0000000..d76aeea --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/values.ci.yaml @@ -0,0 +1,105 @@ +--- +######################################################################################################################## +###! /!\ this file is only used in github pipeline to template a valid and NOT empty helm manifest! ##### +######################################################################################################################## +apps: + - cloudfoundryProviderConfigRefName: "cloudfoundryProviderConfigRefName" + name: "name" + forProvider: + name: my-app + dockerImage: hello-cf:latest + dockerCredentialsSecretRef: + name: registry-secret + namespace: crossplane-system + spaceRef: + name: my-space + routes: + - routeRef: + name: my-route +######################################################################################################################## +routes: + - cloudfoundryProviderConfigRefName: "cloudfoundryProviderConfigRefName" + name: "name" + forProvider: + domain: + name: cfapps.eu10.hana.ondemand.com + hostname: my-app + path: /hello # must begin with a `/` + spaceRef: + name: my-space + policy: + resolve: Always +######################################################################################################################## +serviceInstances: + - cloudfoundryProviderConfigRefName: "cloudfoundryProviderConfigRefName" + name: "name" + forProvider: + type: managed + name: my-destination + spaceRef: + name: my-space + servicePlan: + offering: destination + plan: lite +######################################################################################################################## +serviceCredentialsBindings: + - cloudfoundryProviderConfigRefName: "cloudfoundryProviderConfigRefName" + name: "name" + forProvider: + name: my-service-key + serviceInstanceRef: + name: my-service-instance + connectionDetailsAsJSON: false + writeConnectionSecretToRef: + name: my-service-key-secret + namespace: default +######################################################################################################################## +orgMembers: + - cloudfoundryProviderConfigRefName: "cloudfoundryProviderConfigRefName" + name: "name" + forProvider: + orgRef: + name: my-org + roleType: Managers + members: + - username: user1@sap.com + origin: sap.ids + - username: user2@sap.com + enforcementPolicy: Lax +######################################################################################################################## +spaceMembers: + - cloudfoundryProviderConfigRefName: "cloudfoundryProviderConfigRefName" + name: "name" + forProvider: + enforcementPolicy: "enforcementPolicy" + members: + - origin: "origin" + username: "username" + roleType: "Developers" + space: "space" + spaceRef: + name: "name" + policy: + resolution: "resolution" + resolve: "Always" + spaceSelector: + matchControllerRef: true + matchLabels: + policy: + resolution: "resolution" +######################################################################################################################## +organizations: + - cloudfoundryProviderConfigRefName: "cloudfoundryProviderConfigRefName" + name: "name" + externalName: "externalName" + forProvider: + id: "The external GUID of the org" + name: "The name of the Organization in Cloud Foundry" +######################################################################################################################## +secrets: + - name: "name" + namespace: "namespace" + stringData: + foo: "bar" + #data: [] +######################################################################################################################## \ No newline at end of file diff --git a/helm/charts/crossplane-provider-cloudfoundry/values.yaml b/helm/charts/crossplane-provider-cloudfoundry/values.yaml new file mode 100644 index 0000000..2e4e480 --- /dev/null +++ b/helm/charts/crossplane-provider-cloudfoundry/values.yaml @@ -0,0 +1,58 @@ +--- +######################################################################################################################## +# -- `apps[].` orchestrate `kind: App` of BTP Cloud foundry. +# @default -- object +apps: + - cloudfoundryProviderConfigRefName: "" + name: "" + forProvider: [] +######################################################################################################################## +# -- `routes[].` orchestrate `kind: Route` of BTP Cloud foundry. +routes: + - cloudfoundryProviderConfigRefName: "" + name: "" + forProvider: [] +######################################################################################################################## +# -- `serviceInstances[].` orchestrate `kind: ServiceInstance` of BTP Cloud foundry. +serviceInstances: + - cloudfoundryProviderConfigRefName: "" + name: "" + forProvider: [] +######################################################################################################################## +# -- `serviceCredentialsBindings[].` orchestrate `kind: ServiceKey` of BTP Cloud foundry. +serviceCredentialsBindings: + - cloudfoundryProviderConfigRefName: "" + name: "" + forProvider: [] +######################################################################################################################## +# -- `orgMembers[].` orchestrate `kind: OrgMembers` of BTP Cloud foundry. +orgMembers: + - cloudfoundryProviderConfigRefName: "" + name: "" + forProvider: [] +######################################################################################################################## +# -- `organizations[].` orchestrate `kind: Organization` of BTP Cloud foundry. +organizations: + - cloudfoundryProviderConfigRefName: "" + name: "" + # -- must match the actual name of the Cloud Foundry organization in BTP! + externalName: "" + forProvider: [] +######################################################################################################################## +# -- `spaceMembers[].` orchestrate `kind: SpaceMembers` of BTP Cloud foundry. +spaceMembers: + - cloudfoundryProviderConfigRefName: "" + name: "" + forProvider: [] +######################################################################################################################## +# @secrets -- :exclamation::exclamation: never EVER PUSH confidential secrets/credentials in plain text into GIT :exclamation::exclamation: +secrets: + # secrets[0].name -- defines k8s `metadata.name` value of `kind: Secret` + - name: "" + # -- *(optional)* defines k8s [`metadata.namespace`](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta) value of `kind: Secret` + namespace: "" + # -- *(optional)* [stringData](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/) *(map[string]string)* allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. + stringData: [] + # -- *(optional)* [data](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/) *(map[string][]byte)* Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in [here](https://tools.ietf.org/html/rfc4648#section-4) + data: [] +######################################################################################################################## \ No newline at end of file diff --git a/helm/charts/crossplane-provider-configs/Chart.yaml b/helm/charts/crossplane-provider-configs/Chart.yaml index 931aab1..30186e5 100644 --- a/helm/charts/crossplane-provider-configs/Chart.yaml +++ b/helm/charts/crossplane-provider-configs/Chart.yaml @@ -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.18 +version: 0.0.19 # 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. diff --git a/helm/charts/crossplane-provider-configs/README.md b/helm/charts/crossplane-provider-configs/README.md index a03327a..5e1d598 100644 --- a/helm/charts/crossplane-provider-configs/README.md +++ b/helm/charts/crossplane-provider-configs/README.md @@ -2,7 +2,7 @@ # crossplane-provider-configs -![Version: 0.0.18](https://img.shields.io/badge/Version-0.0.18-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) +![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: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) A Helm chart to template crossplane provider config manifests to orchestrate resources. @@ -25,6 +25,9 @@ A Helm chart to template crossplane provider config manifests to orchestrate res | providerConfigs.btpSapCrossplane[0].globalAccountSubDomain | string | `""` | contains the [Global Account Subdomain](https://pages.github.tools.sap/cloud-orchestration/browser/Providers/provider-btp-account/account.btp.orchestrate.cloud.sap/providerconfig/v1alpha1?path=spec-globalAccount). | | providerConfigs.btpSapCrossplane[0].serviceAccountSecret | object | [] | A user available in BTP. The Credentials in the ServiceAccountSecret are relevant for two reasons (1) On environment creation (Kyma & CloudFoundry) the APIs require a users email address (2) For updating the managers of a CloudFoundry Environment it is required to have a user and a password The structure is pretty basic, a json object with email, username and password. Username & Password must not be filled if there is no need for CloudFoundry Environments. Example: { "email": "", "username": "PUserID", "password": "--" } | | providerConfigs.btpSapCrossplane[0].serviceAccountSecret.secretRef | object | [] | A SecretRef is a reference to a secret key that contains the credentials that must be used to connect to the provider. | +| providerConfigs.cloudfoundry | list | [] | creates k8s manifest `kind: ProviderConfig` of `apiVersion: cloudfoundry.crossplane.io/v1beta1` This `ProviderConfig` typically points to k8s secret in which the credentials required for the BTP Cloud Foundry provider to communicate with the Cloud Foundry Environment on BTP. | +| providerConfigs.cloudfoundry[0].credentials.secretRef | object | [] | A SecretRef is a reference to a secret key that contains the credentials that must be used to connect to the provider. | +| providerConfigs.cloudfoundry[0].endpoint.secretRef | object | [] | A SecretRef is a reference to a secret key that contains the credentials that must be used to connect to the provider. | | providerConfigs.gardenerOrchestrateCloud | list | [] | creates k8s manifest `kind: ProviderConfig` of `apiVersion: gardener.orchestrate.cloud.sap/v1alpha1` This `ProviderConfig` typically points to k8s secret in which a `kubeconfig` of SAP Garden k8s Service Account is located in order to create a SAP Gardener Shoot Cluster Admin Kubeconfig Request `kind: AdminKubeconfigRequest` of `apiVersion: gardener.orchestrate.cloud.sap/v1alpha1` on SAP Garden cluster to pull `kubeconfig` of a SAP Gardener Shoot Clusters into your OpenMCP cluster as a k8s secret. | | providerConfigs.gardenerOrchestrateCloud[0].credentials.secretRef | object | [] | A SecretRef is a reference to a secret key that contains the credentials that must be used to connect to the provider. | | providerConfigs.gcpUpbound | list | [] | creates k8s manifest [`kind: ProviderConfig`](https://marketplace.upbound.io/providers/crossplane-contrib/provider-gcp/v0.22.0/resources/gcp.crossplane.io/ProviderConfig/v1beta1) of `gcp.upbound.io/v1beta1`. Additional information see [GCP Quickstart](https://docs.crossplane.io/latest/getting-started/provider-gcp/#create-a-providerconfig). | diff --git a/helm/charts/crossplane-provider-configs/templates/mcp/providerConfigs/cloudfoundry-crossplane-io.yaml b/helm/charts/crossplane-provider-configs/templates/mcp/providerConfigs/cloudfoundry-crossplane-io.yaml new file mode 100644 index 0000000..28642e3 --- /dev/null +++ b/helm/charts/crossplane-provider-configs/templates/mcp/providerConfigs/cloudfoundry-crossplane-io.yaml @@ -0,0 +1,17 @@ +{{- range $item := .Values.providerConfigs.cloudfoundryBtpOrchestrateCloud}} + {{- if and ($item) (ne $item.providerConfigRefName "")}} +--- +apiVersion: cloudfoundry.crossplane.io/v1beta1 +kind: ProviderConfig +metadata: + name: {{required "A valid value is required! (.Values.providerConfigs.cloudfoundryBtpOrchestrateCloud[].providerConfigRefName)" $item.providerConfigRefName | lower | quote}} + labels: + openmcp.cloud/blueprint-building-block: "{{ $.Chart.Name }}" + openmcp.cloud/blueprint-building-block-version: "{{ $.Chart.Version }}" +spec: + endpoint: + {{- required "A valid value is required! (.Values.providerConfigs.cloudfoundryBtpOrchestrateCloud[].endpoint)" $item.endpoint | toYaml | nindent 4 }} + credentials: + {{- required "A valid value is required! (.Values.providerConfigs.cloudfoundryBtpOrchestrateCloud[].credentials)" $item.credentials | toYaml | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/charts/crossplane-provider-configs/values.ci.yaml b/helm/charts/crossplane-provider-configs/values.ci.yaml index 7128444..d670be0 100644 --- a/helm/charts/crossplane-provider-configs/values.ci.yaml +++ b/helm/charts/crossplane-provider-configs/values.ci.yaml @@ -98,8 +98,8 @@ providerConfigs: namespace: default name: "btp-account-openmcp-test" key: btp-service-account-provider-credentials - cloudfoundryBtpOrchestrateCloud: - - providerConfigRefName: "cloudfoundryBtpOrchestrateCloud" + cloudfoundry: + - providerConfigRefName: "cloudfoundry" endpoint: source: "Secret" secretRef: diff --git a/helm/charts/crossplane-provider-configs/values.yaml b/helm/charts/crossplane-provider-configs/values.yaml index 7ba3656..7dfa47a 100644 --- a/helm/charts/crossplane-provider-configs/values.yaml +++ b/helm/charts/crossplane-provider-configs/values.yaml @@ -152,6 +152,31 @@ providerConfigs: namespace: "default" name: "" key: "" +######################################################################################################################## + ######################################################################################################################## + # -- creates k8s manifest `kind: ProviderConfig` of `apiVersion: cloudfoundry.crossplane.io/v1beta1` + # This `ProviderConfig` typically points to k8s secret in which the credentials required for the BTP Cloud Foundry provider to communicate with the Cloud Foundry Environment on BTP. + # @default -- [] + cloudfoundry: + - providerConfigRefName: "" + # @default -- [] + endpoint: + source: "Secret" + # -- A SecretRef is a reference to a secret key that contains the credentials that must be used to connect to the provider. + # @default -- [] + secretRef: + namespace: "default" + name: "" + key: "" + # @default -- [] + credentials: + source: "Secret" + # -- A SecretRef is a reference to a secret key that contains the credentials that must be used to connect to the provider. + # @default -- [] + secretRef: + namespace: "default" + name: "" + key: "" ######################################################################################################################## # @secrets -- :exclamation::exclamation: never EVER PUSH confidential secrets/credentials in plain text into GIT :exclamation::exclamation: # @default -- []