Kustomize secrets seem to work fine in a mono-repo scenario with all the deployment config together. How does one deal with microservices where each component is in its own repo? I could move the manifests together in a devops
repo, but seems odd to separate the manifest from the respective component.
Asked
Active
Viewed 232 times
0

Jason Leach
- 3,889
- 7
- 37
- 54
1 Answers
0
It will be very dependent of your way to manage your configuration. In my case, all my services repositories are basically bases (in kustomize parlance). I don't include any secret in them.
My overall production or testing environment is an overlay that include all the bases or overlays that it needs. In the case the bases and overlays are my services. I include the secrets directly in my environment overlay.
At this point you probably realized that you need a way to specify your secrets names or some place holder in your bases or services repositories. There is few solutions:
- you could just patch all the resources that reference your secrets, but that a lot of work
- you can define some naming convention for your secrets and know in advance what the secret name will be (that the way I usually go about it).
If you use kustomize secret generator, you'll pretty much be stuck with the second solution.

ITChap
- 4,057
- 1
- 21
- 46