Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ENV VAR kv parsing to handle JSON values #370

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bHacklv
Copy link

@bHacklv bHacklv commented Nov 6, 2024

What

Before fix:

Image

Example of a valid istio k8s annotation that is incorrectly parsed without a fix:

proxy.istio.io/config={ 
"holdApplicationUntilProxyStarts": true, 
"proxyMetadata": { 
  "EXIT_ON_ZERO_ACTIVE_CONNECTIONS": "true" 
  } 
}

How

  1. Parse ENV VAR value with Regex Pattern that checks for JSON values
  2. Fallback to Regex Pattern that extracts k:v as it was done before with Splitter stream.

Recommended reading order

N/A

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@CLAassistant
Copy link

CLAassistant commented Nov 6, 2024

CLA assistant check
All committers have signed the CLA.

@bHacklv bHacklv changed the title fix: ENV VAR kv parsing to handle json values fix: ENV VAR kv parsing to handle JSON values Nov 6, 2024
@bHacklv bHacklv force-pushed the bHacklv/kv-env-parser-fix branch 4 times, most recently from 11484d9 to eab0669 Compare November 11, 2024 14:45
- JOB_KUBE_ANNOTATIONS can have JSON as value
- This fixes the parsin of such values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants