A tool must read secrets at runtime in both GitHub Actions and EKS. How do you design secret loading?
IntermediateScenarioTesting, CI/CD, packaging & services
Answer
Situation read → Same code, different environments.
What I'd do →
- The code reads configuration from environment variables only (
pydantic-settingsmodel). - In GitHub Actions, secrets come from OIDC + Secrets Manager (
aws secretsmanager get-secret-valueor the official action) into env vars, masked. - In EKS, External Secrets Operator syncs Secrets Manager into a Kubernetes Secret mounted as env.
- The tool never knows where the secret came from.
Why → Environment-agnostic code with platform-specific injection keeps the tool simple and testable.
Interview tip → "Twelve-factor config" is the reference to make.
More on Testing, CI/CD, packaging & services
You join a team whose Python automation repo has no tests. Where do you start?BeginnerYour pytest suite takes 12 minutes. How do you speed it up?IntermediateA test passes locally but fails in CI only when run with the rest of the suite. What do you suspect?IntermediateYou want a reusable CI pipeline for 15 Python tool repos. What goes in it?IntermediateYour Python Docker image is 1.1 GB. How do you shrink it?IntermediateYou want to distribute an internal CLI to 200 engineers. What are your options?Intermediate