{"id":16813751,"url":"https://github.com/albertoimpl/spring-cloud-config-server-binding","last_synced_at":"2025-03-17T11:42:43.239Z","repository":{"id":86216904,"uuid":"255347363","full_name":"Albertoimpl/spring-cloud-config-server-binding","owner":"Albertoimpl","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-15T15:09:09.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T21:28:32.484Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Albertoimpl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-04-13T14:15:23.000Z","updated_at":"2020-04-15T15:09:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"24dedaf8-e59a-48a3-96e7-5ab17d41a883","html_url":"https://github.com/Albertoimpl/spring-cloud-config-server-binding","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albertoimpl%2Fspring-cloud-config-server-binding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albertoimpl%2Fspring-cloud-config-server-binding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albertoimpl%2Fspring-cloud-config-server-binding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albertoimpl%2Fspring-cloud-config-server-binding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Albertoimpl","download_url":"https://codeload.github.com/Albertoimpl/spring-cloud-config-server-binding/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244029584,"owners_count":20386441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-13T10:27:45.025Z","updated_at":"2025-03-17T11:42:43.226Z","avatar_url":"https://github.com/Albertoimpl.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setup\n\nBuilding spring-cloud-config-server image\n```shell script\npushd spring-cloud-config-server \u003e/dev/null\n./gradlew bootBuildImage --imageName=albertoimpl/spring-cloud-config-server\npopd \u003e/dev/null\n\ndocker push albertoimpl/spring-cloud-config-server\n```\n\nCreating a config-server service instance:\n```shell script\nkubectl apply -f k8s/config-server-deployment.yaml\n```\n\n```shell script\nkubectl port-forward pod/my-config-server-689956457-v8p4h 8080:8080\n\ncurl localhost:8080/default/master\n```\n\nBuilding config-server-client-app image\n\n```shell script\npushd spring-cloud-config-client-app \u003e/dev/null\n./gradlew bootBuildImage --imageName=albertoimpl/spring-cloud-config-client-app\npopd \u003e/dev/null\n\ndocker push albertoimpl/spring-cloud-config-client-app\n```\n\n# Binding the client application to the service instance, the hard way\n\nCreating a service to access the config-server\n```shell script\nkubectl apply -f k8s/config-server-service.yaml\n```\n\nCreating the config-map with the URI pointing to the service\n```shell script\nkubectl apply -f k8s/config-server-config-map.yaml\n```\n\nDeploying the spring-cloud-config-client-app client application pointing to the created config-map and updating the bootstrap location:\n```shell script\nkubectl apply -f k8s/client-application-deployment-with-configmap.yaml\n```\n\n```shell script\nkubectl port-forward pod/my-client-app-86d564d688-pn42d 8081:8081\n\ncurl localhost:8081/text\nGitHub configuration repository!!!!!%\n```\n\n# Binding the client application to the service instance, using `spring-cloud-config-server-binding-reconciler` and `kind: SpringCloudConfigServer`\n\n## Setup\n\nCreating the `kind: SpringCloudConfigServer` CRD:\n\n```shell script\nkubectl apply -f k8s/spring-cloud-config-server-custom-resource-definition.yaml\n```\n\nRun `SpringCloudConfigServerReconcilerApplication` to reconcile the new creations.\nThe `SpringCloudConfigServerReconciler` will create a `Service`, a `Deployment` and a `ConfigMap`. Every time a new `kind: SpringCloudConfigServer` gets created.\n\nRun `SpringCloudConfigServerBindingReconcilerApplication` to reconcile the bindings.\nThe `SpringCloudConfigServerBindingReconciler` will update the `Pod` by expecting the label `binds-to=my-config-server`.\n\n## What the user will do\n\nCreating a new instance of `kind: SpringCloudConfigServer`:\n```shell script\nkubectl apply -f k8s/config-server-crd-instance.yaml\n```\n\nDeploying the spring-cloud-config-client-app client application with the label `binds-to=my-config-server`.\n```shell script\nkubectl apply -f k8s/client-application-deployment-with-binds-label.yaml\n```\n\n```shell script\nkubectl port-forward pod/my-client-app-86d564d688-pn42d 8081:8081\n\ncurl localhost:8081/text\nGitHub configuration repository!!!!!%\n```\n\n## cleanup\n```shell script\nk delete scc my-config-server\nk delete crd springcloudconfigservers.tanzu.vmware.com\nk delete deployment.apps/my-client-app\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertoimpl%2Fspring-cloud-config-server-binding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertoimpl%2Fspring-cloud-config-server-binding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertoimpl%2Fspring-cloud-config-server-binding/lists"}