export function removeHelmHooks ( ) { return ( obj ) => { if ( ! obj ) { return ; } if ( obj . metadata && obj . metadata . annotations && obj . metadata . annotations [ 'helm.sh/hook' ] ) { for ( const key in obj ) { delete obj [ key ] ; } Object . assign ( obj , { kind : 'ConfigMapList' , apiVersion : 'v1' , metadata : { } , items : [ ] , } ) ; return null ; } return ; } ; } export function removeHelmTests ( ) { return removeHelmHooks ( ) ; } export function replaceApiVersion ( kind , from , to ) { return ( obj ) => { if ( ! obj ) { return ; } if ( obj . kind === kind && obj . apiVersion === from ) { obj . apiVersion = to ; return ; } return ; } ; }