Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

add: regex to check valid key for k8s and multiline envs #2

Closed
wants to merge 5 commits into from

Conversation

ybelMekk
Copy link
Contributor

@ybelMekk ybelMekk commented Mar 1, 2021

In the documentation from kubernetes you can read: https://v1-18.docs.kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-manually The keys of data and stringData must consist of alphanumeric characters, '-', '_' or '.'.

I think it could be a good to force this so that developers dont add stuff to their secret config not compatible with k8s.

But im not sure the regex is correct according to the k8s spec for accepted values

edit:

Added ability for multiline envs. delimiter && can be replaced with something more elegant/right?

edit 2:

A better approach is to use \ backslash for separate env. vars?

@ybelMekk ybelMekk requested review from a team, kimtore and tronghn March 1, 2021 12:54
@ybelMekk ybelMekk changed the title add: regex to check valid key is passed to env.config add: regex to check valid key is passed to secret manager Mar 1, 2021
@ybelMekk ybelMekk changed the title add: regex to check valid key is passed to secret manager add: regex to check valid key for secret manager Mar 1, 2021
@ybelMekk ybelMekk changed the title add: regex to check valid key for secret manager add: regex to check valid key for k8s and multiline envs Mar 2, 2021
@ybelMekk
Copy link
Contributor Author

ybelMekk commented Mar 3, 2021

Probably a more elegant solution to the problem 🤙 : #3

@ybelMekk ybelMekk closed this Mar 3, 2021
@ybelMekk ybelMekk deleted the add-env-check branch August 22, 2023 07:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant