{"id":16755421,"url":"https://github.com/jaysonsantos/kustomize-sops-rs","last_synced_at":"2025-07-27T19:06:48.066Z","repository":{"id":37545033,"uuid":"313424444","full_name":"jaysonsantos/kustomize-sops-rs","owner":"jaysonsantos","description":"Kustomize (exec) plugin to generate secrets/config map from encrypted .env files and simple decrypter","archived":false,"fork":false,"pushed_at":"2024-10-08T15:42:06.000Z","size":69,"stargazers_count":3,"open_issues_count":14,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-14T03:07:36.100Z","etag":null,"topics":["kubernetes","kustomize","kustomize-plugin","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jaysonsantos.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-11-16T20:54:05.000Z","updated_at":"2024-01-24T14:56:00.000Z","dependencies_parsed_at":"2024-03-17T08:31:52.388Z","dependency_job_id":"abfa73e5-f66a-4338-9ba1-2bdc11d7b232","html_url":"https://github.com/jaysonsantos/kustomize-sops-rs","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/jaysonsantos%2Fkustomize-sops-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysonsantos%2Fkustomize-sops-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysonsantos%2Fkustomize-sops-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysonsantos%2Fkustomize-sops-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaysonsantos","download_url":"https://codeload.github.com/jaysonsantos/kustomize-sops-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221820503,"owners_count":16886185,"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":["kubernetes","kustomize","kustomize-plugin","rust"],"created_at":"2024-10-13T03:07:35.583Z","updated_at":"2024-10-28T11:11:25.591Z","avatar_url":"https://github.com/jaysonsantos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kustomize-sops-rs\nKustomize (exec) plugin to generate secrets/config map from encrypted .env files and simple decrypter\n## Requirements\nIt basically needs `sops` binary in your path to work and to run the tests, gpg is also required.\n## Installing\nJust run the following script and it should place the binary on `/usr/local/bin` and it creates the kustomize structure to host the plugin.\n```bash\ncurl -sL https://github.com/jaysonsantos/kustomize-sops-rs/raw/main/install.sh | bash -s\n```\n\nThe output should be like this:\n```\n./install.sh\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100  8139    0  8139    0     0  25675      0 --:--:-- --:--:-- --:--:-- 26003\nDownloading binary https://github.com/jaysonsantos/kustomize-sops-rs/releases/download/v0.1.0/kustomize-sops-x86_64-unknown-linux-musl.gz\nDone\nInstall kustomize-sops-x86_64-unknown-linux-musl to /usr/local/bin/kustomize-sops\nLinking plugins\nLinking kustomize-sops-rs to /home/jayson/.config/kustomize/plugin/kustomize-sops-rs/v1/configmapgenerator/ConfigMapGenerator\nLinking kustomize-sops-rs to /home/jayson/.config/kustomize/plugin/kustomize-sops-rs/v1/secretgenerator/SecretGenerator\nLinking kustomize-sops-rs to /home/jayson/.config/kustomize/plugin/kustomize-sops-rs/v1/simpledecrypt/SimpleDecrypt\n```\n\n## Usage\nThis is a generator so your kustomize file should have something along these lines.\n```yaml\ngenerators:\n  - secrets.yaml\n\n```\nand the secrets file\n```yaml\napiVersion: kustomize-sops-rs/v1\nkind: SecretGenerator\nmetadata:\n  name: secrets\nfiles:\n  - encrypted.yaml\n---\napiVersion: kustomize-sops-rs/v1\nkind: ConfigMapGenerator\nmetadata:\n  name: config-map\nfiles:\n  - encrypted.yaml\n---\napiVersion: kustomize-sops-rs/v1\nkind: SimpleDecrypt\nmetadata:\n  name: simple-decrypt\nfiles:\n  - ingress.enc.yaml\n```\nThe kinds `SecretGenerator` and `ConfigMapGenerator` should generate `Secret` and `ConfigMap` the same\nway kustomize does (with the shiny hashes) but it reads an yaml file with **one level of mapping for now**.\nTo test it, create an encrypted file with sops using the following command (assuming you imported the private key from tests folder)\n```bash\nprintf \"key: value\\npassword: protected\\n\" | \\\nsops -p EBC846D0169D43A96ABA1C31AD471BDF8E8A0484 \\\n     -e --input-type yaml --output-type yaml \\\n     /dev/stdin \u003e encrypted.yaml\n```\n\nAfter this you could just run `kustomize build --enable_alpha_plugins folder` and it should generate your final yaml.\nThe kind `SimpleDecrypt` will just decrypt the file and pass it along, so it has to be a valid kubernetes object as you will probably apply it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaysonsantos%2Fkustomize-sops-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaysonsantos%2Fkustomize-sops-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaysonsantos%2Fkustomize-sops-rs/lists"}