[
https://issues.apache.org/jira/browse/FLINK-15656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17255935#comment-17255935
]
Yang Wang commented on FLINK-15656:
-----------------------------------
I am aware of [~felixzheng] also has some internal implementation. If you still
want to keep working on this, feel free to ping me and let's re-assign this
ticket.
Update the progress of this ticket.
I have finished the a draft version and pod template for JobManager and
TaskManager looks like following. All the advanced features(init-container,
sidecar container, volume mount) could be supported. [~lublinsky] WDYT?
{code:java}
// jobmanager-pod-template.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod-template
spec:
initContainers:
- name: artifacts-fetcher
image: busybox
# Use wget or other tools to get user jars from remote storage
command: ['wget', 'https://xxx/StateMachineExample.jar', '-O',
'/flink-artifact/myjob.jar']
volumeMounts:
- mountPath: /flink-artifact
name: flink-artifact
containers:
# Do not change the main container name
- name: flink-job-manager
volumeMounts:
- mountPath: /opt/flink/volumes/hostpath
name: flink-volume-hostpath
- mountPath: /opt/flink/artifacts
name: flink-artifact
- mountPath: /opt/flink/log
name: flink-logs
# Use sidecar container to push logs to remote storage or do some other
debugging things
- name: sidecar-log-collector
image: busybox
args:
- tail
- -F
- /flink-log/jobmanager.log
volumeMounts:
- mountPath: /flink-log
name: flink-logs
volumes:
- name: flink-volume-hostpath
hostPath:
path: /tmp
type: Directory
- name: flink-artifact
emptyDir: {}
- name: flink-logs
emptyDir: {}
{code}
{code:java}
// taskmanager-pod-template.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod-template
spec:
containers:
# Do not change the main container name
- name: flink-task-manager
volumeMounts:
- mountPath: /opt/flink/volumes/hostpath
name: flink-volume-hostpath
- mountPath: /opt/flink/log
name: flink-logs
# Use sidecar container to push logs to remote storage or do some other
debugging things
- name: sidecar-log-collector
image: busybox
args:
- tail
- -F
- /flink-log/taskmanager.log
volumeMounts:
- mountPath: /flink-log
name: flink-logs
volumes:
- name: flink-volume-hostpath
hostPath:
path: /tmp
type: Directory
- name: flink-logs
emptyDir: {}
{code}
> Support user-specified pod templates
> ------------------------------------
>
> Key: FLINK-15656
> URL: https://issues.apache.org/jira/browse/FLINK-15656
> Project: Flink
> Issue Type: Sub-task
> Components: Deployment / Kubernetes
> Reporter: Canbin Zheng
> Assignee: Yang Wang
> Priority: Major
> Fix For: 1.13.0
>
>
> The current approach of introducing new configuration options for each aspect
> of pod specification a user might wish is becoming unwieldy, we have to
> maintain more and more Flink side Kubernetes configuration options and users
> have to learn the gap between the declarative model used by Kubernetes and
> the configuration model used by Flink. It's a great improvement to allow
> users to specify pod templates as central places for all customization needs
> for the jobmanager and taskmanager pods.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)