This repository was archived by the owner on Oct 14, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
persistence/persistence-elastic Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ async function persist({
3838 scan,
3939 now = new Date ( ) ,
4040 tenant = process . env [ "NAMESPACE" ] ,
41+ indexPrefix = process . env [ "ELASTICSEARCH_INDEX_PREFIX" ] || "scbv2" ,
4142} ) {
4243 const findings = await getFindings ( ) ;
4344
@@ -47,7 +48,7 @@ async function persist({
4748 ) ;
4849
4950 const timeStamp = now . toISOString ( ) . substr ( 0 , 10 ) ;
50- const indexName = `scbv2_ ${ tenant } _${ timeStamp } ` ;
51+ const indexName = `${ indexPrefix } _ ${ tenant } _${ timeStamp } ` ;
5152
5253 await client . indices . create (
5354 {
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ metadata:
77spec :
88 image : " scbexperimental/persistence-elastic:latest"
99 env :
10+ - name : ELASTICSEARCH_INDEX_PREFIX
11+ value : {{ .Values.indexPrefix | quote }}
1012{{- if .Values.externalElasticStack.enabled }}
1113 - name : ELASTICSEARCH_ADDRESS
1214 value : {{ .Values.externalElasticStack.elasticsearchAddress | quote }}
Original file line number Diff line number Diff line change 66 repository : scbexperimental/persistence-elastic
77 pullPolicy : Always
88
9+ indexPrefix : " scbv2"
10+
911# Enable this when you already have an Elastic Stack running to which you want to send your results
1012externalElasticStack :
1113 enabled : false
You can’t perform that action at this time.
0 commit comments