{"id":20484629,"url":"https://github.com/sap-samples/hana-cloud-instance-mapping-operator-for-kyma","last_synced_at":"2026-03-01T19:34:08.514Z","repository":{"id":241078094,"uuid":"801426413","full_name":"SAP-samples/hana-cloud-instance-mapping-operator-for-kyma","owner":"SAP-samples","description":"HANA Cloud Instance Mapping Operator automates the database mapping to a Kyma namespace in a Kubernetes-native way.","archived":false,"fork":false,"pushed_at":"2025-03-15T11:38:30.000Z","size":59,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-04T02:48:10.108Z","etag":null,"topics":["hana-cloud","kyma","sap-btp","sap-hana-cloud"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAP-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-16T07:56:49.000Z","updated_at":"2025-04-04T03:37:24.000Z","dependencies_parsed_at":"2024-05-22T09:45:36.258Z","dependency_job_id":"17a6baac-45f4-4e39-8dd5-b1daeaf21f6b","html_url":"https://github.com/SAP-samples/hana-cloud-instance-mapping-operator-for-kyma","commit_stats":null,"previous_names":["sap-samples/hana-cloud-instance-mapping-operator-for-kyma"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SAP-samples/hana-cloud-instance-mapping-operator-for-kyma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fhana-cloud-instance-mapping-operator-for-kyma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fhana-cloud-instance-mapping-operator-for-kyma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fhana-cloud-instance-mapping-operator-for-kyma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fhana-cloud-instance-mapping-operator-for-kyma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP-samples","download_url":"https://codeload.github.com/SAP-samples/hana-cloud-instance-mapping-operator-for-kyma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fhana-cloud-instance-mapping-operator-for-kyma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29981470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hana-cloud","kyma","sap-btp","sap-hana-cloud"],"created_at":"2024-11-15T16:24:33.967Z","updated_at":"2026-03-01T19:34:08.482Z","avatar_url":"https://github.com/SAP-samples.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/hana-cloud-instance-mapping-operator-for-kyma)](https://api.reuse.software/info/github.com/SAP-samples/hana-cloud-instance-mapping-operator-for-kyma)\n\n# HANA Cloud Instance Mapping Operator for Kyma\nHANA Cloud Instance Mapping Operator automates the HANA Cloud database mapping to a Kyma namespace.\n\n## Description\nThe operator manages the database mappings in a kubernetes-native way. It stores them in custom resources (CRs) in the Kyma cluster and updates the underlying HANA Cloud infrastructure by calling its mapping API.\n\nThe following diagram gives an overview of the involved custom resources (CRs) and operators in the Kyma cluster.\n![](hana-mapping-operator.svg)\n\nDatabase mappings are a prerequisite for deploying and consuming HDI Containers and Schemas from a Kyma namespace. \nGeneral information about provisioning and consuming HANA Cloud databases is available on the SAP Technology Blog:\n* [Provisioning HANA Cloud Databases in Kyma - concepts](https://community.sap.com/t5/technology-blogs-by-sap/provisioning-sap-hana-cloud-databases-from-kyma-and-kubernetes-1-concepts/ba-p/13577178)\n* [Provisioning HANA Cloud Databases in Kyma - step-by-step](https://community.sap.com/t5/technology-blogs-by-sap/provisioning-sap-hana-cloud-databases-from-kyma-and-kubernetes-2-kyma/ba-p/13577215)\n* [Consuming HANA Cloud in Kyma](https://community.sap.com/t5/technology-blogs-by-sap/consuming-sap-hana-cloud-from-the-kyma-environment/ba-p/13552718)\n\n## Requirements\n- go version v1.21.0+\n- docker version 17.03+.\n- kubectl version v1.11.3+.\n- Access to a Kubernetes v1.11.3+ cluster.\n- [SAP BTP Service Operator](https://github.com/SAP/sap-btp-service-operator) running on your Kyma cluster\n\n## Download and Installation\n\n### To Deploy on the cluster\n**Build and push your image to the location specified by `IMG`:**\n\n```sh\nmake docker-build docker-push IMG=\u003csome-registry\u003e/hana-mapping-operator:tag\n```\n\n**NOTE:** This image ought to be published in the personal registry you specified. \nAnd it is required to have access to pull the image from the working environment. \nMake sure you have the proper permission to the registry if the above commands don’t work.\n\n**Install the CRDs into the cluster:**\n\n```sh\nmake install\n```\n\n**Deploy the Manager to the cluster with the image specified by `IMG`:**\n\n```sh\nmake deploy IMG=\u003csome-registry\u003e/hana-mapping-operator:tag\n```\n\n\u003e **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin \nprivileges or be logged in as admin.\n\n**Create instances of your solution**\nYou can apply the samples (examples) from the config/sample:\n\n```sh\nkubectl apply -k config/samples/\n```\n\n\u003e**NOTE**: Ensure that the samples has default values to test it out.\n\n### To Uninstall\n**Delete the instances (CRs) from the cluster:**\n\n```sh\nkubectl delete -k config/samples/\n```\n\n**Delete the APIs(CRDs) from the cluster:**\n\n```sh\nmake uninstall\n```\n\n**UnDeploy the controller from the cluster:**\n\n```sh\nmake undeploy\n```\n\n## Usage\nFirst, make sure you have a database (HANA Cloud service instance) in your landscape. One way to provision it is by deploying a ServiceInstance CR like:\n```yaml\napiVersion: services.cloud.sap.com/v1\nkind: ServiceInstance\nmetadata:\n  namespace: my-namespace\n  name: my-hana-instance\nspec:\n  serviceOfferingName: hana-cloud\n  servicePlanName: hana\n  parameters:\n    data:\n      memory: 30\n      vcpu: 2\n      generateSystemPassword: true\n```\n\nTo get access to the mapping API (inventory service) of the HANA Cloud infrastructure the HANA Mapping Operator needs to authenticate against a special XSUAA service. Provision one service instance (plan admin-api-access) and the corresponding binding. Don't forget to set the `technicalUser` flag, it assigns all necessary scopes to access the mapping API:\n```yaml\napiVersion: services.cloud.sap.com/v1\nkind: ServiceInstance\nmetadata:\n  namespace: my-namespace\n  name: my-admin-instance\nspec:\n  serviceOfferingName: hana-cloud\n  servicePlanName: admin-api-access\n  parameters:\n    technicalUser: true\n---\napiVersion: services.cloud.sap.com/v1\nkind: ServiceBinding\nmetadata:\n  namespace: my-namespace\n  name: my-admin-binding\nspec:\n  serviceInstanceName: my-admin-instance\n  secretName: my-admin-secret\n```\n\nThe credentials for authentication will be stored in a separate secret `my-admin-secret` in the same namespace as the binding.\n\nNext, deploy the mapping CR:\n```yaml\napiVersion: hana.cloud.sap.com/v1\nkind: HANAMapping\nmetadata:\n  namespace: my-namespace\n  name: my-hanamapping\nspec:\n  btpOperatorConfigmap:\n    namespace: kyma-system\n    name: sap-btp-operator-config\n  adminAPIAccessSecret:\n    namespace: my-namespace\n    name: my-admin-secret\n  mapping:\n    serviceInstanceID: cf923d7d-7661-48f2-aaa2-d4dbb151a708\n    targetNamespace: my-namespace\n```\n\nFinally, make sure the mapping is deployed successfully:\n```shell\n$ kubectl get hanamappings\nNAME             SERVICE INSTANCE ID                    TARGET NAMESPACE   READY\nmy-hanamapping   cf923d7d-7661-48f2-aaa2-d4dbb151a708   my-namespace       True\n```\n\nNow, you can consume the specified HANA Cloud Service Instance in `my-namespace`.\n\n## Contributing\nWe currently do not accept community contributions.\n\n## License\nCopyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fhana-cloud-instance-mapping-operator-for-kyma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsap-samples%2Fhana-cloud-instance-mapping-operator-for-kyma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fhana-cloud-instance-mapping-operator-for-kyma/lists"}