{"id":23663445,"url":"https://github.com/eyolas/k8s-yaml-filter","last_synced_at":"2025-07-31T13:15:43.362Z","repository":{"id":53294805,"uuid":"252279829","full_name":"eyolas/k8s-yaml-filter","owner":"eyolas","description":"Filter input YAML in Kubernetes format into output (stdin to stdout)","archived":false,"fork":false,"pushed_at":"2021-03-31T19:39:47.000Z","size":16,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-23T23:15:37.185Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eyolas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-01T20:28:23.000Z","updated_at":"2023-03-10T08:05:08.000Z","dependencies_parsed_at":"2022-08-19T19:20:49.980Z","dependency_job_id":null,"html_url":"https://github.com/eyolas/k8s-yaml-filter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyolas%2Fk8s-yaml-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyolas%2Fk8s-yaml-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyolas%2Fk8s-yaml-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyolas%2Fk8s-yaml-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eyolas","download_url":"https://codeload.github.com/eyolas/k8s-yaml-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239662734,"owners_count":19676435,"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-12-29T05:28:22.079Z","updated_at":"2025-02-19T13:12:55.099Z","avatar_url":"https://github.com/eyolas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-yaml-filter\n\n### Installation\n\n```sh\nnpm i -g k8s-yaml-filter\n```\n\n### usage\n\n```sh\nk8sf [-i type,type] [-o type,type]\n```\n\nTakes stdin, selects only objects in the 'in_filter', discards\nobjects in the 'out_filter', and writes the result to stdout.\n\n\nThe use case is with e.g. Kubernetes, you have a YAML file\nwhich has CRD, webhook, and objects using these.\n\nBy default filter for kind\n\nApply the same YAML 3 times:\n```sh\ncat foo.yaml | k8sf -i CustomResourceDefinition | kubectl apply -f -\ncat foo.yaml | k8sf -i ValidatingWebhookConfiguration | kubectl apply -f -\ncat foo.yaml | kubectl apply -f -\n```\n\non the last run you could choose\n\n-o CustomResourceDefinition,ValidatingWebhookConfiguration\n\nbut its a bit moot since Kubernetes will properly apply the unchanged\nCRD and WebHook\n\n\nfilter on other field:\n```sh\ncat foo.yaml | k8sf -i metadata/namespace=kong,metadata/name=kong | kubectl apply -f -\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyolas%2Fk8s-yaml-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyolas%2Fk8s-yaml-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyolas%2Fk8s-yaml-filter/lists"}