{"id":19044388,"url":"https://github.com/tilt-dev/kubectl-blame-examples","last_synced_at":"2025-06-13T07:04:29.896Z","repository":{"id":48406721,"uuid":"301245228","full_name":"tilt-dev/kubectl-blame-examples","owner":"tilt-dev","description":"https://sched.co/ekAv","archived":false,"fork":false,"pushed_at":"2023-02-08T22:41:18.000Z","size":192,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-23T23:35:55.586Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tilt-dev.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":"2020-10-04T23:07:50.000Z","updated_at":"2021-02-12T07:36:15.000Z","dependencies_parsed_at":"2024-06-19T13:34:49.233Z","dependency_job_id":"ca7fab2b-d682-4b37-af24-84992b882623","html_url":"https://github.com/tilt-dev/kubectl-blame-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tilt-dev/kubectl-blame-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fkubectl-blame-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fkubectl-blame-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fkubectl-blame-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fkubectl-blame-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilt-dev","download_url":"https://codeload.github.com/tilt-dev/kubectl-blame-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilt-dev%2Fkubectl-blame-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259599314,"owners_count":22882350,"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","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-08T22:46:10.587Z","updated_at":"2025-06-13T07:04:29.857Z","avatar_url":"https://github.com/tilt-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubectl-blame-examples\n\n[![Build Status](https://circleci.com/gh/tilt-dev/kubectl-blame-examples/tree/main.svg?style=shield)](https://circleci.com/gh/tilt-dev/kubectl-blame-examples)\n\nThis repository contains a simplified version of Tilt that's used for teaching and talks.\n\n[In Search of a `kubectl blame` Command](https://sched.co/ekAv) at [KubeCon 2020](https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/)\n\nEach subdirectory contains a sample app that you can run with:\n\n```\ncd $DIR\ngo run ./main.go\n```\n\nEach sample app does the same basic flow:\n\n1) Build and push the image (with `docker build`, `docker push`, and [some magic](https://github.com/tilt-dev/localregistry-go) to detect the registry)\n2) Apply the deployment (with `kubectl apply`)\n3) Track the deployment's progress (with `kubernetes/client-go`)\n\nThe main difference between each project is how they track the deployment.\n\n## [0-naive](0-naive)\n\nCreates a random image tag and label for each deployment. Watches that label.\n\n**Code:** [main.go](0-naive/main.go)\n\n## [1-kubectl-rollout](1-kubectl-rollout)\n\nUses the approach of `kubectl rollout`, waiting for the deployment to report success.\n\n**Code:** \n- [main.go](1-kubectl-rollout/main.go)\n- [rollout.go](1-kubectl-rollout/rollout/rollout.go) forked from [rollout_status.go](https://github.com/kubernetes/kubectl/blob/5b27ac0ca2ba4fc3453941fcc23ebb54e35a099f/pkg/cmd/rollout/rollout_status.go)\n\n## [2-helm](2-helm)\n\nUses the approach of `helm --wait`, looking up the replicaset and waiting for it to report success\n\n**Code:**\n- [main.go](2-helm/main.go)\n- Uses the Helm Kube client off the shelf, which is fun to read! [wait.go](https://github.com/helm/helm/blob/fc9b46067f8f24a90b52eba31e09b31e69011e93/pkg/kube/wait.go#L52)\n\n## [3-kubespy](3-kubespy)\n\nUses the approach of `kubespy trace`, using owner references to find everything.\n\n**Code:**\n- [main.go](3-kubespy/main.go)\n- [trace.go](3-kubespy/kubespy/trace.go) forked from `traceDeployment` in [trace.go](https://github.com/pulumi/kubespy/blob/438edbfd5a9a72992803d45addb1f45b10a0b62f/cmd/trace.go#L104)\n\n## [4-tilt](4-tilt)\n\nUses the current Tilt approach, with a combination of owner refs and template hashes.\n\n**Code:**\n- [main.go](4-tilt/main.go)\n- [pod_template_hash.go](4-tilt/tilt/pod_template_hash.go) computes labels, forked from [pod_template.go](https://github.com/tilt-dev/tilt/blob/9511b7fdf7ca171d8094ff3b5828df8dfa2dd64d/internal/k8s/pod_template.go)\n- [owner_fetcher_go.go](4-tilt/tilt/owner_fetcher.go) computes the owner tree, forked from [owner_fetcher.go](https://github.com/tilt-dev/tilt/blob/9511b7fdf7ca171d8094ff3b5828df8dfa2dd64d/internal/k8s/owner_fetcher.go)\n\n## License\n\nCopyright 2020 Windmill Engineering\n\nLicensed under [the Apache License, Version 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilt-dev%2Fkubectl-blame-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilt-dev%2Fkubectl-blame-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilt-dev%2Fkubectl-blame-examples/lists"}