MCPcopy
hub / github.com/FairwindsOps/polaris / applyContainerSchemaChecks

Function applyContainerSchemaChecks

pkg/validator/schema.go:305–314  ·  view source on GitHub ↗
(ctx context.Context, conf *config.Configuration, resources *kube.ResourceProvider, controller kube.GenericResource, container *corev1.Container, isInit bool)

Source from the content-addressed store, hash-verified

303}
304
305func applyContainerSchemaChecks(ctx context.Context, conf *config.Configuration, resources *kube.ResourceProvider, controller kube.GenericResource, container *corev1.Container, isInit bool) (ResultSet, error) {
306 test := schemaTestCase{
307 Target: config.TargetContainer,
308 ResourceProvider: resources,
309 Resource: controller,
310 Container: container,
311 IsInitContainer: isInit,
312 }
313 return applySchemaChecks(ctx, conf, test)
314}
315
316func applySchemaChecks(ctx context.Context, conf *config.Configuration, test schemaTestCase) (ResultSet, error) {
317 results := ResultSet{}

Callers 9

testValidateWithWorkloadFunction · 0.85
TestValidateHealthChecksFunction · 0.85
TestValidateImageFunction · 0.85
TestValidateNetworkingFunction · 0.85
TestValidateSecurityFunction · 0.85
TestValidateRunAsRootFunction · 0.85

Calls 1

applySchemaChecksFunction · 0.85

Tested by 8

testValidateWithWorkloadFunction · 0.68
TestValidateHealthChecksFunction · 0.68
TestValidateImageFunction · 0.68
TestValidateNetworkingFunction · 0.68
TestValidateSecurityFunction · 0.68
TestValidateRunAsRootFunction · 0.68