[ 
https://issues.apache.org/jira/browse/FLINK-30520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gyula Fora updated FLINK-30520:
-------------------------------
    Affects Version/s: kubernetes-operator-1.3.0
                           (was: 1.16.0)
                           (was: 1.14.6)
                           (was: 1.15.3)

> Arguments contains with '#' will error split in loadYAMLResource
> ----------------------------------------------------------------
>
>                 Key: FLINK-30520
>                 URL: https://issues.apache.org/jira/browse/FLINK-30520
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Core
>    Affects Versions: kubernetes-operator-1.3.0
>            Reporter: tanjialiang
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2022-12-28-17-13-25-351.png, 
> image-2022-12-28-17-13-38-337.png, image-2022-12-28-18-03-40-806.png
>
>
> When i submit a flink jar job in Kubernetes Application mode which main args 
> contains '#', it will be error split by 
> org.apache.flink.configuration.GlobalConfiguration#loadYAMLResource
>  
> such as i using flink-kubernetes-operator to submit a job in kubernetes 
> application mode
>  
> {code:java}
> apiVersion: flink.apache.org/v1beta1
> kind: FlinkDeployment
> metadata:
>   name: word-count
> spec:
>   image: apache/flink:1.16.0-scala_2.12-java8
>   flinkVersion: v1_16
>   flinkConfiguration:
>     taskmanager.numberOfTaskSlots: "1"
>   jobManager:
>     resource:
>       memory: "2048m"
>       cpu: 1
>   taskManager:
>     resource:
>       memory: "2048m"
>       cpu: 1
>   serviceAccount: flink
>   job:
>     jarURI: local:///opt/flink/examples/streaming/WordCount.jar
>     args:
>       - --output
>       - /tmp/1#.txt
>     parallelism: 2
>     upgradeMode: stateless
> {code}
>  
>  
> It will be error split when loading the flink-conf.yaml
> !image-2022-12-28-17-13-25-351.png!
>  
> And i enter to the jobmanager's pod to saw the flink-conf.yaml's program-args 
> is right
> !image-2022-12-28-17-13-38-337.png!
>  
> Maybe we should have a more strict validate for yaml comment? this is the 
> yaml editor by vim, we can see comment should be start with '#' in line or 
> comment start with ' #'
> !image-2022-12-28-18-03-40-806.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to