File tree 3 files changed +20
-26
lines changed 3 files changed +20
-26
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
13
13
14
14
- ` vector ` ` 0.26.0 ` -> ` 0.31.0 ` ([ #269 ] ).
15
15
- ` operator-rs ` ` 0.44.0 ` -> ` 0.45.1 ` ([ #267 ] ).
16
+ - Removed usages of SPARK_DAEMON_JAVA_OPTS since it's not a reliable way to pass extra JVM options ([ #272 ] ).
16
17
17
18
[ #267 ] : https://github.com/stackabletech/spark-k8s-operator/pull/267
18
19
[ #268 ] : https://github.com/stackabletech/spark-k8s-operator/pull/268
Original file line number Diff line number Diff line change @@ -659,18 +659,6 @@ impl SparkApplication {
659
659
value_from : None ,
660
660
} ) ;
661
661
}
662
- if let Some ( s3logdir) = s3logdir {
663
- if tlscerts:: tls_secret_name ( & s3logdir. bucket . connection ) . is_some ( ) {
664
- e. push ( EnvVar {
665
- name : "SPARK_DAEMON_JAVA_OPTS" . to_string ( ) ,
666
- value : Some ( format ! (
667
- "-Djavax.net.ssl.trustStore={STACKABLE_TRUST_STORE}/truststore.p12 -Djavax.net.ssl.trustStorePassword={STACKABLE_TLS_STORE_PASSWORD} -Djavax.net.ssl.trustStoreType=pkcs12"
668
- ) ) ,
669
- value_from : None ,
670
- } ) ;
671
- }
672
- }
673
-
674
662
e
675
663
}
676
664
Original file line number Diff line number Diff line change @@ -618,25 +618,30 @@ fn env_vars(s3logdir: &S3LogDir) -> Vec<EnvVar> {
618
618
value : Some ( "/stackable/spark/extra-jars/*" . into ( ) ) ,
619
619
value_from : None ,
620
620
} ) ;
621
+
622
+ let mut history_opts = vec ! [
623
+ format!( "-Dlog4j.configurationFile={VOLUME_MOUNT_PATH_LOG_CONFIG}/{LOG4J2_CONFIG_FILE}" ) ,
624
+ format!(
625
+ "-Djava.security.properties={VOLUME_MOUNT_PATH_CONFIG}/{JVM_SECURITY_PROPERTIES_FILE}"
626
+ ) ,
627
+ ] ;
628
+ if tlscerts:: tls_secret_name ( & s3logdir. bucket . connection ) . is_some ( ) {
629
+ history_opts. extend (
630
+ vec ! [
631
+ format!( "-Djavax.net.ssl.trustStore={STACKABLE_TRUST_STORE}/truststore.p12" ) ,
632
+ format!( "-Djavax.net.ssl.trustStorePassword={STACKABLE_TLS_STORE_PASSWORD}" ) ,
633
+ format!( "-Djavax.net.ssl.trustStoreType=pkcs12" ) ,
634
+ ]
635
+ . into_iter ( ) ,
636
+ ) ;
637
+ }
638
+
621
639
vars. push ( EnvVar {
622
640
name : "SPARK_HISTORY_OPTS" . to_string ( ) ,
623
- value : Some ( vec ! [
624
- format!( "-Dlog4j.configurationFile={VOLUME_MOUNT_PATH_LOG_CONFIG}/{LOG4J2_CONFIG_FILE}" ) ,
625
- format!( "-Djava.security.properties={VOLUME_MOUNT_PATH_CONFIG}/{JVM_SECURITY_PROPERTIES_FILE}" ) ,
626
- ] . join ( " " ) ) ,
641
+ value : Some ( history_opts. join ( " " ) ) ,
627
642
value_from : None ,
628
643
} ) ;
629
644
// if TLS is enabled build truststore
630
- if tlscerts:: tls_secret_name ( & s3logdir. bucket . connection ) . is_some ( ) {
631
- vars. push ( EnvVar {
632
- name : "SPARK_DAEMON_JAVA_OPTS" . to_string ( ) ,
633
- value : Some ( format ! (
634
- "-Djavax.net.ssl.trustStore={STACKABLE_TRUST_STORE}/truststore.p12 -Djavax.net.ssl.trustStorePassword={STACKABLE_TLS_STORE_PASSWORD} -Djavax.net.ssl.trustStoreType=pkcs12"
635
- ) ) ,
636
- value_from : None ,
637
- } ) ;
638
- }
639
-
640
645
vars
641
646
}
642
647
You can’t perform that action at this time.
0 commit comments