I'm currently migrating my rest API to Google Cloud. I'm trying to setup a CI/CD pipeline on Kubernetes. So far I managed to build my Docker image with Cloud Build via a Github trigger. I created a pipeline with Cloud Deploy that builds and launch Kubernetes pods on staging and production.
Now I'm trying to inject environment variables to each Kubernetes clusters based on the stage of the pipeline (staging, production, ...).
I managed to create a secret with all my env variables for each environment. But now I don't know how to inject the right secret in the right cluster. Is there a way to get the env for skaffold to render the correct pod config ? Something like that :
envFrom:
- secretRef:
name: ${env}-api
Or any other better practice.
Thank you