[ https://issues.apache.org/jira/browse/FLINK-36403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17885779#comment-17885779 ]
gaoyan commented on FLINK-36403: -------------------------------- [~xiqian_yu] # This solution cannot resolve the JAR dependency issue. Users still need to package dependencies into the image in advance; it merely makes it easier for users not to have to package YAML into the image. (However, we have other methods for this, as detailed below.) This is not unique to Kubernetes; YARN has similar methods, such as {{{}addShip{}}}. # Deployment parameters, whether in YAML or CLI, do not differ significantly. They are parsed and loaded in the {{CliExecute}} class. If the original design intention of YAML is to be a neutral representation, then indeed, {{deploy}} should not be included. My goal is to provide users with a more intuitive location for displaying deployment parameters and avoid adding more configuration files that could complicate management, since there are many parameters to consider in Kubernetes, although the current implementation overlooks them. I think this is open for discussion. Other related points: For dependency issues, the common practice is to use {{{}initContainer{}}}. We can extend support for {{podTemplate}} parameters to achieve this, allowing users to use a common public image without needing to repackage the Docker image. > K8s native mode Use ConfigMap to get a better experience > -------------------------------------------------------- > > Key: FLINK-36403 > URL: https://issues.apache.org/jira/browse/FLINK-36403 > Project: Flink > Issue Type: Improvement > Components: Flink CDC > Reporter: gaoyan > Priority: Major > > Currently, the operation of CDC's k8s native mode requires users to repackage > the YAML into the Docker image each time to update the task, which is a poor > experience. However, this issue can be resolved with a very simple method. > When submitting a task, create a ConfigMap and write the YAML content into > it, then mount it to the container. At the same time, there is no need to > worry about resource release and deletion . The ConfigMap can be strongly > bound to the container, and k8s will automatically handle these issues for > us. If there are security concerns, we can also use a Secret. > This method is simple and convenient, and does not require additional tools > such as a k8s Operator. > Regarding deployment, I also have some suggestions. There are many > customizable parameters that can be configured for k8s native submissions. > Currently, doing these things only through CLI args is very difficult for > users. Writing them into the YAML for configuration will provide a better > experience, as shown below: > {code:java} > source: > xxxxx > sink: > xxxxxx > pipeline: > xxxx > deploy: > target: k8s-native > jar: "/opt/cdc/cdc.jar" > namespace: > account: > xxxxxxxx{code} > Would this approach be more user-friendly? > I have done similar things in other communities. If the CDC community thinks > this idea is feasible, I am willing to work on this issue and submit a PR. -- This message was sent by Atlassian Jira (v8.20.10#820010)