You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by gy...@apache.org on 2022/03/05 10:36:56 UTC

[flink-kubernetes-operator] branch main updated: [hotfix] Make flink-kubernetes-shaded dep provided

This is an automated email from the ASF dual-hosted git repository.

gyfora pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new ae5ab71  [hotfix] Make flink-kubernetes-shaded dep provided
ae5ab71 is described below

commit ae5ab71af62cd7ae1f8a196d62d089348dac564c
Author: Gyula Fora <g_...@apple.com>
AuthorDate: Sat Mar 5 09:27:34 2022 +0100

    [hotfix] Make flink-kubernetes-shaded dep provided
---
 Dockerfile                        | 2 ++
 docker-entrypoint.sh              | 4 ++--
 flink-kubernetes-operator/pom.xml | 7 +------
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index c9f8f9a..2b6655f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -43,6 +43,7 @@ ENV FLINK_HOME=/opt/flink
 ENV OPERATOR_VERSION=1.0-SNAPSHOT
 ENV OPERATOR_JAR=flink-kubernetes-operator-$OPERATOR_VERSION-shaded.jar
 ENV WEBHOOK_JAR=flink-kubernetes-webhook-$OPERATOR_VERSION.jar
+ENV FLINK_KUBERNETES_SHADED_JAR=flink-kubernetes-shaded-$OPERATOR_VERSION.jar
 
 WORKDIR /
 RUN groupadd --system --gid=9999 flink && \
@@ -50,6 +51,7 @@ RUN groupadd --system --gid=9999 flink && \
 
 COPY --from=build /app/flink-kubernetes-operator/target/$OPERATOR_JAR .
 COPY --from=build /app/flink-kubernetes-webhook/target/$WEBHOOK_JAR .
+COPY --from=build /app/flink-kubernetes-shaded/target/$FLINK_KUBERNETES_SHADED_JAR .
 COPY --from=build /app/flink-kubernetes-operator/target/plugins $FLINK_HOME/plugins
 COPY docker-entrypoint.sh /
 
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index f22bc24..2889ac2 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -27,12 +27,12 @@ if [ "$1" = "help" ]; then
 elif [ "$1" = "operator" ]; then
     echo "Starting Operator"
 
-    exec java -jar $LOG_CONFIG /$OPERATOR_JAR
+    exec java -cp /$FLINK_KUBERNETES_SHADED_JAR:/$OPERATOR_JAR $LOG_CONFIG org.apache.flink.kubernetes.operator.FlinkOperator
 elif [ "$1" = "webhook" ]; then
     echo "Starting Webhook"
 
     # Adds the operator shaded jar on the classpath when the webhook starts
-    exec java -cp /$OPERATOR_JAR:/$WEBHOOK_JAR $LOG_CONFIG org.apache.flink.kubernetes.operator.admission.FlinkOperatorWebhook
+    exec java -cp /$FLINK_KUBERNETES_SHADED_JAR:/$OPERATOR_JAR:/$WEBHOOK_JAR $LOG_CONFIG org.apache.flink.kubernetes.operator.admission.FlinkOperatorWebhook
 fi
 
 args=("${args[@]}")
diff --git a/flink-kubernetes-operator/pom.xml b/flink-kubernetes-operator/pom.xml
index b32339b..ab3d4ab 100644
--- a/flink-kubernetes-operator/pom.xml
+++ b/flink-kubernetes-operator/pom.xml
@@ -67,12 +67,7 @@ under the License.
             <groupId>org.apache.flink</groupId>
             <artifactId>flink-kubernetes-shaded</artifactId>
             <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>*</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-            </exclusions>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>