You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/22 00:12:22 UTC

[GitHub] [flink] blublinsky commented on pull request #14629: [FLINK-15656][k8s] Support pod template for native kubernetes integration

blublinsky commented on pull request #14629:
URL: https://github.com/apache/flink/pull/14629#issuecomment-765023075


   Thanks @wangyang0918,
   This works great, I tested it on my app, and its fine. I have 2 questions:
   
   - With this in place, you now have 2 ways for setting annotations, labels, env, resources and tolerations, etc. You can set them using dedicated decorators or through port template yaml., for example:
   
   apiVersion: v1
   kind: Pod
   metadata:
     annotations:
       prometheus.io/port: "3000"
       prometheus.io/scrape: "true"
     labels:
       deploy: test
       version: alphav1
     name: pod-template
   spec:
     containers:
       - name: flink-job-manager
         env:
           - name: "variable1"
             value: "value1"
         resources:
           limits:
             cpu: "2"
             memory: 4Gi
           requests:
             cpu: "2"
             memory: 4Gi
         volumeMounts:
           - mountPath: /opt/flink/conf
             name: flink-config-volume
           - mountPath: /mnt/flink/storage
             name: pvc-checkpointing
           - mountPath: /opt/pvcclaim/test/path1
             name: pvc-mount2
             subPath: path1
           - mountPath: /opt/pvcclaim/test/path2
             name: pvc-mount2
             subPath: path2
           - mountPath: /emptydirclaim
             name: edir-mount
           - mountPath: /var/local/hp
             name: hp-mount
           - mountPath: /opt/secret
             name: secret-mount
           - mountPath: /opt/configmap
             name: test-configmap
           - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
             name: cloudflowflink-token-dbnvh
             readOnly: true
     tolerations:
       - effect: NoExecute
         key: node.kubernetes.io/not-ready
         operator: Exists
         tolerationSeconds: 300
       - effect: NoExecute
         key: node.kubernetes.io/unreachable
         operator: Exists
         tolerationSeconds: 300
     volumes:
       - configMap:
           defaultMode: 420
           items:
             - key: logback-console.xml
               path: logback-console.xml
             - key: log4j-console.properties
               path: log4j-console.properties
             - key: flink-conf.yaml
               path: flink-conf.yaml
           name: flink-config-testapp
         name: flink-config-volume
       - name: pvc-checkpointing
         persistentVolumeClaim:
           claimName: testclaim
       - name: pvc-mount2
         persistentVolumeClaim:
           claimName: testclaim1
       - emptyDir: {}
         name: edir-mount
       - hostPath:
           path: /var/local/hp
           type: DirectoryOrCreate
         name: hp-mount
       - name: secret-mount
         secret:
           defaultMode: 420
           items:
             - key: token
               path: value
           secretName: test-secret2
       - configMap:
           defaultMode: 420
           items:
             - key: key1
               path: "1"
           name: test-configmap
         name: test-configmap
       - name: cloudflowflink-token-dbnvh
         secret:
           defaultMode: 420
           secretName: cloudflowflink-token-dbnvh
   
   This template is setting a lot of parameters, that can be used to set a lot of things. Does it make sense to use template as a main configuration approach and remove other options.
   
   - Both this and owner manager PRs are still not merged. - do you have a time frame for merging/releasing them?
    


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org