@@ -26,9 +26,6 @@ import (
2626 . "github.com/onsi/gomega"
2727)
2828
29- // backOffLimit is the max retries for the Job
30- const backOffLimit int32 = 10
31-
3229// istioCSRProtoURL links to proto for istio-csr API spec
3330const istioCSRProtoURL = "https://raw.githubusercontent.com/istio/api/v1.24.1/security/v1alpha1/ca.proto"
3431
@@ -44,6 +41,7 @@ type IstioCSRConfig struct {
4441var _ = Describe ("Istio-CSR" , Ordered , Label ("Feature:IstioCSR" ), func () {
4542 ctx := context .TODO ()
4643 var clientset * kubernetes.Clientset
44+ var httpProxy , httpsProxy , noProxy string
4745
4846 generateCSR := func () string {
4947 csrTemplate := & x509.CertificateRequest {
@@ -87,6 +85,10 @@ var _ = Describe("Istio-CSR", Ordered, Label("Feature:IstioCSR"), func() {
8785 "OPERATOR_LOG_LEVEL" : "5" ,
8886 })
8987 Expect (err ).NotTo (HaveOccurred ())
88+
89+ By ("getting cluster proxy configuration" )
90+ httpProxy , httpsProxy , noProxy , err = getClusterProxyConfig (ctx , configClient )
91+ Expect (err ).Should (BeNil (), "failed to get cluster proxy config" )
9092 })
9193
9294 var ns * corev1.Namespace
@@ -186,6 +188,9 @@ var _ = Describe("Istio-CSR", Ordered, Label("Feature:IstioCSR"), func() {
186188 IstioCSRGRPCurlJobConfig {
187189 CertificateSigningRequest : csr ,
188190 IstioCSRStatus : istioCSRStatus ,
191+ HTTPProxy : httpProxy ,
192+ HTTPSProxy : httpsProxy ,
193+ NoProxy : noProxy ,
189194 },
190195 ), filepath .Join ("testdata" , "istio" , "grpcurl_job.yaml" ), ns .Name )
191196 DeferCleanup (func () {
@@ -263,6 +268,9 @@ var _ = Describe("Istio-CSR", Ordered, Label("Feature:IstioCSR"), func() {
263268 IstioCSRStatus : istioCSRStatus ,
264269 ClusterID : clusterName , // matches the IstioCSR resource
265270 JobName : grpcAppName ,
271+ HTTPProxy : httpProxy ,
272+ HTTPSProxy : httpsProxy ,
273+ NoProxy : noProxy ,
266274 },
267275 ), filepath .Join ("testdata" , "istio" , "grpcurl_job_with_cluster_id.yaml" ), ns .Name )
268276 DeferCleanup (func () {
@@ -333,6 +341,9 @@ var _ = Describe("Istio-CSR", Ordered, Label("Feature:IstioCSR"), func() {
333341 IstioCSRStatus : istioCSRStatus ,
334342 ClusterID : "wrong-cluster-id" , // doesn't match the IstioCSR resource
335343 JobName : grpcAppName ,
344+ HTTPProxy : httpProxy ,
345+ HTTPSProxy : httpsProxy ,
346+ NoProxy : noProxy ,
336347 },
337348 ), filepath .Join ("testdata" , "istio" , "grpcurl_job_with_cluster_id.yaml" ), ns .Name )
338349 DeferCleanup (func () {
0 commit comments