{"id":20751608,"url":"https://github.com/arham09/k8s-sample","last_synced_at":"2026-04-19T22:32:27.930Z","repository":{"id":204123044,"uuid":"710852915","full_name":"arham09/k8s-sample","owner":"arham09","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-28T12:11:33.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T10:47:11.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/arham09.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":"2023-10-27T15:15:43.000Z","updated_at":"2023-10-27T15:16:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"27da22eb-19d8-48c8-8021-a33192a974da","html_url":"https://github.com/arham09/k8s-sample","commit_stats":null,"previous_names":["arham09/k8s-sample"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arham09/k8s-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arham09%2Fk8s-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arham09%2Fk8s-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arham09%2Fk8s-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arham09%2Fk8s-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arham09","download_url":"https://codeload.github.com/arham09/k8s-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arham09%2Fk8s-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32025614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-17T08:37:06.304Z","updated_at":"2026-04-19T22:32:27.914Z","avatar_url":"https://github.com/arham09.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Config Hierarchy Demo\n\nThis project shows how to combine Config file, K8s Config Map and K8s Deployment Env,\nthis enable config changes without doing code changes and invoke a CI/CD Pipeline\nThe hierarchy will be like this\n[Config File] -\u003e [K8s Config Map] -\u003e [K8s Deployment Env]\n\n### Normal Config File\n\nStart the program by\n```bash\n$ go run main.go\n```\n\n### K8s Config Map\n\nStart the program by\n```bash\n$ kubectl apply -f deploy/deployment.yaml -n hello\n```\n\n### K8s Deployment Env\n\nStart the program by\n```bash\n$ kubectl apply -f deploy/deployment.yaml -n hello\n\n$ kubectl set env deployment/go-hello-world -n hello NAME=from_set_k8s_env\n\n$ kubectl rollout restart deployment/go-hello-world -n hello\n```\n\n### Testing\n\n```bash\n$ curl http://\u003chost\u003e:\u003cport\u003e\n```\n\nThe result will be different for each method used to run the program, \nbecause we set different value for the program to run, the config file \nwill be parsed first, if the config with the same key available in\nK8s CM or K8s Env, the value from config file will be overwritten\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farham09%2Fk8s-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farham09%2Fk8s-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farham09%2Fk8s-sample/lists"}