{"id":17956522,"url":"https://github.com/looztra/kustomize-issue--empty-namespace","last_synced_at":"2026-02-04T09:42:50.963Z","repository":{"id":145249967,"uuid":"198876700","full_name":"looztra/kustomize-issue--empty-namespace","owner":"looztra","description":null,"archived":false,"fork":false,"pushed_at":"2019-07-26T11:55:17.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T17:19:19.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/looztra.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}},"created_at":"2019-07-25T17:43:44.000Z","updated_at":"2019-07-26T11:55:19.000Z","dependencies_parsed_at":"2023-04-14T05:54:26.943Z","dependency_job_id":null,"html_url":"https://github.com/looztra/kustomize-issue--empty-namespace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/looztra/kustomize-issue--empty-namespace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looztra%2Fkustomize-issue--empty-namespace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looztra%2Fkustomize-issue--empty-namespace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looztra%2Fkustomize-issue--empty-namespace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looztra%2Fkustomize-issue--empty-namespace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/looztra","download_url":"https://codeload.github.com/looztra/kustomize-issue--empty-namespace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looztra%2Fkustomize-issue--empty-namespace/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266604009,"owners_count":23954725,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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-10-29T10:38:13.915Z","updated_at":"2026-02-04T09:42:45.920Z","avatar_url":"https://github.com/looztra.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kustomize v3.0.3 generates empty namespaces in some cases\n\n## Status\n\nThe bug was reported by someone else, cf \u003chttps://github.com/kubernetes-sigs/kustomize/issues/1377\u003e, this will be fixed in the next kustomize release.\n\n## Requirements\n\n- [kubesplit](https://github.com/looztra/kubesplit) installed (`pip3 install -U --user kubesplit` for instance)\n\n## OK with kustomize whatever the version\n\n`kustomize build component-sets/overlay-ok | kubesplit -p -q -c -o generated/ok`\n\nResulting descriptors can be seen in directory `generated/ok`\n\nThe clusterrolebinding and the rolebinding have the namespace correctly specified\n\n```yaml\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n  annotations:\n    company.com/kustomize-component: kube-state-metrics\n    company.com/kustomize-component-set: monitoring\n  name: company:kube-state-metrics\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: company:kube-state-metrics\nsubjects:\n  - kind: ServiceAccount\n    name: kube-state-metrics\n    namespace: monitoring\n```\n\n## NOK with kustomize v3.0.3, OK with v3.0.2 and v2.1.0\n\n`kustomize build component-sets/overlay-not-ok | kubesplit -p -q -c -o generated/not-ok`\n\nResulting descriptors can be seen in directory `generated/not-ok`\n\nThe clusterrolebinding and the rolebinding have an empty namespace\n\n```yaml\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n  annotations:\n    company.com/kustomize-component: kube-state-metrics\n    company.com/kustomize-component-set: monitoring\n  name: company:kube-state-metrics\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: company:kube-state-metrics\nsubjects:\n  - kind: ServiceAccount\n    name: kube-state-metrics\n    namespace:\n```\n\n## What is the difference between the 2 use cases?\n\n- OK =\u003e a configMapGenerator that generates a ConfigMap in another namespace as the one of the target ServiceAccount\n- NOK =\u003e a configMapGenerator that generates a ConfigMap in the same namespace as the one of the target ServiceAccount\n\n## Tip\n\nHow to build a custom `kustomize` binary (for the record) when inside a source tree :\n\n```bash\n# bash\nGO111MODULE=on go build -o my-kustomize cmd/kustomize/main.go\n\n# Fish\nenv GO111MODULE=on go build -o my-kustomize cmd/kustomize/main.go\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooztra%2Fkustomize-issue--empty-namespace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flooztra%2Fkustomize-issue--empty-namespace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooztra%2Fkustomize-issue--empty-namespace/lists"}