{"id":19299188,"url":"https://github.com/bmatcuk/helm-take-ownership","last_synced_at":"2025-10-18T14:03:50.237Z","repository":{"id":57579800,"uuid":"118646202","full_name":"bmatcuk/helm-take-ownership","owner":"bmatcuk","description":"Transfer ownership of a kubernetes release to helm","archived":false,"fork":false,"pushed_at":"2019-11-28T13:32:11.000Z","size":33,"stargazers_count":11,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T22:10:25.065Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmatcuk.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}},"created_at":"2018-01-23T17:41:33.000Z","updated_at":"2020-05-14T18:16:58.000Z","dependencies_parsed_at":"2022-09-26T19:13:30.960Z","dependency_job_id":null,"html_url":"https://github.com/bmatcuk/helm-take-ownership","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fhelm-take-ownership","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fhelm-take-ownership/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fhelm-take-ownership/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fhelm-take-ownership/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmatcuk","download_url":"https://codeload.github.com/bmatcuk/helm-take-ownership/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250215385,"owners_count":21393788,"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-09T23:10:28.328Z","updated_at":"2025-10-18T14:03:50.149Z","avatar_url":"https://github.com/bmatcuk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [helm-take-ownership]\nTransfer ownership of existing [kubernetes] release to [helm] v2.\n\nLet's say you have an existing [kubernetes] deployment that you want to migrate\nto [helm]. [helm] currently doesn't have any functionality to migrate owneship\nof those existing resources to itself. This plugin attempts to solve that\nproblem.\n\n## How Does it Work?\n[helm] v2 records information about a release in a configmap. When you try to\nupgrade the release, [helm] uses this information to figure out what to do.\nThis plugin simply downloads the existing resource configurations, creates a\n[helm] \"Chart\" with this information, and stores it in a configmap in the\nformat [helm] is expecting. You can then use [helm] to \"upgrade\" this release\nusing a Chart that you have built.\n\n## How Does This Differ From Chartify?\nThink of [helm-take-ownership] as a companion to [chartify]. [chartify] creates\na Chart from existing resources, but it doesn't migrate those resources to\n[helm] control. [helm-take-ownership] can migrate those resources to [helm]'s\ncontrol. So, you migrate your resources with [helm-take-ownership], and then use\n[chartify] to create a Chart from those resources. In the future, if you need\nto make any changes to your Chart, you can use [helm] to upgrade the release\nand everything should (hopefully) work beautifully, as if you used [helm] all\nalong.\n\n## Installation\n[helm-take-ownership] is a [helm] plugin. Installation is simple:\n\n```bash\nhelm plugin install git@github.com:bmatcuk/helm-take-ownership.git\n```\n\n## Usage\n[helm-take-ownership]'s operation is fairly simple. You tell it what resources\nto include in the [helm] release using command line flags, plus any additional\n[kubernetes] connection options (namespace, context, etc) and a name for the\nrelease. For example:\n\n```bash\nhelm own --deploy my-deployment --svc my-service -n stg my-release\n```\n\nThe above example would instruct [helm-take-ownership] to associate a\ndeployment called `my-deployment` and a service called `my-service` in the\n`stg` namespace to a [helm] release called `my-release`.\n\nThe naming of flags for [kubernetes] resources is the same as with `kubectl\nget` (`--deployment`, `--service`, etc), including shorthands (`--deploy`,\n`--svc`, etc). [kubernetes] connection options (such as namespace, context,\netc) are prepended with `k8s` (ex: `--k8s-namespace`, `--k8s-context`, etc).\nIf no [kubernetes] connection options are passed, it will use your default\nconfiguration, the same way `kubectl` will.\n\nFull usage is available from the command line:\n\n```bash\nhelm own --help\n```\n\n## Some Notes\nI built this tool for my own use. Currently, there are two things this plugin\nwill do that you might not want:\n\n1. It will remove any `nodePort` values from services. In my setup, I'm relying\n   on [kubernetes] giving me a random nodePort. When [helm-take-ownership]\n   downloads the resources from [kubernetes], the random nodePort is in the\n   data. If I then try to use [helm] to upgrade this release with a service\n   definition that does not define a nodePort, [helm] removes the nodePort\n   causing [kubernetes] to give me another port. This is undesirable.\n2. It will remove any `selector` from a deployment spec. Similar to point #1:\n   I'm relying on [kubernetes] giving me a default value here. When I do a\n   [helm] upgrade, if I have the selector, [helm] removes it and [kubernetes]\n   recreates it causing a new replicaset to be created. The existing replicaset\n   is \"lost\" in the transition; orphaned and unmanaged.\n\nI think, in the future, it might make sense to have some sort of \"edit\" option\nthat would allow a user to edit the Chart before it is installed to take care\nof these very specific use cases.\n\n## What about helm v3?\nI don't use [kubernetes] or [helm] much in my daily life anymore, so this\nproject is semi-sunset. [helm] v2 is still supported and can be run alongside\nv3. You could migrate your existing deployments to [helm] v2, and then migrate\nfrom v2 to v3.\n\n## Development\n[helm-take-ownership] is written in [go]\n\n```bash\n# Grab latest code\ngit clone git@github.com:bmatcuk/helm-take-ownership.git\ncd helm-take-ownership\n\n# Install plugin locally\n# helm plugin remove own\nhelm plugin install $(pwd)\n\n# Build locally\nmake\n```\n\nIf you'd like to contribute to [helm-take-ownership], submit a pull request.\n\n## TODO\n- [ ] command line switch to switch between [helm] configmaps and secrets\n- [ ] command line switch to set the [helm] namespace (defaults to kube-system)\n- [ ] allow a user to edit the Chart before installing it\n\n[chartify]: https://github.com/appscode/chartify\n[go]: https://golang.org/\n[helm-take-ownership]: https://github.com/bmatcuk/helm-take-ownership\n[helm]: https://helm.sh/\n[kubernetes]: https://kubernetes.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fhelm-take-ownership","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmatcuk%2Fhelm-take-ownership","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fhelm-take-ownership/lists"}