File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " uds-core" ,
3
- "version" : " 0.4 .0" ,
3
+ "version" : " 0.5 .0" ,
4
4
"description" : " A collection of capabilities for UDS Core" ,
5
5
"keywords" : [
6
6
" pepr" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import cfg from "./package.json";
4
4
5
5
import { istio } from "./src/pepr/istio" ;
6
6
import { operator } from "./src/pepr/operator" ;
7
+ import { Policy } from "./src/pepr/operator/crd" ;
7
8
import { registerCRDs } from "./src/pepr/operator/crd/register" ;
8
9
import { policies , startExemptionWatch } from "./src/pepr/policies" ;
9
10
import { prometheus } from "./src/pepr/prometheus" ;
@@ -26,6 +27,15 @@ import { prometheus } from "./src/pepr/prometheus";
26
27
// Prometheus monitoring stack
27
28
prometheus ,
28
29
] ) ;
30
+ // Remove legacy policy entries from the pepr store for the 0.5.0 upgrade
31
+ if ( process . env . PEPR_WATCH_MODE === "true" && cfg . version === "0.5.0" ) {
32
+ Log . debug ( "Clearing legacy pepr store exemption entries..." ) ;
33
+ policies . Store . onReady ( ( ) => {
34
+ for ( const p of Object . values ( Policy ) ) {
35
+ policies . Store . removeItem ( p ) ;
36
+ }
37
+ } ) ;
38
+ }
29
39
} ) ( ) . catch ( err => {
30
40
Log . error ( err ) ;
31
41
process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments