{"id":20419394,"url":"https://github.com/risingstack/anchor","last_synced_at":"2026-03-06T22:32:11.141Z","repository":{"id":80615401,"uuid":"91232392","full_name":"RisingStack/anchor","owner":"RisingStack","description":"Turns Kubernetes resources into a Helm chart","archived":false,"fork":false,"pushed_at":"2017-06-20T14:17:14.000Z","size":33,"stargazers_count":38,"open_issues_count":0,"forks_count":8,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-07-27T09:35:33.441Z","etag":null,"topics":["anchor","backup","helm","helm-charts","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/RisingStack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-05-14T09:14:52.000Z","updated_at":"2023-05-01T08:32:03.000Z","dependencies_parsed_at":"2023-05-09T15:24:53.064Z","dependency_job_id":null,"html_url":"https://github.com/RisingStack/anchor","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":0.02777777777777779,"last_synced_commit":"490a225d8ca7446efe756d922bf0109d9adfd1b9"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/RisingStack/anchor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fanchor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fanchor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fanchor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fanchor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RisingStack","download_url":"https://codeload.github.com/RisingStack/anchor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RisingStack%2Fanchor/sbom","scorecard":{"id":121175,"data":{"date":"2025-08-11","repo":{"name":"github.com/RisingStack/anchor","commit":"490a225d8ca7446efe756d922bf0109d9adfd1b9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T02:27:48.363Z","repository_id":80615401,"created_at":"2025-08-16T02:27:48.363Z","updated_at":"2025-08-16T02:27:48.363Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271395150,"owners_count":24752056,"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-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["anchor","backup","helm","helm-charts","kubernetes"],"created_at":"2024-11-15T06:36:47.826Z","updated_at":"2026-03-06T22:32:11.072Z","avatar_url":"https://github.com/RisingStack.png","language":"JavaScript","readme":"# Anchor\n\nBackups Kubernetes resources as a Helm chart.  \nExtract configurations from resources and save them as values and templates in a reproducible [Helm](https://github.com/kubernetes/helm) chart.\n\n![Anchor - Kubernetes backup](https://cloud.githubusercontent.com/assets/1764512/26036522/775a4ef2-38df-11e7-8ee0-a45e70578495.png)\n\n## How to use it?\n\n### Requirements\n\n- Node.js, `\u003e= v6`\n- kubectl\n\n```sh\nnpm install @risingstack/anchor\n```\n\n### Example\n\nFor more detailed examples like sub-charts check out the `./example` folder.\n\n```js\nconst anchor = require('@risingstack/anchor')\n\nanchor.snapshot({\n  resources: [\n    'deployment/my-app',\n    'deployment/my-worker'\n  ]\n})\n  .then(() =\u003e console.log('Snapshot finished'))\n  .catch((err) =\u003e console.error('Snapshot error', err))\n```\n\n## API\n\n### anchor.snapshot(options)\n\nBackup Kubernetes resources as a Helm chart and returns a `Promise`.\n\n- `options.resources`: Kubernetes resources to snapshot\n  - **required**\n  - example: `['deployment/my-app', 'deployment/my-worker']`\n- `options.namespace`: Kubernetes namespace for `kubectl`\n  - *optional*\n  - default: `default`\n- `options.name`: name of the Helm chart\n  - *optional*\n  - default: `my-chart`\n- `options.description`: description of the Helm chart\n  - *optional*\n  - default: `''`\n- `options.version`: version of the Helm chart\n  - *optional*\n  - default: `0.0.1`\n- `options.overwrite`: overwrite output directory\n  - *optional*\n  - default: `false`\n- `options.outputPath`: defines chart path, throws error when exist but overwrite is `false`\n  - *optional*\n  - default: `./output`\n\n## How does it work?\n\n1. Download Kubernetes resource via `kubectl`\n2. Parse resource, extract values and transform to template\n3. Outputs a Helm chart: YAML templates and `values.yaml`\n\n## What can it extract as a template?\n\n- Containers with name or single container\n- Container environment variables with value\n- Container image with tag\n- Deployment replicas\n- Secret data\n- Service type\n\n**TODO:**\n\n - ConfigMap\n - PVC\n - Ingress\n - Job\n\n## Output\n\nThe `./output` directory will contains the templates under the `./output/templates` folder.  \nYour `Values.yaml` file will look like the following:\n\n```yaml\ndeploymentMyApp:\n  image: my-company/my-app\n  imageTag: 1f40c1f\n  envLogLevel: info\n  resourcesLimitsCPU: 150m\n  resourcesLimitsMemory: 1536Mi\n  resourcesRequestsCPU: 10m\n  resourcesRequestsMemory: 128Mi\n  replicas: 2\ndeploymentMyWorker:\n  containers:\n    myWorker:\n      image: my-company/my-worker\n      imageTag: 295a9c2\n      envLogLevel: warning\n      envTraceServiceName: my-worker\n      resourcesLimitsCPU: 200m\n      resourcesLimitsMemory: 1536Mi\n      resourcesRequestsCPU: 20m\n      resourcesRequestsMemory: 128Mi\n    mySidecar:\n      image: my-company/metrics-exporter\n      imageTag: aa1c434\n  replicas: 2\n```\n\n## Feature ideas:\n\n- Versioning\n- Snapshot reload by date\n- Auto-sync *(auto snapshot)*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frisingstack%2Fanchor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frisingstack%2Fanchor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frisingstack%2Fanchor/lists"}