{"action":"created","issue":{"url":"https://api.github.com/repos/DataDog/pupernetes/issues/41","repository_url":"https://api.github.com/repos/DataDog/pupernetes","labels_url":"https://api.github.com/repos/DataDog/pupernetes/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/DataDog/pupernetes/issues/41/comments","events_url":"https://api.github.com/repos/DataDog/pupernetes/issues/41/events","html_url":"https://github.com/DataDog/pupernetes/pull/41","id":329064936,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNDE1MzEz","number":41,"title":"Introduce the daemon and the reset commands","user":{"login":"JulienBalestra","id":8077192,"node_id":"MDQ6VXNlcjgwNzcxOTI=","avatar_url":"https://avatars2.githubusercontent.com/u/8077192?v=4","gravatar_id":"","url":"https://api.github.com/users/JulienBalestra","html_url":"https://github.com/JulienBalestra","followers_url":"https://api.github.com/users/JulienBalestra/followers","following_url":"https://api.github.com/users/JulienBalestra/following{/other_user}","gists_url":"https://api.github.com/users/JulienBalestra/gists{/gist_id}","starred_url":"https://api.github.com/users/JulienBalestra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JulienBalestra/subscriptions","organizations_url":"https://api.github.com/users/JulienBalestra/orgs","repos_url":"https://api.github.com/users/JulienBalestra/repos","events_url":"https://api.github.com/users/JulienBalestra/events{/privacy}","received_events_url":"https://api.github.com/users/JulienBalestra/received_events","type":"User","site_admin":false},"labels":[{"id":899614020,"node_id":"MDU6TGFiZWw4OTk2MTQwMjA=","url":"https://api.github.com/repos/DataDog/pupernetes/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/DataDog/pupernetes/milestones/2","html_url":"https://github.com/DataDog/pupernetes/milestone/2","labels_url":"https://api.github.com/repos/DataDog/pupernetes/milestones/2/labels","id":3365605,"node_id":"MDk6TWlsZXN0b25lMzM2NTYwNQ==","number":2,"title":"v0.3.0","description":"This milestone should provide a configurable setup.","creator":{"login":"JulienBalestra","id":8077192,"node_id":"MDQ6VXNlcjgwNzcxOTI=","avatar_url":"https://avatars2.githubusercontent.com/u/8077192?v=4","gravatar_id":"","url":"https://api.github.com/users/JulienBalestra","html_url":"https://github.com/JulienBalestra","followers_url":"https://api.github.com/users/JulienBalestra/followers","following_url":"https://api.github.com/users/JulienBalestra/following{/other_user}","gists_url":"https://api.github.com/users/JulienBalestra/gists{/gist_id}","starred_url":"https://api.github.com/users/JulienBalestra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JulienBalestra/subscriptions","organizations_url":"https://api.github.com/users/JulienBalestra/orgs","repos_url":"https://api.github.com/users/JulienBalestra/repos","events_url":"https://api.github.com/users/JulienBalestra/events{/privacy}","received_events_url":"https://api.github.com/users/JulienBalestra/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":6,"state":"open","created_at":"2018-05-22T16:16:19Z","updated_at":"2018-06-04T13:52:04Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-06-04T13:52:04Z","updated_at":"2018-06-05T14:33:21Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/DataDog/pupernetes/pulls/41","html_url":"https://github.com/DataDog/pupernetes/pull/41","diff_url":"https://github.com/DataDog/pupernetes/pull/41.diff","patch_url":"https://github.com/DataDog/pupernetes/pull/41.patch"},"body":"### What does this PR do?\r\n\r\nAll the already existing commands are under the `daemon` sub commands.\r\nIntroduce the `reset`command to reset Kubernetes namespaces and re-deploy the initial manifests.\r\n\r\n### Motivation\r\n\r\nEase the flow when running multiple argo workflows.\r\nThis allows to not implementing the deletion in each argo workflow.\r\n\r\n```bash\r\npupernetes reset default\r\n```\r\n\r\nThe default namespace can also be reset with:\r\n```bash\r\npupernetes reset kube-system --apply\r\n```\r\n\r\nAll namespaces can also be reset with:\r\n```bash\r\npupernetes reset $(kubectl get ns -o name) --apply\r\n```\r\n\r\nOr with a SIGSTP:\r\n```\r\nsudo ./pupernetes daemon run sandbox/\r\nI0605 12:10:29.656861   10858 clean.go:32] Removed /home/jb/go/src/github.com/DataDog/pupernetes/sandbox/etcd-data\r\nI0605 12:10:29.657341   10858 clean.go:32] Removed /var/lib/p8s-kubelet\r\nI0605 12:10:29.657991   10858 clean.go:32] Removed /var/log/pods/\r\nI0605 12:10:29.658005   10858 clean.go:144] Cleanup successfully finished\r\nI0605 12:10:29.728060   10858 hostname.go:59] Using hostname: \"v1704\"\r\nI0605 12:10:29.899344   10858 systemd.go:108] Already created systemd unit: p8s-kubelet.service, untouched\r\nI0605 12:10:29.899458   10858 systemd.go:108] Already created systemd unit: p8s-etcd.service, untouched\r\nI0605 12:10:32.585274   10858 setup.go:264] Setup ready /home/jb/go/src/github.com/DataDog/pupernetes/sandbox\r\nI0605 12:10:32.585569   10858 run.go:76] Timeout for this current run is 6h0m0s\r\nI0605 12:10:32.585642   10858 systemd.go:40] Starting systemd unit: p8s-etcd.service ...\r\nI0605 12:10:32.951535   10858 systemd.go:40] Starting systemd unit: p8s-kubelet.service ...\r\nI0605 12:10:33.954525   10858 state.go:38] Kubenertes apiserver not ready yet: Get http://127.0.0.1:8080/healthz: dial tcp 127.0.0.1:8080: connect: connection refused\r\nI0605 12:10:36.955732   10858 state.go:68] Kubelet log reports 1 running pods\r\nI0605 12:10:38.954640   10858 state.go:77] Kube apiserver restart count: 2\r\nI0605 12:10:41.957123   10858 state.go:38] Kubenertes apiserver not ready yet: bad status code for http://127.0.0.1:8080/healthz: 500\r\nI0605 12:10:44.956694   10858 kubectl.go:14] Calling kubectl apply -f /home/jb/go/src/github.com/DataDog/pupernetes/sandbox/manifest-api ...\r\nI0605 12:10:45.384859   10858 kubectl.go:21] Successfully applied manifests:\r\nserviceaccount \"coredns\" created\r\nclusterrole.rbac.authorization.k8s.io \"system:coredns\" created\r\nclusterrolebinding.rbac.authorization.k8s.io \"system:coredns\" created\r\nconfigmap \"coredns\" created\r\ndeployment.extensions \"coredns\" created\r\nservice \"coredns\" created\r\nserviceaccount \"kube-controller-manager\" created\r\npod \"kube-controller-manager\" created\r\ndaemonset.extensions \"kube-proxy\" created\r\ndaemonset.extensions \"kube-scheduler\" created\r\nclusterrolebinding.rbac.authorization.k8s.io \"p8s-admin\" created\r\nI0605 12:10:45.384915   10858 run.go:187] Pupernetes is ready\r\nI0605 12:10:46.955585   10858 state.go:68] Kubelet log reports 2 running pods\r\nI0605 12:10:46.972436   10858 state.go:59] Kubelet API reports 2 running pods\r\nI0605 12:10:52.954998   10858 state.go:68] Kubelet log reports 4 running pods\r\nI0605 12:10:52.966961   10858 state.go:59] Kubelet API reports 4 running pods\r\nI0605 12:10:56.955074   10858 state.go:68] Kubelet log reports 5 running pods\r\nI0605 12:10:58.967959   10858 state.go:59] Kubelet API reports 5 running pods\r\n^ZI0605 12:11:07.142576   10858 stop.go:39] Graceful deleting API resources ...\r\nI0605 12:11:14.546302   10858 delete.go:308] Graceful deleted API resources in 3 namespaces\r\nI0605 12:11:15.558582   10858 stop.go:63] Kubelet run only 1 static pods\r\nI0605 12:11:15.558618   10858 kubectl.go:14] Calling kubectl apply -f /home/jb/go/src/github.com/DataDog/pupernetes/sandbox/manifest-api ...\r\nI0605 12:11:15.808964   10858 kubectl.go:21] Successfully applied manifests:\r\nserviceaccount \"coredns\" created\r\nclusterrole.rbac.authorization.k8s.io \"system:coredns\" configured\r\nclusterrolebinding.rbac.authorization.k8s.io \"system:coredns\" configured\r\nconfigmap \"coredns\" created\r\ndeployment.extensions \"coredns\" created\r\nservice \"coredns\" created\r\nserviceaccount \"kube-controller-manager\" created\r\npod \"kube-controller-manager\" created\r\ndaemonset.extensions \"kube-proxy\" created\r\ndaemonset.extensions \"kube-scheduler\" created\r\nclusterrolebinding.rbac.authorization.k8s.io \"p8s-admin\" configured\r\nI0605 12:11:15.809147   10858 state.go:68] Kubelet log reports 6 running pods\r\nI0605 12:11:15.811297   10858 state.go:59] Kubelet API reports 1 running pods\r\nI0605 12:11:16.954797   10858 state.go:68] Kubelet log reports 7 running pods\r\nI0605 12:11:16.955950   10858 state.go:59] Kubelet API reports 2 running pods\r\nI0605 12:11:20.954561   10858 state.go:68] Kubelet log reports 9 running pods\r\nI0605 12:11:22.973927   10858 state.go:59] Kubelet API reports 3 running pods\r\nI0605 12:11:24.966890   10858 state.go:59] Kubelet API reports 4 running pods\r\nI0605 12:11:26.956232   10858 state.go:68] Kubelet log reports 10 running pods\r\nI0605 12:11:28.969679   10858 state.go:59] Kubelet API reports 5 running pods\r\nI0605 12:11:34.955346   10858 state.go:68] Kubelet log reports 5 running pods\r\n```"},"comment":{"url":"https://api.github.com/repos/DataDog/pupernetes/issues/comments/394732507","html_url":"https://github.com/DataDog/pupernetes/pull/41#issuecomment-394732507","issue_url":"https://api.github.com/repos/DataDog/pupernetes/issues/41","id":394732507,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDczMjUwNw==","user":{"login":"JulienBalestra","id":8077192,"node_id":"MDQ6VXNlcjgwNzcxOTI=","avatar_url":"https://avatars2.githubusercontent.com/u/8077192?v=4","gravatar_id":"","url":"https://api.github.com/users/JulienBalestra","html_url":"https://github.com/JulienBalestra","followers_url":"https://api.github.com/users/JulienBalestra/followers","following_url":"https://api.github.com/users/JulienBalestra/following{/other_user}","gists_url":"https://api.github.com/users/JulienBalestra/gists{/gist_id}","starred_url":"https://api.github.com/users/JulienBalestra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JulienBalestra/subscriptions","organizations_url":"https://api.github.com/users/JulienBalestra/orgs","repos_url":"https://api.github.com/users/JulienBalestra/repos","events_url":"https://api.github.com/users/JulienBalestra/events{/privacy}","received_events_url":"https://api.github.com/users/JulienBalestra/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T14:33:21Z","updated_at":"2018-06-05T14:33:21Z","author_association":"COLLABORATOR","body":"The commit 80182f4 is supposed to solve that kind of issue: https://circleci.com/gh/DataDog/pupernetes/411"}}
{"actor":{"display_login":"JulienBalestra"}}