violation

package
v0.0.0-...-8e01d1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2018 Google LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationStrategy

type AnnotationStrategy struct {
}

AnnotationStrategy adds "InvalidImageSecPolicy" as a label and an annotation, with detailed info in the annotations

func (*AnnotationStrategy) HandleAttestation

func (a *AnnotationStrategy) HandleAttestation(image string, pod *v1.Pod, isAttested bool) error

func (*AnnotationStrategy) HandleViolation

func (a *AnnotationStrategy) HandleViolation(image string, pod *v1.Pod, violations []policy.Violation) error

type LoggingStrategy

type LoggingStrategy struct {
}

func (*LoggingStrategy) HandleAttestation

func (l *LoggingStrategy) HandleAttestation(image string, pod *v1.Pod, isAttested bool) error

func (*LoggingStrategy) HandleViolation

func (l *LoggingStrategy) HandleViolation(image string, pod *v1.Pod, violations []policy.Violation) error

type MemoryStrategy

type MemoryStrategy struct {
	Violations   map[string]bool
	Attestations map[string]bool
}

For unit testing.

func (*MemoryStrategy) HandleAttestation

func (ms *MemoryStrategy) HandleAttestation(image string, pod *v1.Pod, isAttested bool) error

func (*MemoryStrategy) HandleViolation

func (ms *MemoryStrategy) HandleViolation(image string, p *v1.Pod, v []policy.Violation) error

type Strategy

type Strategy interface {
	HandleViolation(image string, pod *v1.Pod, violations []policy.Violation) error
	HandleAttestation(image string, pod *v1.Pod, isAttested bool) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL