[ 
https://issues.apache.org/jira/browse/FLINK-24321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17419041#comment-17419041
 ] 

Yang Wang commented on FLINK-24321:
-----------------------------------

Maybe I do not make myself clear. What I mean is to support environment 
substitution in the pod template.
 For example, users could first export the "ClusterId" environment and then 
refer to it in the pod-template file just like you have described.

 
{code:java}
  name: flink-log-volume
  hostPath:
    path: /data/log/${ClusterId}/
    type: DirectoryOrCreate
{code}

If this is the case, then we would only need to introduce a powerful yaml 
parser, which could also support environment substitution.



> The Pod Template supports replaceable content
> ---------------------------------------------
>
>                 Key: FLINK-24321
>                 URL: https://issues.apache.org/jira/browse/FLINK-24321
>             Project: Flink
>          Issue Type: New Feature
>          Components: Deployment / Kubernetes
>            Reporter: liuzhuo
>            Priority: Minor
>
> For the current use of pod template, if you want to perform some different 
> configurations for each task, you can only modify the pod template file at 
> present
> For example, if I want to mount the JM/TM log to the host for subsequent 
> viewing, the following configuration will cause the file to be overwritten 
> (the host's /data/log directory)
>  
> {code:java}
>   name: flink-log-volume
>   hostPath:
>     path: /data/log/
>     type: DirectoryOrCreate{code}
>  
> At present, it can only be solved by modifying the pod template. Should we 
> provide a simpler way to use wildcard replacement to make runtime 
> modifications, such as: 
> {code:java}
>   name: flink-log-volume
>   hostPath:
>     path: /data/log/${ClusterId}/
>     type: DirectoryOrCreate{code}
>  
> When constructing the pod, replace specific values, such as commonly used 
> values ​​such as ${ClusterId} and ${FlinkJobId}, or replace it with the 
> configuration value of “org.apache.flink.configuration.Configuration”, such 
> as "kubernetes.pod.temeplate. replace.jobmanager.UserId" = "100", this will 
> automatically replace the value of ${UserId} in JM POD with 100



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to