{"id":18801799,"url":"https://github.com/shadowapex/composite-secrets-controller","last_synced_at":"2026-01-04T17:30:17.386Z","repository":{"id":78532847,"uuid":"549200301","full_name":"ShadowApex/composite-secrets-controller","owner":"ShadowApex","description":"Kubernetes operator for combining data from multiple ConfigMap and Secret sources into a single Secret","archived":false,"fork":false,"pushed_at":"2022-10-10T21:15:52.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-29T19:58:13.250Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShadowApex.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-10T20:41:19.000Z","updated_at":"2022-10-10T20:44:06.000Z","dependencies_parsed_at":"2023-05-21T11:00:14.556Z","dependency_job_id":null,"html_url":"https://github.com/ShadowApex/composite-secrets-controller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowApex%2Fcomposite-secrets-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowApex%2Fcomposite-secrets-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowApex%2Fcomposite-secrets-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowApex%2Fcomposite-secrets-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShadowApex","download_url":"https://codeload.github.com/ShadowApex/composite-secrets-controller/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239734643,"owners_count":19688257,"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-07T22:25:19.245Z","updated_at":"2026-01-04T17:30:15.318Z","avatar_url":"https://github.com/ShadowApex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Composite Secrets Controller\n\nThe Composite Secrets Controller is a Kubernetes controller that allows you\nto combine the data from multiple ConfigMap and Secret sources into a single\nSecret.\n\n## Description\n\nVery often configuration files defined as Secrets reference the same secrets\nover and over again. The Composite Secrets Controller allows you to define\na single secret that combines the data from multiple ConfigMap or Secret\nsources. This can also be especially useful in situations when you are storing\nKubernetes manifests in a Git repo and use [SOPS Encrypted Secrets](https://fluxcd.io/flux/guides/mozilla-sops/)\nand want to store non-sensitive parts of a secret in plain-text and reference\nencrypted secrets.\n\nThe controller works by watching for `CompositeSecret` objects that get created\nin the cluster, and generates a corresponding secret that combines multiple\nsecrets into one.\n\nAn example of a `CompositeSecret` looks like this:\n\n```yaml\napiVersion: composite.shadowblip.com/v1alpha1\nkind: CompositeSecret\nmetadata:\n  name: compositesecret-sample\nspec:\n  replacements:\n    REPLACEME:\n      secretRef:\n        name: compositesecret-sample-source\n        namespace: default\n        key: mykey\n  template:\n    stringData:\n      my-thing: |\n        Here we say REPLACEME\n```\n\nThere are two main parts to a `CompositeSecret`: replacements and template.\nThe \"replacements\" section defines any number of keywords you want to replace\nin the \"template\" section along with a `secretRef` or `configMapRef` that the\ncontroller will use to replace the keyword in the template with.\n\nThe \"template\" section contains your plain-text secret data. Any keywords found\nin the data you define here will get replaced with the values defined in the\n\"replacements\" section.\n\n**NOTE: Make sure your keywords don't show up anywhere in your secret data or they will also be replaced!**\n\n## Getting Started\n\nYou’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.\n**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).\n\n### Running on the cluster\n\n1. Install Instances of Custom Resources:\n\n```sh\nkubectl apply -f config/samples/\n```\n\n2. Build and push your image to the location specified by `IMG`:\n\n```sh\nmake docker-build docker-push IMG=\u003csome-registry\u003e/composite-secrets-controller:tag\n```\n\n3. Deploy the controller to the cluster with the image specified by `IMG`:\n\n```sh\nmake deploy IMG=\u003csome-registry\u003e/composite-secrets-controller:tag\n```\n\n### Uninstall CRDs\n\nTo delete the CRDs from the cluster:\n\n```sh\nmake uninstall\n```\n\n### Undeploy controller\n\nUnDeploy the controller to the cluster:\n\n```sh\nmake undeploy\n```\n\n## Contributing\n\n// TODO(user): Add detailed information on how you would like others to contribute to this project\n\n### How it works\n\nThis project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)\n\nIt uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/)\nwhich provides a reconcile function responsible for synchronizing resources untile the desired state is reached on the cluster\n\n### Test It Out\n\n1. Install the CRDs into the cluster:\n\n```sh\nmake install\n```\n\n2. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):\n\n```sh\nmake run\n```\n\n**NOTE:** You can also run this in one step by running: `make install run`\n\n### Modifying the API definitions\n\nIf you are editing the API definitions, generate the manifests such as CRs or CRDs using:\n\n```sh\nmake manifests\n```\n\n**NOTE:** Run `make --help` for more information on all potential `make` targets\n\nMore information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)\n\n## License\n\nCopyright 2022.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowapex%2Fcomposite-secrets-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowapex%2Fcomposite-secrets-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowapex%2Fcomposite-secrets-controller/lists"}