File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
charts/k8s-service/templates Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ spec:
148148 {{- end }}
149149 {{- if .Values.securityContext }}
150150 securityContext :
151- {{ toYaml .Values.securityContext | indent 12 }}
151+ {{ toYaml .Values.securityContext | indent 12 }}
152152 {{- end}}
153153 resources :
154154{{ toYaml .Values.containerResources | indent 12 }}
@@ -227,7 +227,7 @@ spec:
227227
228228 {{- range $key, $value := .Values.sideCarContainers }}
229229 - name : {{ $key }}
230- {{ toYaml $value | indent 12 }}
230+ {{ toYaml $value | indent 10 }}
231231 {{- end }}
232232
233233 {{- /* START IMAGE PULL SECRETS LOGIC */ -}}
Original file line number Diff line number Diff line change @@ -612,3 +612,17 @@ func TestK8SServiceIngressMultiCert(t *testing.T) {
612612 assert .Equal (t , secondTlsHosts [0 ], "chart1-example-tls-host" )
613613 assert .Equal (t , secondTlsHosts [1 ], "chart1-example-tls-host2" )
614614}
615+
616+ func TestK8SServiceSideCarContainersRendersCorrectly (t * testing.T ) {
617+ t .Parallel ()
618+ deployment := renderK8SServiceDeploymentWithSetValues (
619+ t ,
620+ map [string ]string {
621+ "sideCarContainers.datadog.image" : "datadog/agent:latest" ,
622+ },
623+ )
624+ renderedContainers := deployment .Spec .Template .Spec .Containers
625+ require .Equal (t , len (renderedContainers ), 2 )
626+ sideCarContainer := renderedContainers [1 ]
627+ assert .Equal (t , sideCarContainer .Image , "datadog/agent:latest" )
628+ }
You can’t perform that action at this time.
0 commit comments