Documentation ¶
Index ¶
- Constants
- func IsValidationEnabledForNS(ns *corev1.Namespace) bool
- func ParseAllowedRegistries(registries string) []string
- type ImageValidatorService
- type NamespaceChecker
- type NotaryConfig
- type NotaryRepoClient
- type NotaryRepoFactory
- type NotaryValidator
- type PodValidator
- type RepoFactory
- type ServiceConfig
- type ValidationResult
Constants ¶
View Source
const (
NotaryDefaultTrustDir = "/tmp/.notary"
)
Variables ¶
This section is empty.
Functions ¶
func ParseAllowedRegistries ¶
Types ¶
type ImageValidatorService ¶
func NewImageValidator ¶
func NewImageValidator(sc *ServiceConfig, notaryClientFactory RepoFactory) ImageValidatorService
type NamespaceChecker ¶
type NotaryConfig ¶
type NotaryConfig struct {
Url string `json:"url"`
}
type NotaryRepoClient ¶
type NotaryRepoClient interface { client.Repository }
type NotaryRepoFactory ¶
func (NotaryRepoFactory) NewRepoClient ¶
func (f NotaryRepoFactory) NewRepoClient(img string, c NotaryConfig) (NotaryRepoClient, error)
type NotaryValidator ¶
type NotaryValidator struct { }
type PodValidator ¶
type PodValidator interface {
ValidatePod(ctx context.Context, pod *corev1.Pod, ns *corev1.Namespace) (ValidationResult, error)
}
func NewPodValidator ¶
func NewPodValidator(imageValidator ImageValidatorService) PodValidator
type RepoFactory ¶
type RepoFactory interface {
NewRepoClient(string, NotaryConfig) (NotaryRepoClient, error)
}
type ServiceConfig ¶
type ServiceConfig struct { NotaryConfig NotaryConfig AllowedRegistries []string }
type ValidationResult ¶
type ValidationResult string
const ( Invalid ValidationResult = "Invalid" Valid ValidationResult = "Valid" NoAction ValidationResult = "NoAction" )
Click to show internal directories.
Click to hide internal directories.