@@ -70,7 +70,10 @@ use validate::NifiRoleGroupConfig;
7070
7171use crate :: {
7272 OPERATOR_NAME ,
73- config:: { NIFI_CONFIG_DIRECTORY , NIFI_PYTHON_WORKING_DIRECTORY , NifiRepository } ,
73+ config:: {
74+ NIFI_CONFIG_DIRECTORY , NIFI_PYTHON_WORKING_DIRECTORY , NifiRepository ,
75+ PERSISTENT_REPOSITORIES ,
76+ } ,
7477 crd:: {
7578 APP_NAME , BALANCE_PORT , BALANCE_PORT_NAME , Container , HTTPS_PORT , HTTPS_PORT_NAME ,
7679 METRICS_PORT , METRICS_PORT_NAME , NifiConfig , NifiNodeRoleConfig , NifiRole , NifiRoleType ,
@@ -805,29 +808,10 @@ async fn build_node_rolegroup_statefulset(
805808 ] )
806809 . add_env_vars ( env_vars. clone ( ) )
807810 . args ( vec ! [ prepare_args. join( " && " ) ] )
808- . add_volume_mount (
809- NifiRepository :: Flowfile . repository ( ) ,
810- NifiRepository :: Flowfile . mount_path ( ) ,
811- )
812- . context ( AddVolumeMountSnafu ) ?
813- . add_volume_mount (
814- NifiRepository :: Database . repository ( ) ,
815- NifiRepository :: Database . mount_path ( ) ,
816- )
817- . context ( AddVolumeMountSnafu ) ?
818- . add_volume_mount (
819- NifiRepository :: Content . repository ( ) ,
820- NifiRepository :: Content . mount_path ( ) ,
821- )
822- . context ( AddVolumeMountSnafu ) ?
823- . add_volume_mount (
824- NifiRepository :: Provenance . repository ( ) ,
825- NifiRepository :: Provenance . mount_path ( ) ,
826- )
827- . context ( AddVolumeMountSnafu ) ?
828- . add_volume_mount (
829- NifiRepository :: State . repository ( ) ,
830- NifiRepository :: State . mount_path ( ) ,
811+ . add_volume_mounts (
812+ PERSISTENT_REPOSITORIES
813+ . iter ( )
814+ . map ( NifiRepository :: volume_mount) ,
831815 )
832816 . context ( AddVolumeMountSnafu ) ?
833817 . add_volume_mount ( "conf" , "/conf" )
@@ -891,29 +875,10 @@ async fn build_node_rolegroup_statefulset(
891875 . add_env_vars ( env_vars)
892876 . add_volume_mount ( KEYSTORE_VOLUME_NAME , KEYSTORE_NIFI_CONTAINER_MOUNT )
893877 . context ( AddVolumeMountSnafu ) ?
894- . add_volume_mount (
895- NifiRepository :: Flowfile . repository ( ) ,
896- NifiRepository :: Flowfile . mount_path ( ) ,
897- )
898- . context ( AddVolumeMountSnafu ) ?
899- . add_volume_mount (
900- NifiRepository :: Database . repository ( ) ,
901- NifiRepository :: Database . mount_path ( ) ,
902- )
903- . context ( AddVolumeMountSnafu ) ?
904- . add_volume_mount (
905- NifiRepository :: Content . repository ( ) ,
906- NifiRepository :: Content . mount_path ( ) ,
907- )
908- . context ( AddVolumeMountSnafu ) ?
909- . add_volume_mount (
910- NifiRepository :: Provenance . repository ( ) ,
911- NifiRepository :: Provenance . mount_path ( ) ,
912- )
913- . context ( AddVolumeMountSnafu ) ?
914- . add_volume_mount (
915- NifiRepository :: State . repository ( ) ,
916- NifiRepository :: State . mount_path ( ) ,
878+ . add_volume_mounts (
879+ PERSISTENT_REPOSITORIES
880+ . iter ( )
881+ . map ( NifiRepository :: volume_mount) ,
917882 )
918883 . context ( AddVolumeMountSnafu ) ?
919884 . add_volume_mount ( "activeconf" , NIFI_CONFIG_DIRECTORY )
0 commit comments