dashboard
dashboard copied to clipboard
Configure multi-line value env inside deployment yaml return 500
Environment
Installation method: Deployment
Kubernetes version: v1.15.3
Dashboard version: v1.10.1
Operating system: CentOS 7.1
Node.js version ('node --version' output):
Go version ('go version' output):
Steps to reproduce
- edit a deployment, set the env name-value pair with the following:
"spec": {
"containers": [
{
"name": "main",
"image": "xxx",
"env": [
{
"name": "WORKS_ENV_NAME",
"value": "WORKS_VALUE"
},
{
"name": "ERROR_ENV_NAME",
"value": "
catalina.fields.service=nginx-log
catalina.multiline.pattern='^\['
catalina.multiline.negate=true
catalina.multiline.match=after"
}
...
- while I click save, dashboard would throws error like the below:
Called API: https://DASHBOARD_DOMAIN/api/v1/_raw/deployment/namespace/NS/name/DEPLOYMENT_NAME
PUT HTTP 500
invalid character '\n' in string literal
Observed result
As the result, it throws invalid character '\n' in string literal
Expected result
Dashboard should support multi-line env value, and pod could read the env value as usual.
Comments
Test that on latest v2 beta. v1 is not supported anymore.
Hi @floreks ,
I have been tested such multi-line env settings on Dashboard v2.0.0-beta8+0.g4275399, there is no error output, instead, for example, if I want to set env CUSTOM_CONFIG
with value
# multi-line with \n
catalina.fields.service=nginx-log
catalina.multiline.pattern='^\['
catalina.multiline.negate=true
catalina.multiline.match=after
The result was the CUSTOM_CONFIG
set by value null
. You can also have a try, it's easy to reproduce.
Thanks.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/remove-lifecycle stale any help on multiline/multivlaue variables ?