[ https://issues.apache.org/jira/browse/FLINK-17032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091491#comment-17091491 ]
Canbin Zheng edited comment on FLINK-17032 at 4/24/20, 11:41 AM: ----------------------------------------------------------------- {quote}Another property that I would consider desirable is that all resources with the same type are grouped together. {quote} Hi [~chesnay]! My original thought is: a) all the K8s resources of a Flink cluster should have the same prefix ${cluster-id}. b) try best to have the same postfix for the resources with the same type, such as *svc*, *config*. I agree that all resources with the same type are grouped together is a better idea, so, how about the following convention: * The Deployment: ${clusterId} * The internal Service: ${clusterId}-svc-internal * The external Service: ${clusterId}-svc-external * The Flink Configuration ConfigMap: ${clusterId}-config-flink * The Hadoop Configuration ConfigMap: ${clusterId}-config-hadoop * The JobManager Pod: ${clusterId}\-${random string}-${random string} * The TaskManager Pod: ${clusterId}\-taskmanager-${currentMaxAttemptId}-${currentMaxPodId} The reason why the name of the job manager pods does not contain a resource type is that: when we create a Deployment, it creates a {{replicaset}} and add a random string{{(*66cf4d99b5)* }}to the deployment name for the {{replicaset}} name. The {{replicaset}} creates the pod(s). Replica set also adds another random string to each {{pod}}. Given that the job manager pods do not contain a resource type in their names, we don't specify a resource type for the task manager pods as well. WDYT? was (Author: felixzheng): {quote}Another property that I would consider desirable is that all resources with the same type are grouped together. {quote} Hi [~chesnay]! My original thought is: a) all the K8s resources of a Flink cluster should have the same prefix ${cluster-id}. b) try best to have the same postfix for the resources with the same type, such as *svc*, *config*. I agree that all resources with the same type are grouped together is a better idea, so, how about the following convention: * The Deployment: ${clusterId} * The internal Service: ${clusterId}-svc-internal * The external Service: ${clusterId}-svc-external * The Flink Configuration ConfigMap: ${clusterId}-config-flink * The Hadoop Configuration ConfigMap: ${clusterId}-config-hadoop * The JobManager Pod: ${clusterId}-${random string}-${random string} * The TaskManager Pod: ${clusterId}-taskmanager-${currentMaxAttemptId}-${currentMaxPodId} The reason why the name of the job manager pods does not contain a resource type is that: when we create a Deployment, it creates a {{replicaset}} and add a random string{{(*66cf4d99b5)* }}to the deployment name for the {{replicaset}} name. The {{replicaset}} creates the pod(s). Replica set also adds another random string to each {{pod}}. Given that the job manager pods do not contain a resource type in their names, we don't specify a resource type for the task manager pods as well. WDYT? > Naming convention unification for all the Kubernetes Resources > -------------------------------------------------------------- > > Key: FLINK-17032 > URL: https://issues.apache.org/jira/browse/FLINK-17032 > Project: Flink > Issue Type: Improvement > Components: Deployment / Kubernetes > Affects Versions: 1.10.0 > Reporter: Canbin Zheng > Priority: Minor > Fix For: 1.11.0 > > > Currently, the naming rules are different among the Kubernetes resources we > have created, the rules are as follows: > # The Deployment: ${clusterId} > # The internal Service: ${clusterId} > # The external Service: ${clusterId}-rest > # The Flink Configuration ConfigMap: flink-config-${clusterId} > # The Hadoop Configuration ConfigMap: hadoop-config-${clusterId} > # The JobManager Pod: ${clusterId}\-${random string}-${random string} > # The TaskManager Pod: > ${clusterId}\-taskmanager-${currentMaxAttemptId}-${currentMaxPodId} > In the future, we would add other Kubernetes resources, and it would be > better to have a unified naming convention for all of them. > This ticket proposes the following naming convention: > * The Deployment: ${clusterId} > * The internal Service: ${clusterId}-internal-svc > * The external Service: ${clusterId}-external-svc > * The Flink Configuration ConfigMap: ${clusterId}-flink-config > * The Hadoop Configuration ConfigMap: ${clusterId}-hadoop-config > * The JobManager Pod: ${clusterId}\-${random string}-${random string} > * The TaskManager Pod: > ${clusterId}\-taskmanager-${currentMaxAttemptId}-${currentMaxPodId} -- This message was sent by Atlassian Jira (v8.3.4#803005)