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

Yang Wang closed FLINK-27856.
-----------------------------
    Resolution: Fixed

> Adding pod template without spec crashes job manager
> ----------------------------------------------------
>
>                 Key: FLINK-27856
>                 URL: https://issues.apache.org/jira/browse/FLINK-27856
>             Project: Flink
>          Issue Type: Bug
>          Components: Deployment / Kubernetes
>            Reporter: Jeesmon Jacob
>            Assignee: Peng Yuan
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.16.0, 1.15.2
>
>
> While trying to add Pod annotation through pod template in FlinkDeployment, 
> taskmanager was keep crashing.
> Pod template that I used:
> {code:java}
>   taskManager:
>     podTemplate:
>       apiVersion: v1
>       kind: Pod
>       metadata:
>         annotations:
>           iam.amazonaws.com/role: fake-role-arn
> {code}
> It created below ConfigMap and mounted to the deployment:
> {code:java}
> apiVersion: v1
> data:
>   taskmanager-pod-template.yaml: |
>     ---
>     apiVersion: "v1"
>     kind: "Pod"
>     metadata:
>       annotations:
>         iam.amazonaws.com/role: "fake-role-arn"
> kind: ConfigMap
> {code}
> Looks like missing "spec" stanza in pod template resulted in the crash and I 
> couldn't find any documentation that "spec" is required for pod template even 
> for just adding metadata annotations.
> Adding below worked fine
> {code:java}
>   taskManager:
>     podTemplate:
>       apiVersion: v1
>       kind: Pod
>       metadata:
>         annotations:
>           iam.amazonaws.com/role: fake-role-arn
>       spec: {}
> {code}
> Corresponding ConfigMap
> {code:java}
> apiVersion: v1
> data:
>   taskmanager-pod-template.yaml: |
>     ---
>     apiVersion: "v1"
>     kind: "Pod"
>     metadata:
>       annotations:
>         iam.amazonaws.com/role: "fake-role-arn"
>     spec:
>       containers: []
> {code}



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

Reply via email to