add pattern match for windmill stored secrets

This commit is contained in:
Sunil Kumar
2023-07-20 02:12:36 +05:30
parent 0f8b505c78
commit aa019e1501
+2 -1
View File
@@ -1993,7 +1993,8 @@ const syncSecretsWindmill = async ({
Object.keys(secrets).forEach( Object.keys(secrets).forEach(
(key) => { (key) => {
if(key.startsWith("u/") || key.startsWith("f/")) { const pattern = new RegExp('^([a-zA-Z0-9])\/([a-zA-Z-0-9])+\/([a-zA-Z0-9])+')
if((key.startsWith("u/") || key.startsWith("f/")) && pattern.test(key)) {
if(secretsResList.includes(key)) { if(secretsResList.includes(key)) {
modifiedFormatForUpdateSecretInjection.push({ modifiedFormatForUpdateSecretInjection.push({
path: key, path: key,