@@ -72,33 +72,11 @@ pub async fn reconcile(
72
72
}
73
73
}
74
74
} )
75
- . flat_map ( |( meta, sa_name) | {
76
- let mut result = vec ! [
77
- Subject {
78
- kind: "ServiceAccount" . to_string( ) ,
79
- name: sa_name,
80
- namespace: meta. namespace. clone( ) ,
81
- ..Subject :: default ( )
82
- } ,
83
- // This extra Serviceaccount is being written for legacy/compatibility purposes
84
- // to ensure that running clusters don't lose access to anything during an upgrade
85
- // of the Stackable operators, this code can be removed in later releases
86
- // The value is hardcoded here, as we have removed access to the private fns that
87
- // would have built it, since this is a known target though, and will be removed soon
88
- // this should not be an issue.
89
- Subject {
90
- kind: "ServiceAccount" . to_string( ) ,
91
- name: "hdfs-serviceaccount" . to_string( ) ,
92
- namespace: meta. namespace. clone( ) ,
93
- ..Subject :: default ( )
94
- } ,
95
- ] ;
96
- // If a cluster is called hdfs this would result in the same subject
97
- // being written twicex.
98
- // Since we know this vec only contains two elements we can use dedup for
99
- // simply removing this duplicate.
100
- result. dedup ( ) ;
101
- result
75
+ . map ( |( meta, sa_name) | Subject {
76
+ kind : "ServiceAccount" . to_string ( ) ,
77
+ name : sa_name,
78
+ namespace : meta. namespace . clone ( ) ,
79
+ ..Subject :: default ( )
102
80
} )
103
81
. collect ( ) ;
104
82
0 commit comments