nais / naisd

nais deployment daemon
https://nais.io
MIT License
27 stars 10 forks source link

Fetch and present resources containing files from Fasit #15

Closed frodesundby closed 7 years ago

frodesundby commented 7 years ago

When an application has resources containing files, such as certificates, naisd should retrieve the files and make them available in the container

joakibj commented 7 years ago

Please note that most fasit apps share the same alias name for certificates and credentials, e.g. "srvvarseloppgave".

Maybe consider when creating env variables some sort of convention that seperates them? E.g. "srvvarseloppgave_cert" ?

joakibj commented 7 years ago

As expected when defining in the nais yaml:

  - alias: srvvarseloppgave
    resourceType: credential
  - alias: srvvarseloppgave
    resourceType: certificate

Then the env variables exposed to the containers are:

srvvarseloppgave_username:                                srvvarseloppgave
srvvarseloppgave_password:                                <set to the key 'srvvarseloppgave_password' in secret 'varseloppgave'>  Optional: false
srvvarseloppgave_keystorealias:                           app-key
srvvarseloppgave_password:                                <set to the key 'srvvarseloppgave_password' in secret 'varseloppgave'>  Optional: false

A workaround is to rename the certificate Fasit alias to e.g. srvvarseloppgave_cert, but it should be supported by nais. Credentials and certificates in Basta create the same Fasit alias name per default.

gtcno commented 7 years ago

To be continued here. Closing