You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have code that does stuff with files at startup depending on the file extension.
It would be nice to be able to use a dot (.) in a secrets key. This would be very handy when mounting the secret as a file (using fromFiles in the nais manifest).
I understand that it's impossible if the secret is used as an environment entry (envFrom), but you could fail application startup if a secret with a dot in the key is used as an environment variable (or be nice and replace the dot with an underscore at startup).
And while I'm at it, why not allow dash, -, as well?
The text was updated successfully, but these errors were encountered:
tronghn
changed the title
be able to use . in key names
secrets: relax key name restrictions
Apr 22, 2024
Please correct me if I've misunderstood, but the short version is that you would like to be able to use the . and - characters when defining Secret keys? 🙂
The original intention was to be compliant with the POSIX shell standards for environment variable names, though this evidently complicates matters when a Secret is mounted as files.
We're likely not going to introduce implicit behaviours that modify or replace keys as that will only lead to further confusion, but we can consider relaxing the current restrictions similarily to kubernetes/kubernetes#48986
Beskrivelse / Essensen
Lette på restriksjoner for nøkler tilhørende Secrets slik at vi også tillater
-
og.
Investeringsvilje
<1 uke
Ikke-mål
Mulig løsning i grove trekk
Oppdatere valideringskode i console-frontend og api:
console-frontend/src/routes/team/[team]/(teamPages)/[env]/secret/[secret]/AddKeyValue.svelte
Lines 31 to 53 in f3f86d7
For api kan man evt. bare bruke
validation.IsEnvVarName()
direkte.Original comment below:
We have code that does stuff with files at startup depending on the file extension.
It would be nice to be able to use a dot (.) in a secrets key. This would be very handy when mounting the secret as a file (using fromFiles in the nais manifest).
I understand that it's impossible if the secret is used as an environment entry (envFrom), but you could fail application startup if a secret with a dot in the key is used as an environment variable (or be nice and replace the dot with an underscore at startup).
And while I'm at it, why not allow dash, -, as well?
The text was updated successfully, but these errors were encountered: