yuanfenghu created FLINK-38492:
----------------------------------

             Summary: Support Kubernetes Pod Template in SQL Gateway 
Application Mode Deployment
                 Key: FLINK-38492
                 URL: https://issues.apache.org/jira/browse/FLINK-38492
             Project: Flink
          Issue Type: Improvement
          Components: Table SQL / Gateway
            Reporter: yuanfenghu


h3. Background

The Flink SQL Gateway provides a REST API to deploy SQL scripts in Application 
Mode via the /sessions/:sessionId/scripts endpoint. However, when deploying to 
Kubernetes, users cannot specify pod templates because the 
kubernetes.pod-template-file.* configuration options require local file paths, 
which are not accessible through REST API requests.This limitation 
significantly reduces the flexibility of SQL Gateway for production Kubernetes 
deployments, where pod templates are commonly used to configure:

 
 * Resource limits and requests

 * Node selectors and affinity rules

 * Volume mounts and secrets

 * Security contexts

 * Custom annotations and labels

 * Sidecar containers

h3. Current Behavior

When submitting an Application Mode job through SQL Gateway REST API:
{code:java}
//
POST /sessions/{sessionId}/scripts
{
  "script": "CREATE TABLE ...; INSERT INTO ...",
  "executionConfig": {
    "kubernetes.pod-template-file.default": "/path/to/pod-template.yaml"  // ❌ 
This doesn't work
  }
} {code}
Problems:
 # The file path refers to the client side, not the SQL Gateway server

 # SQL Gateway server cannot access client-side files

 # No mechanism exists to pass pod template content through REST API

h3. Expected Behavior

Users should be able to specify Kubernetes pod templates when deploying 
Application Mode jobs through SQL Gateway, similar to how it works with CLI 
deployment.

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to