File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
fixtures/sidecar-containers Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ export function buildImageMetadata(
2424
2525 const containerNameToSpec : { [ key : string ] : V1Container } = { } ;
2626 for ( const container of podSpec . containers ) {
27+ delete container . args ;
28+ delete container . env ;
29+ delete container . command ;
2730 containerNameToSpec [ container . name ] = container ;
2831 }
2932
Original file line number Diff line number Diff line change 4848 successThreshold : 1
4949 timeoutSeconds : 5
5050 name : hello-world
51+ args : [something]
52+ env :
53+ - name : NODE_EXTRA_CA_CERTS
54+ value : " important info"
55+ command :
56+ - " do something"
5157 ports :
5258 - containerPort : 8080
5359 name : http
Original file line number Diff line number Diff line change @@ -124,5 +124,10 @@ describe('metadata extractor tests', () => {
124124 imageName : 'eu.gcr.io/cookie/hello-world:1.20191125.132107-4664980' ,
125125 } ) ,
126126 ) ;
127+ const container = imageMetadataResult [ 0 ] . podSpec . containers [ 0 ] ;
128+
129+ expect ( container . args ) . toBeUndefined ( ) ;
130+ expect ( container . command ) . toBeUndefined ( ) ;
131+ expect ( container . env ) . toBeUndefined ( ) ;
127132 } ) ;
128133} ) ;
You can’t perform that action at this time.
0 commit comments