Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-27856

Adding pod template without spec crashes job manager

    XMLWordPrintableJSON

Details

    Description

      While trying to add Pod annotation through pod template in FlinkDeployment, taskmanager was keep crashing.

      Pod template that I used:

        taskManager:
          podTemplate:
            apiVersion: v1
            kind: Pod
            metadata:
              annotations:
                iam.amazonaws.com/role: fake-role-arn
      

      It created below ConfigMap and mounted to the deployment:

      apiVersion: v1
      data:
        taskmanager-pod-template.yaml: |
          ---
          apiVersion: "v1"
          kind: "Pod"
          metadata:
            annotations:
              iam.amazonaws.com/role: "fake-role-arn"
      kind: ConfigMap
      

      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

        taskManager:
          podTemplate:
            apiVersion: v1
            kind: Pod
            metadata:
              annotations:
                iam.amazonaws.com/role: fake-role-arn
            spec: {}
      

      Corresponding ConfigMap

      apiVersion: v1
      data:
        taskmanager-pod-template.yaml: |
          ---
          apiVersion: "v1"
          kind: "Pod"
          metadata:
            annotations:
              iam.amazonaws.com/role: "fake-role-arn"
          spec:
            containers: []
      

      Attachments

        Issue Links

          Activity

            People

              kevin_123 Peng Yuan
              jeesmon Jeesmon Jacob
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: