Skip to content

Commit 7d23cdc

Browse files
authored
feat: add property TestMode for some force e2e test (#8076)
1 parent 5581ec2 commit 7d23cdc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

pkg/agent/baker.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,10 @@ func getContainerServiceFuncMap(config *datamodel.NodeBootstrappingConfiguration
11981198
"GetBootstrapProfileContainerRegistryServer": func() string {
11991199
return config.ContainerService.Properties.SecurityProfile.GetPrivateEgressContainerRegistryServer()
12001200
},
1201+
// Used for internal e2e test only, won't be set by RP or used in production.
1202+
"GetNetworkIsolatedClusterTestMode": func() bool {
1203+
return config.ContainerService.Properties.SecurityProfile.GetPrivateEgressTestMode()
1204+
},
12011205
"GetMCRRepositoryBase": func() string {
12021206
if config.CloudSpecConfig.KubernetesSpecConfig.MCRKubernetesImageBase == "" {
12031207
return "mcr.microsoft.com"

pkg/agent/datamodel/types.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,6 +2412,8 @@ type PrivateEgress struct {
24122412
Enabled bool `json:"enabled"`
24132413
ContainerRegistryServer string `json:"containerRegistryServer"`
24142414
ProxyAddress string `json:"proxyAddress"`
2415+
// Used for internal e2e test only, won't be set by RP or used in production.
2416+
TestMode bool `json:"testMode,omitempty"`
24152417
}
24162418

24172419
func (s *SecurityProfile) GetProxyAddress() string {
@@ -2428,6 +2430,14 @@ func (s *SecurityProfile) GetPrivateEgressContainerRegistryServer() string {
24282430
return ""
24292431
}
24302432

2433+
// Used for internal e2e test only, won't be set by RP or used in production.
2434+
func (s *SecurityProfile) GetPrivateEgressTestMode() bool {
2435+
if s != nil && s.PrivateEgress != nil && s.PrivateEgress.Enabled {
2436+
return s.PrivateEgress.TestMode
2437+
}
2438+
return false
2439+
}
2440+
24312441
// SecurityProfile end.
24322442

24332443
// ----------------------- Start of changes related to localdns ------------------------------------------.

0 commit comments

Comments
 (0)