1- //! Ensures that `Pod`s are configured and running for each [`v1alpha1 ::AirflowCluster`]
1+ //! Ensures that `Pod`s are configured and running for each [`v1alpha2 ::AirflowCluster`]
22use std:: {
33 collections:: { BTreeMap , BTreeSet , HashMap } ,
44 io:: Write ,
@@ -97,7 +97,7 @@ use crate::{
9797 FERNET_KEY_SECRET_KEY , INTERNAL_SECRET_SECRET_KEY , JWT_SECRET_SECRET_KEY ,
9898 create_random_secret,
9999 } ,
100- v1alpha1 ,
100+ v1alpha2 ,
101101 } ,
102102 env_vars:: { self , build_airflow_template_envs} ,
103103 operations:: {
@@ -137,19 +137,19 @@ pub enum Error {
137137 #[ snafu( display( "failed to apply Service for {rolegroup}" ) ) ]
138138 ApplyRoleGroupService {
139139 source : stackable_operator:: cluster_resources:: Error ,
140- rolegroup : RoleGroupRef < v1alpha1 :: AirflowCluster > ,
140+ rolegroup : RoleGroupRef < v1alpha2 :: AirflowCluster > ,
141141 } ,
142142
143143 #[ snafu( display( "failed to apply ConfigMap for {rolegroup}" ) ) ]
144144 ApplyRoleGroupConfig {
145145 source : stackable_operator:: cluster_resources:: Error ,
146- rolegroup : RoleGroupRef < v1alpha1 :: AirflowCluster > ,
146+ rolegroup : RoleGroupRef < v1alpha2 :: AirflowCluster > ,
147147 } ,
148148
149149 #[ snafu( display( "failed to apply StatefulSet for {rolegroup}" ) ) ]
150150 ApplyRoleGroupStatefulSet {
151151 source : stackable_operator:: cluster_resources:: Error ,
152- rolegroup : RoleGroupRef < v1alpha1 :: AirflowCluster > ,
152+ rolegroup : RoleGroupRef < v1alpha2 :: AirflowCluster > ,
153153 } ,
154154
155155 #[ snafu( display( "invalid product config" ) ) ]
@@ -200,13 +200,13 @@ pub enum Error {
200200 #[ snafu( display( "failed to build config file for {rolegroup}" ) ) ]
201201 BuildRoleGroupConfigFile {
202202 source : FlaskAppConfigWriterError ,
203- rolegroup : RoleGroupRef < v1alpha1 :: AirflowCluster > ,
203+ rolegroup : RoleGroupRef < v1alpha2 :: AirflowCluster > ,
204204 } ,
205205
206206 #[ snafu( display( "failed to build ConfigMap for {rolegroup}" ) ) ]
207207 BuildRoleGroupConfig {
208208 source : stackable_operator:: builder:: configmap:: Error ,
209- rolegroup : RoleGroupRef < v1alpha1 :: AirflowCluster > ,
209+ rolegroup : RoleGroupRef < v1alpha2 :: AirflowCluster > ,
210210 } ,
211211
212212 #[ snafu( display( "failed to resolve and merge config for role and role group" ) ) ]
@@ -365,7 +365,7 @@ impl ReconcilerError for Error {
365365}
366366
367367pub async fn reconcile_airflow (
368- airflow : Arc < DeserializeGuard < v1alpha1 :: AirflowCluster > > ,
368+ airflow : Arc < DeserializeGuard < v1alpha2 :: AirflowCluster > > ,
369369 ctx : Arc < Ctx > ,
370370) -> Result < Action > {
371371 tracing:: info!( "Starting reconcile" ) ;
@@ -682,7 +682,7 @@ pub async fn reconcile_airflow(
682682
683683#[ allow( clippy:: too_many_arguments) ]
684684async fn build_executor_template (
685- airflow : & v1alpha1 :: AirflowCluster ,
685+ airflow : & v1alpha2 :: AirflowCluster ,
686686 common_config : & CommonConfiguration < ExecutorConfigFragment , GenericProductSpecificCommonConfig > ,
687687 resolved_product_image : & ResolvedProductImage ,
688688 authentication_config : & AirflowClientAuthenticationDetailsResolved ,
@@ -750,9 +750,9 @@ async fn build_executor_template(
750750/// The rolegroup [`ConfigMap`] configures the rolegroup based on the configuration given by the administrator
751751#[ allow( clippy:: too_many_arguments) ]
752752fn build_rolegroup_config_map (
753- airflow : & v1alpha1 :: AirflowCluster ,
753+ airflow : & v1alpha2 :: AirflowCluster ,
754754 resolved_product_image : & ResolvedProductImage ,
755- rolegroup : & RoleGroupRef < v1alpha1 :: AirflowCluster > ,
755+ rolegroup : & RoleGroupRef < v1alpha2 :: AirflowCluster > ,
756756 rolegroup_config : & HashMap < PropertyNameKind , BTreeMap < String , String > > ,
757757 authentication_config : & AirflowClientAuthenticationDetailsResolved ,
758758 authorization_config : & AirflowAuthorizationResolved ,
@@ -863,9 +863,9 @@ fn build_rolegroup_config_map(
863863}
864864
865865fn build_rolegroup_metadata (
866- airflow : & v1alpha1 :: AirflowCluster ,
866+ airflow : & v1alpha2 :: AirflowCluster ,
867867 resolved_product_image : & & ResolvedProductImage ,
868- rolegroup : & & RoleGroupRef < v1alpha1 :: AirflowCluster > ,
868+ rolegroup : & & RoleGroupRef < v1alpha2 :: AirflowCluster > ,
869869 prometheus_label : Label ,
870870 name : String ,
871871) -> Result < ObjectMeta , Error > {
@@ -888,8 +888,8 @@ fn build_rolegroup_metadata(
888888}
889889
890890pub fn build_group_listener (
891- airflow : & v1alpha1 :: AirflowCluster ,
892- object_labels : ObjectLabels < v1alpha1 :: AirflowCluster > ,
891+ airflow : & v1alpha2 :: AirflowCluster ,
892+ object_labels : ObjectLabels < v1alpha2 :: AirflowCluster > ,
893893 listener_class : String ,
894894 listener_group_name : String ,
895895) -> Result < listener:: v1alpha1:: Listener > {
@@ -924,10 +924,10 @@ fn listener_ports() -> Vec<listener::v1alpha1::ListenerPort> {
924924/// The rolegroup [`StatefulSet`] runs the rolegroup, as configured by the administrator.
925925#[ allow( clippy:: too_many_arguments) ]
926926fn build_server_rolegroup_statefulset (
927- airflow : & v1alpha1 :: AirflowCluster ,
927+ airflow : & v1alpha2 :: AirflowCluster ,
928928 resolved_product_image : & ResolvedProductImage ,
929929 airflow_role : & AirflowRole ,
930- rolegroup_ref : & RoleGroupRef < v1alpha1 :: AirflowCluster > ,
930+ rolegroup_ref : & RoleGroupRef < v1alpha2 :: AirflowCluster > ,
931931 rolegroup_config : & HashMap < PropertyNameKind , BTreeMap < String , String > > ,
932932 authentication_config : & AirflowClientAuthenticationDetailsResolved ,
933933 authorization_config : & AirflowAuthorizationResolved ,
@@ -1247,14 +1247,14 @@ fn build_logging_container(
12471247
12481248#[ allow( clippy:: too_many_arguments) ]
12491249fn build_executor_template_config_map (
1250- airflow : & v1alpha1 :: AirflowCluster ,
1250+ airflow : & v1alpha2 :: AirflowCluster ,
12511251 resolved_product_image : & ResolvedProductImage ,
12521252 authentication_config : & AirflowClientAuthenticationDetailsResolved ,
12531253 sa_name : & str ,
12541254 merged_executor_config : & ExecutorConfig ,
12551255 env_overrides : & HashMap < String , String > ,
12561256 pod_overrides : & PodTemplateSpec ,
1257- rolegroup_ref : & RoleGroupRef < v1alpha1 :: AirflowCluster > ,
1257+ rolegroup_ref : & RoleGroupRef < v1alpha2 :: AirflowCluster > ,
12581258 git_sync_resources : & git_sync:: v1alpha2:: GitSyncResources ,
12591259) -> Result < ConfigMap > {
12601260 let mut pb = PodBuilder :: new ( ) ;
@@ -1386,7 +1386,7 @@ fn build_executor_template_config_map(
13861386}
13871387
13881388pub fn error_policy (
1389- _obj : Arc < DeserializeGuard < v1alpha1 :: AirflowCluster > > ,
1389+ _obj : Arc < DeserializeGuard < v1alpha2 :: AirflowCluster > > ,
13901390 error : & Error ,
13911391 _ctx : Arc < Ctx > ,
13921392) -> Action {
0 commit comments