Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions shield/pkg/shield/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ var (
// VerifyResource checks if manifest is valid based on signature, ManifestVerifyRule and RequestFilterProfile which is included in ManifestVerifyConfig.
// VerifyResource uses the default profile if ManifestVerifyConfig input is nil.
func VerifyResource(request *admission.AdmissionRequest, mvconfig *config.ManifestVerifyConfig, rule *config.ManifestVerifyRule) (allow bool, message string, err error) {
// allow dryrun request
if *request.DryRun {
return true, "Allowed because of DryRun request", nil
}

// log setting
logLevelStr := os.Getenv(config.LogLevelEnvKey)
logLevel, ok := config.LogLevelMap[logLevelStr]
Expand Down