@@ -72,24 +72,24 @@ func init() {
7272
7373func main () {
7474 var (
75- metricsAddr string
76- eventsAddr string
77- healthAddr string
78- storagePath string
79- storageAddr string
80- storageAdvAddr string
81- concurrent int
82- requeueDependency time.Duration
83- watchAllNamespaces bool
84- helmIndexLimit int64
85- helmChartLimit int64
86- helmChartFileLimit int64
87- clientOptions client.Options
88- logOptions logger.Options
89- leaderElectionOptions leaderelection.Options
90- cacheMaxSize int
91- cacheTTL string
92- cachePurgeInterval string
75+ metricsAddr string
76+ eventsAddr string
77+ healthAddr string
78+ storagePath string
79+ storageAddr string
80+ storageAdvAddr string
81+ concurrent int
82+ requeueDependency time.Duration
83+ watchAllNamespaces bool
84+ helmIndexLimit int64
85+ helmChartLimit int64
86+ helmChartFileLimit int64
87+ clientOptions client.Options
88+ logOptions logger.Options
89+ leaderElectionOptions leaderelection.Options
90+ helmCacheMaxSize int
91+ helmCacheTTL string
92+ helmCachePurgeInterval string
9393 )
9494
9595 flag .StringVar (& metricsAddr , "metrics-addr" , envOrDefault ("METRICS_ADDR" , ":8080" ),
@@ -114,11 +114,11 @@ func main() {
114114 "The max allowed size in bytes of a file in a Helm chart." )
115115 flag .DurationVar (& requeueDependency , "requeue-dependency" , 30 * time .Second ,
116116 "The interval at which failing dependencies are reevaluated." )
117- flag .IntVar (& cacheMaxSize , "cache-max-size" , 0 ,
117+ flag .IntVar (& helmCacheMaxSize , "helm- cache-max-size" , 0 ,
118118 "The maximum size of the cache in number of items." )
119- flag .StringVar (& cacheTTL , "cache-ttl" , "15m" ,
119+ flag .StringVar (& helmCacheTTL , "helm- cache-ttl" , "15m" ,
120120 "The TTL of an item in the cache. Valid time units are ns, us (or µs), ms, s, m, h." )
121- flag .StringVar (& cachePurgeInterval , "cache-purge-interval" , "1m" ,
121+ flag .StringVar (& helmCachePurgeInterval , "helm- cache-purge-interval" , "1m" ,
122122 "The interval at which the cache is purged. Valid time units are ns, us (or µs), ms, s, m, h." )
123123
124124 clientOptions .BindFlags (flag .CommandLine )
@@ -204,20 +204,20 @@ func main() {
204204
205205 var c * cache.Cache
206206 var ttl time.Duration
207- if cacheMaxSize > 0 {
208- interval , err := time .ParseDuration (cachePurgeInterval )
207+ if helmCacheMaxSize > 0 {
208+ interval , err := time .ParseDuration (helmCachePurgeInterval )
209209 if err != nil {
210210 setupLog .Error (err , "unable to parse cache purge interval" )
211211 os .Exit (1 )
212212 }
213213
214- ttl , err = time .ParseDuration (cacheTTL )
214+ ttl , err = time .ParseDuration (helmCacheTTL )
215215 if err != nil {
216216 setupLog .Error (err , "unable to parse cache TTL" )
217217 os .Exit (1 )
218218 }
219219
220- c = cache .New (cacheMaxSize , interval )
220+ c = cache .New (helmCacheMaxSize , interval )
221221 }
222222 if err = (& controllers.HelmChartReconciler {
223223 Client : mgr .GetClient (),
0 commit comments