motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.79k stars 318 forks source link

Make .Values.deployment.databaseDSN optional #431

Closed antonu17 closed 4 years ago

antonu17 commented 4 years ago

What does this PR do?

When using Atlas cloud provider, the MongoDB connection string will contain credentials that people don't want to store as clear text in values.yaml.

Environment variables defined in pod's spec env section have higher priority than environment variables defined via envFrom (see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#container-v1-core)

envFrom: ... When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence.

This PR makes .Values.deployment.databaseDSN optional, so DATABASE_DSN can be defined via a Config Map or a Secret.

fftorres commented 4 years ago

+1

Approved with Zappr Approved with Zappr Approved with Zappr Approved with Zappr

codecov[bot] commented 4 years ago

Codecov Report

Merging #431 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #431   +/-   ##
=======================================
  Coverage   40.46%   40.46%           
=======================================
  Files          76       76           
  Lines        2659     2659           
=======================================
  Hits         1076     1076           
  Misses       1520     1520           
  Partials       63       63

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 10d2b39...79eea17. Read the comment docs.