{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/66068","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/66068/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/66068/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/66068/events","html_url":"https://github.com/kubernetes/kubernetes/issues/66068","id":340241491,"node_id":"MDU6SXNzdWUzNDAyNDE0OTE=","number":66068,"title":"Custom OwnerReference definitions to allow easy cleanup","user":{"login":"YP28","id":4119194,"node_id":"MDQ6VXNlcjQxMTkxOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4119194?v=4","gravatar_id":"","url":"https://api.github.com/users/YP28","html_url":"https://github.com/YP28","followers_url":"https://api.github.com/users/YP28/followers","following_url":"https://api.github.com/users/YP28/following{/other_user}","gists_url":"https://api.github.com/users/YP28/gists{/gist_id}","starred_url":"https://api.github.com/users/YP28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YP28/subscriptions","organizations_url":"https://api.github.com/users/YP28/orgs","repos_url":"https://api.github.com/users/YP28/repos","events_url":"https://api.github.com/users/YP28/events{/privacy}","received_events_url":"https://api.github.com/users/YP28/received_events","type":"User","site_admin":false},"labels":[{"id":267761362,"node_id":"MDU6TGFiZWwyNjc3NjEzNjI=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/feature","name":"kind/feature","color":"c7def8","default":false},{"id":617149945,"node_id":"MDU6TGFiZWw2MTcxNDk5NDU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-sig","name":"needs-sig","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-11T13:26:54Z","updated_at":"2018-07-12T07:18:26Z","closed_at":null,"author_association":"NONE","body":"/kind feature\r\n\r\n**What happened**:\r\nWe'd like to specify custom `ownerReferences` in our resources.\r\n\r\nAt this moment, we deploy every branch on our development cluster automatically. We just now tried doing the same for a new application, however, that application includes `ClusterRole`s and `ClusterRoleBinding`s. These are cluster scoped, and will not be automatically cleaned by our cleaner that just deletes the entire branch namespace.\r\n\r\nWe'd like to just specify on the `ClusterRole` and `ClusterRoleBinding` that the owner of those resources is the namespace, and have it cleaned together with the rest of the deployment. Right now, it is not possible due to the resources being cluster-scoped, and the ownerReference requiring a `uid`. \r\n\r\n**Anything else we need to know?**:\r\n/\r\n\r\n**Environment**:\r\n- Kubernetes version (use `kubectl version`):\r\n```\r\nClient Version: version.Info{Major:\"1\", Minor:\"9\", GitVersion:\"v1.9.2\", GitCommit:\"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b\", GitTreeState:\"clean\", BuildDate:\"2018-01-18T10:09:24Z\", GoVersion:\"go1.9.2\", Compiler:\"gc\", Platform:\"darwin/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"9+\", GitVersion:\"v1.9.6-gke.1\", GitCommit:\"cb151369f60073317da686a6ce7de36abe2bda8d\", GitTreeState:\"clean\", BuildDate:\"2018-04-07T22:06:59Z\", GoVersion:\"go1.9.3b4\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```\r\n- Cloud provider or hardware configuration\r\nGoogle Kubernetes Engine, `n1-standard-1` and `n1-standard-2` instances.\r\n- OS (e.g. from /etc/os-release):\r\n/\r\n- Kernel (e.g. `uname -a`):\r\n/\r\n- Install tools:\r\n/\r\n- Others:\r\n/"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/404414091","html_url":"https://github.com/kubernetes/kubernetes/issues/66068#issuecomment-404414091","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/66068","id":404414091,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDQxNDA5MQ==","user":{"login":"YP28","id":4119194,"node_id":"MDQ6VXNlcjQxMTkxOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4119194?v=4","gravatar_id":"","url":"https://api.github.com/users/YP28","html_url":"https://github.com/YP28","followers_url":"https://api.github.com/users/YP28/followers","following_url":"https://api.github.com/users/YP28/following{/other_user}","gists_url":"https://api.github.com/users/YP28/gists{/gist_id}","starred_url":"https://api.github.com/users/YP28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YP28/subscriptions","organizations_url":"https://api.github.com/users/YP28/orgs","repos_url":"https://api.github.com/users/YP28/repos","events_url":"https://api.github.com/users/YP28/events{/privacy}","received_events_url":"https://api.github.com/users/YP28/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T07:18:26Z","updated_at":"2018-07-12T07:18:26Z","author_association":"NONE","body":"/sig apimachinery"}}
{"actor":{"display_login":"YP28"}}