{"id":23698047,"url":"https://github.com/inloco/sops-kustomize-generator-plugin","last_synced_at":"2025-07-18T09:35:35.206Z","repository":{"id":48407309,"uuid":"211245716","full_name":"inloco/sops-kustomize-generator-plugin","owner":"inloco","description":"SOPS Kustomize Generator Plugin","archived":false,"fork":false,"pushed_at":"2025-05-05T19:35:21.000Z","size":184,"stargazers_count":7,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-05T19:43:15.691Z","etag":null,"topics":["hacktoberfest","kubernetes","kustomize","sops"],"latest_commit_sha":null,"homepage":"","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/inloco.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-27T05:53:00.000Z","updated_at":"2025-05-05T19:01:29.000Z","dependencies_parsed_at":"2022-09-02T01:10:43.402Z","dependency_job_id":"b011e557-bc19-45cb-9353-682b6d1bf545","html_url":"https://github.com/inloco/sops-kustomize-generator-plugin","commit_stats":{"total_commits":47,"total_committers":7,"mean_commits":6.714285714285714,"dds":0.6595744680851063,"last_synced_commit":"a55e3ce40df62a074052a2bb984dd27e3688107b"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/inloco/sops-kustomize-generator-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloco%2Fsops-kustomize-generator-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloco%2Fsops-kustomize-generator-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloco%2Fsops-kustomize-generator-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloco%2Fsops-kustomize-generator-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inloco","download_url":"https://codeload.github.com/inloco/sops-kustomize-generator-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloco%2Fsops-kustomize-generator-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265735056,"owners_count":23819657,"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":["hacktoberfest","kubernetes","kustomize","sops"],"created_at":"2024-12-30T07:13:25.802Z","updated_at":"2025-07-18T09:35:35.185Z","avatar_url":"https://github.com/inloco.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SOPS Kustomize Generator Plugin\n\nIt is a plugin for [Kustomize](https://github.com/kubernetes-sigs/kustomize) that allows you to use Kubernetes Secrets encrypted with [SOPS](https://github.com/mozilla/sops) as a generator.\n\n## Getting Started\n\n### Install\n\nTo install this plugin on Kustomize, download the binary to Kustomize Plugin folder with `apiVersion: inloco.com.br/v1` and `kind: SOPS`. Then make it executable.\n\n#### Linux 64-bits and/or macOS 64-bits\n\n```bash\nVERSION=\"$(wget -qO- 'https://api.github.com/repos/inloco/sops-kustomize-generator-plugin/releases/latest' | jq -r '.tag_name')\"\n\nwget -qO- \"https://github.com/inloco/sops-kustomize-generator-plugin/releases/download/${VERSION}/install.sh\" | sh\n```\n\n#### Manual Build and Install for Other Systems and/or Architectures\n\n```bash\ngit clone 'https://github.com/inloco/sops-kustomize-generator-plugin'\n\ncd sops-kustomize-generator-plugin\n\ngo get -d -v ./...\n\ngo build -a -installsuffix cgo -ldflags '-extldflags \"-static\" -s -w' -tags netgo -v ./...\n\nPLACEMENT=\"${XDG_CONFIG_HOME:-${HOME}/.config}/kustomize/plugin/inloco.com.br/v1/sops\"\n\nmkdir -p \"${PLACEMENT}\"\n\nmv ./sops-kustomize-generator-plugin \"${PLACEMENT}/SOPS\"\n\ncd ..\n\nrm -fR sops-kustomize-generator-plugin\n```\n\n### Using\n\nWe can start with a regular Kubernetes Secret in its YAML format.\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: mysecret\ntype: Opaque\ndata:\n  username: YWRtaW4=\n  password: MWYyZDFlMmU2N2Rm\n```\n\nTo convert it to a file that will be processed by the plugin, we replace `apiVersion: v1` with `apiVersion: inloco.com.br/v1` and `kind: Secret` with `kind: SOPS`.\n\n```yaml\napiVersion: inloco.com.br/v1\nkind: SOPS\nmetadata:\n  name: mysecret\ntype: Opaque\ndata:\n  username: YWRtaW4=\n  password: MWYyZDFlMmU2N2Rm\n```\n\nFinally we encrypt it using SOPS with the following command:\n\n```bash\nsops --encrypt --encrypted-regex '^(data|stringData)$' --in-place ./secret.yaml\n```\n\nNow we can specify `./secret.yaml` as a generator on `kustomization.yaml`:\n\n```yaml\napiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\ngenerators:\n  - ./secret.yaml\n```\n\n## Notes\n\n- Remember to use `--enable-alpha-plugins` flag when running `kustomize build`.\n- You may need to use environment variables, such as `AWS_PROFILE`, to configure SOPS decryption when running Kustomize.\n- Integrity checks are disabled on SOPS decryption, this is done to prevent integrity failures due to Kustomize sorting the keys of original YAML file.\n- This documentation assumes that you are familiar with [Kustomize](https://github.com/kubernetes-sigs/kustomize) and [SOPS](https://github.com/mozilla/sops), read their documentation if necessary.\n- To make the generator behave like a patch, you might want to set `kustomize.config.k8s.io/behavior` annotation to `\"merge\"`. The other internal annotations described on [Kustomize Plugins Guide](https://kubernetes-sigs.github.io/kustomize/guides/plugins/#generator-options) are also supported.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finloco%2Fsops-kustomize-generator-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finloco%2Fsops-kustomize-generator-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finloco%2Fsops-kustomize-generator-plugin/lists"}