Secrets are a special kind of configuration. They need to be protected from being read by the other microservices that are using them. They are typically sensitive data, such as private keys, encryption keys, and passwords.
Remember that reading a secret is a valid operation. After all, they need to be used. What differentiates a secret from other configuration parameters is that they need to be protected so only the authorized sources are able to read them.
The secrets should be injected by the environment. This requires the code to be able to retrieve the configuration secrets and use the proper one for the current environment. It also avoids storing the secret inside the code.
Remember never to commit production secrets in your Git repositories. The Git tree means that, even if it's deleted, the secret is retrievable. This includes the GitOps...