You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2026/03/21 20:16:29 UTC
(spark-kubernetes-operator) branch main updated: [SPARK-56129] Exclude `Netty QUIC` native libraries to minimize Docker image
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git
The following commit(s) were added to refs/heads/main by this push:
new dc99c40 [SPARK-56129] Exclude `Netty QUIC` native libraries to minimize Docker image
dc99c40 is described below
commit dc99c40f22111a8883cf6d4f9504b9483f5940f9
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Sat Mar 21 13:16:22 2026 -0700
[SPARK-56129] Exclude `Netty QUIC` native libraries to minimize Docker image
### What changes were proposed in this pull request?
This PR reduces the shadow JAR size from 145MB to 134MB (approximately 7.6% reduction) excluding `Netty QUIC` native libraries. And the total image size is reduced by 11MB.
```diff
$ docker images apache/spark-kubernetes-operator:0.9.0-SNAPSHOT
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
-apache/spark-kubernetes-operator:0.9.0-SNAPSHOT c1a9534afdcd 659MB 231MB
+apache/spark-kubernetes-operator:0.9.0-SNAPSHOT cfb15788954d 636MB 220MB
```
### Why are the changes needed?
The Netty QUIC native libraries are bundled transitively through `netty-all` and are used for HTTP/3 QUIC protocol support. However, Kubernetes API server communication only uses HTTP/1.1 and HTTP/2, making these native libraries unnecessary in the operator's fat JAR.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (claude-opus-4-6)
Closes #569 from dongjoon-hyun/SPARK-56129.
Authored-by: Dongjoon Hyun <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
spark-operator/build.gradle | 3 +++
1 file changed, 3 insertions(+)
diff --git a/spark-operator/build.gradle b/spark-operator/build.gradle
index 72e3249..c276a8c 100644
--- a/spark-operator/build.gradle
+++ b/spark-operator/build.gradle
@@ -99,6 +99,9 @@ shadowJar {
mergeServiceFiles()
transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer)
exclude("org/apache/spark/ui/static/**")
+ // Netty QUIC native libraries - not needed for K8s API server communication (HTTP/1.1 & HTTP/2)
+ exclude("META-INF/native/libnetty_quiche*")
+ exclude("META-INF/native/netty_quiche*")
manifest {
attributes(
'Implementation-Title': project.description,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org