{"id":38258495,"url":"https://github.com/homedepot/k8s-global-objects","last_synced_at":"2026-01-17T01:33:39.672Z","repository":{"id":54199617,"uuid":"205057591","full_name":"homedepot/k8s-global-objects","owner":"homedepot","description":"Make kubernetes objects for each namespace","archived":false,"fork":false,"pushed_at":"2021-03-03T16:29:24.000Z","size":32,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-15T01:39:58.849Z","etag":null,"topics":["configmap","k8s","kubernetes","object","secret"],"latest_commit_sha":null,"homepage":"","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/homedepot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-29T01:46:37.000Z","updated_at":"2022-02-18T17:12:40.000Z","dependencies_parsed_at":"2022-08-13T09:00:57.460Z","dependency_job_id":null,"html_url":"https://github.com/homedepot/k8s-global-objects","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/homedepot/k8s-global-objects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fk8s-global-objects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fk8s-global-objects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fk8s-global-objects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fk8s-global-objects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/homedepot","download_url":"https://codeload.github.com/homedepot/k8s-global-objects/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homedepot%2Fk8s-global-objects/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28491601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"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":["configmap","k8s","kubernetes","object","secret"],"created_at":"2026-01-17T01:33:38.954Z","updated_at":"2026-01-17T01:33:39.663Z","avatar_url":"https://github.com/homedepot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# K8S Global Objects\n\nThis utility creates \"global\" objects accross all Kubernetes Namespaces\n\nSupports the following objects types: **ConfigMap** and **Secret** for now\n\n\u003e This utility will get build in a container\n\u003e The container will run inside k8s\n\u003e it needs rolebinded service account and roles (take a look at deploy folder in this repo)\n\n#### Usage\n\nJust add an Annotation with key **MakeGlobal** and value of *true* to add or *false* to remove, to a supported object\n\nExample:\n```\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: someconfigmap\n  namespace: default\n  annotations:\n    MakeGlobal: \"true\" # or \"false\"\n```\n\n#### Running Options\n```console\nUsage of k8s-global-objects:\n  -debug\n        Debug\n  -kubeconfig string\n        KUBECONFIG location (default \"/Users/latchmihay/.kube/config\")\n  -runinterval duration\n        interval to kick off sync (default 1m0s)\n  -runonce\n        Run App once\n```\n\n#### Running in kubernetes\nLook at **deploy** folder\n\n#### Run Time Log\n- Adding and Updating\n```console\n$ k8s-global-objects -runinterval 30s\nINFO[2019-01-22 23:20:22] Starting K8S Global Objects Runner\nINFO[2019-01-22 23:20:22] Validating Action: list in Resource: namespaces\nINFO[2019-01-22 23:20:22] Validating Action: get in Resource: configmaps\nINFO[2019-01-22 23:20:22] Validating Action: list in Resource: configmaps\nINFO[2019-01-22 23:20:22] Validating Action: create in Resource: configmaps\nINFO[2019-01-22 23:20:22] Validating Action: update in Resource: configmaps\nINFO[2019-01-22 23:20:22] Validating Action: delete in Resource: configmaps\nINFO[2019-01-22 23:20:22] Validating Action: get in Resource: secret\nINFO[2019-01-22 23:20:22] Validating Action: list in Resource: secret\nINFO[2019-01-22 23:20:22] Validating Action: create in Resource: secret\nINFO[2019-01-22 23:20:22] Validating Action: update in Resource: secret\nINFO[2019-01-22 23:20:22] Validating Action: delete in Resource: secret\nINFO[2019-01-22 23:20:22] Interval 30s\nINFO[2019-01-22 23:20:22] Looking for K8S Objects with Annotation: MakeGlobal\nINFO[2019-01-22 23:20:52] Starting Global Object Sync\nINFO[2019-01-22 23:20:53] Found Annotations in /api/v1/namespaces/default/configmaps/storeconfig\nINFO[2019-01-22 23:20:53] Found Annotations in /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:20:55] Creating Global Object /api/v1/namespaces/default/configmaps/storeconfig in namespace new-namespace\nINFO[2019-01-22 23:20:56] Creating Global Object /api/v1/namespaces/default/configmaps/testtesttest in namespace new-namespace\nINFO[2019-01-22 23:20:56] Sync Finished\nINFO[2019-01-22 23:21:22] Starting Global Object Sync\nINFO[2019-01-22 23:21:22] Found Annotations in /api/v1/namespaces/default/configmaps/storeconfig\nINFO[2019-01-22 23:21:22] Found Annotations in /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:25] Detected drift in /api/v1/namespaces/istio-system/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:26] Detected drift in /api/v1/namespaces/kube-public/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:26] Detected drift in /api/v1/namespaces/kube-system/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:26] Detected drift in /api/v1/namespaces/monitoring/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:26] Detected drift in /api/v1/namespaces/new-namespace/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:26] Detected drift in /api/v1/namespaces/pricing-data-service/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:27] Detected drift in /api/v1/namespaces/pricing-stage-service/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:27] Detected drift in /api/v1/namespaces/redis/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:27] Detected drift in /api/v1/namespaces/rook-ceph/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:27] Detected drift in /api/v1/namespaces/rook-ceph-system/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:27] Detected drift in /api/v1/namespaces/store-transporter/configmaps/testtesttest Overwriting it with /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:28] Sync Finished\nINFO[2019-01-22 23:21:52] Starting Global Object Sync\nINFO[2019-01-22 23:21:52] Found Annotations in /api/v1/namespaces/default/configmaps/storeconfig\nINFO[2019-01-22 23:21:52] Found Annotations in /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:21:55] Sync Finished\nINFO[2019-01-22 23:22:22] Starting Global Object Sync\nINFO[2019-01-22 23:22:22] Found Annotations in /api/v1/namespaces/default/configmaps/storeconfig\nINFO[2019-01-22 23:22:22] Found Annotations in /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-22 23:22:25] Sync Finished\n```\n- Removing\n```console\n$ k8s-global-objects -runinterval 10s\nINFO[2019-01-31 16:46:35] Starting K8S Global Objects Runner\nINFO[2019-01-31 16:46:35] Validating Action: list in Resource: namespaces\nINFO[2019-01-31 16:46:36] Validating Action: get in Resource: configmaps\nINFO[2019-01-31 16:46:36] Validating Action: list in Resource: configmaps\nINFO[2019-01-31 16:46:36] Validating Action: create in Resource: configmaps\nINFO[2019-01-31 16:46:36] Validating Action: update in Resource: configmaps\nINFO[2019-01-31 16:46:36] Validating Action: delete in Resource: configmaps\nINFO[2019-01-31 16:46:36] Validating Action: get in Resource: secrets\nINFO[2019-01-31 16:46:36] Validating Action: list in Resource: secrets\nINFO[2019-01-31 16:46:36] Validating Action: create in Resource: secrets\nINFO[2019-01-31 16:46:36] Validating Action: update in Resource: secrets\nINFO[2019-01-31 16:46:36] Validating Action: delete in Resource: secrets\nINFO[2019-01-31 16:46:36] Interval 10s\nINFO[2019-01-31 16:46:36] Looking for K8S Objects with Annotation: MakeGlobal\nINFO[2019-01-31 16:46:46] Starting Global Object Sync\nINFO[2019-01-31 16:46:47] Found MakeGlobal true annotation in /api/v1/namespaces/default/configmaps/storeconfig\nINFO[2019-01-31 16:46:47] Found MakeGlobal false annotation in /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-31 16:46:54] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace istio-system\nINFO[2019-01-31 16:46:54] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace kube-public\nINFO[2019-01-31 16:46:54] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace kube-system\nINFO[2019-01-31 16:46:54] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace monitoring\nINFO[2019-01-31 16:46:54] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace new-namespace\nINFO[2019-01-31 16:46:54] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace pricing-data-service\nINFO[2019-01-31 16:46:55] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace pricing-stage-service\nINFO[2019-01-31 16:46:55] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace redis\nINFO[2019-01-31 16:46:55] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace rook-ceph\nINFO[2019-01-31 16:46:55] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace rook-ceph-system\nINFO[2019-01-31 16:46:56] Removing Global Object /api/v1/namespaces/default/configmaps/testtesttest from namespace store-transporter\nINFO[2019-01-31 16:46:56] Sync Finished\nINFO[2019-01-31 16:46:56] Starting Global Object Sync\nINFO[2019-01-31 16:46:57] Found MakeGlobal true annotation in /api/v1/namespaces/default/configmaps/storeconfig\nINFO[2019-01-31 16:46:57] Found MakeGlobal false annotation in /api/v1/namespaces/default/configmaps/testtesttest\nINFO[2019-01-31 16:47:01] Sync Finished\n```\n\n### Versioning\n\n- Updated `version/version.go`\n  - Variable *Version*\n\n### Building\n\n```console\n$ make\n\n Choose a command run in k8s-global-objects:\n\n  build                       Build local binaries and docker image. Requires `go` to be installed.\n  install-goreleaser-linux    Install goreleaser on your system for Linux systems.\n  install-goreleaser-darwin   Install goreleaser on your system for macOS (Darwin).\n  github-release              Publish a release to github.\n  clean                       Clean directory.\n```\n\n```console\n$ make build\n=\u003e Running Go Format ...\n=\u003e Running Go Test via Overalls ...\ngo: finding golang.org/x/tools/cmd/cover latest\ngo: finding golang.org/x/tools/cmd latest\ngo: finding golang.org/x/tools latest\ngo: finding github.com/go-playground/overalls latest\n...\n...\n...\n2019/01/31 17:09:40 PASS\n2019/01/31 17:09:40 coverage: 80.9% of statements\ngithub.com/homedepot/k8s-global-objects/runner      1.130s  coverage: 80.9% of statements\ngithub.com/homedepot/k8s-global-objects/runner/accessValidate.go:25:        ValidateMyAccess                100.0%\ngithub.com/homedepot/k8s-global-objects/runner/accessValidate.go:39:        CanIdo                          100.0%\ngithub.com/homedepot/k8s-global-objects/runner/configmap.go:9:              ConfigMapList                   80.0%\ngithub.com/homedepot/k8s-global-objects/runner/configmap.go:18:             CreateConfigMap                 100.0%\ngithub.com/homedepot/k8s-global-objects/runner/configmap.go:28:             UpdateConfigMap                 100.0%\ngithub.com/homedepot/k8s-global-objects/runner/configmap.go:38:             DeleteConfigMap                 100.0%\ngithub.com/homedepot/k8s-global-objects/runner/configmap.go:43:             createConfigMapObject           100.0%\ngithub.com/homedepot/k8s-global-objects/runner/engine.go:26:                checkAnnotationKey              81.8%\ngithub.com/homedepot/k8s-global-objects/runner/engine.go:44:                AddAnnotatedConfigMap           95.2%\ngithub.com/homedepot/k8s-global-objects/runner/engine.go:82:                RemoveAnnotatedConfigMap        78.6%\ngithub.com/homedepot/k8s-global-objects/runner/engine.go:108:               AddAnnotatedSecret              95.2%\ngithub.com/homedepot/k8s-global-objects/runner/engine.go:144:               RemoveAnnotatedSecret           78.6%\ngithub.com/homedepot/k8s-global-objects/runner/namespace.go:9:              NamespacesList                  80.0%\ngithub.com/homedepot/k8s-global-objects/runner/runner.go:35:                DefaultConfig                   100.0%\ngithub.com/homedepot/k8s-global-objects/runner/runner.go:42:                NewRunner                       100.0%\ngithub.com/homedepot/k8s-global-objects/runner/runner.go:54:                Init                            58.3%\ngithub.com/homedepot/k8s-global-objects/runner/runner.go:74:                Start                           67.4%\ngithub.com/homedepot/k8s-global-objects/runner/runner.go:253:               Close                           100.0%\ngithub.com/homedepot/k8s-global-objects/runner/secret.go:9:                 SecretList                      80.0%\ngithub.com/homedepot/k8s-global-objects/runner/secret.go:18:                CreateSecret                    100.0%\ngithub.com/homedepot/k8s-global-objects/runner/secret.go:28:                UpdateSecret                    100.0%\ngithub.com/homedepot/k8s-global-objects/runner/secret.go:38:                DeleteSecret                    100.0%\ngithub.com/homedepot/k8s-global-objects/runner/secret.go:43:                createSecretObject              100.0%\ntotal:                                                                          (statements)                    80.9%\n=\u003e Cleaning directories ...\n=\u003e Building with goreleaser ...\n\n   • releasing using goreleaser 0.95.2...\n   • loading config file       file=.goreleaser.yml\n   • RUNNING BEFORE HOOKS\n\n=\u003e Cleaning directories ...\n=\u003e Building with goreleaser ...\n\n   • releasing using goreleaser 0.95.2...\n   • loading config file       file=.goreleaser.yml\n   • RUNNING BEFORE HOOKS\n      • running make clean\n      • running go generate ./...\n      • running make format\n      • running make test\n   • GETTING AND VALIDATING GIT STATE\n      • releasing v0.0.1, commit e042240e153076e9c3de3601a73da401ab6a2659\n      • skipped                   reason=validation is disabled\n   • SETTING DEFAULTS\n   • SNAPSHOTING\n      • skipped                   reason=not a snapshot\n   • CHECKING ./DIST\n   • WRITING EFFECTIVE CONFIG FILE\n      • writing                   config=_dist/config.yaml\n   • GENERATING CHANGELOG\n      • writing                   changelog=_dist/CHANGELOG.md\n   • LOADING ENVIRONMENT VARIABLES\n      • skipped                   reason=publishing is disabled\n   • BUILDING BINARIES\n      • building                  binary=_dist/linux_amd64/k8s-global-objects\n      • building                  binary=_dist/darwin_amd64/k8s-global-objects\n   • ARCHIVES\n      • creating                  archive=_dist/k8s-global-objects_0.0.1_darwin_amd64.tar.gz\n      • creating                  archive=_dist/k8s-global-objects_0.0.1_linux_amd64.tar.gz\n   • LINUX PACKAGES WITH NFPM\n      • skipped                   reason=no output formats configured\n   • SNAPCRAFT PACKAGES\n      • skipped                   reason=no summary nor description were provided\n   • CALCULATING CHECKSUMS\n      • checksumming              file=k8s-global-objects_0.0.1_linux_amd64.tar.gz\n      • checksumming              file=k8s-global-objects_0.0.1_darwin_amd64.tar.gz\n   • SIGNING ARTIFACTS\n      • skipped                   reason=artifact signing is disabled\n   • DOCKER IMAGES\n      • building docker image     image=homedepottech/k8s-global-objects:latest\n      • skip_push is set\n   • PUBLISHING\n      • skipped                   reason=publishing is disabled\n   • release succeeded after 16.72s\n\n=\u003e Cleaning directories ...\n```\n## Maintainers\n- Latch Mihay\n\n## Contributing \n\nCheck out the [contributing](CONTRIBUTING.md) readme for information on how to contriubte to the project. \n\n## License \n\nThis project is released under the Apache2 free software license. More information can be found in the [LICENSE](LICENSE) file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomedepot%2Fk8s-global-objects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomedepot%2Fk8s-global-objects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomedepot%2Fk8s-global-objects/lists"}