Documentation ¶
Index ¶
- func ConvertActionableEntityToViolatableEntity(entity ActionableEntity) (libs.ViolatableEntity, error)
- func DoAction(action Action, entity ActionableEntity, violatableEntity libs.ViolatableEntity, ...) map[string][]time.Time
- func NotifyOfViolation(actionMessage actionMessage)
- type Action
- type ActionCronJob
- type ActionDaemonSet
- type ActionDeployment
- type ActionIngress
- type ActionJob
- type ActionNamespace
- type ActionPod
- type ActionableEntity
- type CapabilitiesAction
- type HostVolumesAction
- type ImageRepoAction
- type ImageSizeAction
- type IngressAction
- type NoOwnerAction
- type PrivilegedAction
- type RequiredDaemonSetAction
- type RequiredDaemonSetAnnotationAction
- type RequiredDaemonSetLabelAction
- type RequiredDeploymentAction
- type RequiredDeploymentAnnotationAction
- type RequiredDeploymentLabelAction
- type RequiredNamespaceAction
- type RequiredNamespaceAnnotationAction
- type RequiredNamespaceLabelAction
- type RequiredPodAction
- type RequiredPodAnnotationAction
- type RequiredPodLabelAction
- type RequiredResourceQuotaAction
- type SingleReplicaAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertActionableEntityToViolatableEntity ¶
func ConvertActionableEntityToViolatableEntity(entity ActionableEntity) (libs.ViolatableEntity, error)
func DoAction ¶
func DoAction(action Action, entity ActionableEntity, violatableEntity libs.ViolatableEntity, lastActions map[string][]time.Time, dryRun bool) map[string][]time.Time
actionable is interface, violatable is struct
func NotifyOfViolation ¶
func NotifyOfViolation(actionMessage actionMessage)
Types ¶
type Action ¶
type Action interface {
DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
}
type ActionCronJob ¶
func (ActionCronJob) DoAction ¶
func (a ActionCronJob) DoAction()
type ActionDaemonSet ¶ added in v1.0.2
func (ActionDaemonSet) DoAction ¶ added in v1.0.2
func (a ActionDaemonSet) DoAction()
type ActionDeployment ¶
type ActionDeployment libs.Deployment
func (ActionDeployment) DoAction ¶
func (a ActionDeployment) DoAction()
type ActionIngress ¶
func (ActionIngress) DoAction ¶
func (a ActionIngress) DoAction()
type ActionNamespace ¶ added in v1.0.2
func (ActionNamespace) DoAction ¶ added in v1.0.2
func (a ActionNamespace) DoAction()
type ActionPod ¶
See http://stackoverflow.com/questions/28800672/how-to-add-new-methods-to-an-existing-type-in-go
type ActionableEntity ¶
type ActionableEntity interface {
DoAction()
}
type CapabilitiesAction ¶
type CapabilitiesAction struct {
violations.Violation
}
func (CapabilitiesAction) DoAction ¶
func (a CapabilitiesAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for containers with extra capablities.
type HostVolumesAction ¶
type HostVolumesAction struct {
violations.Violation
}
func (HostVolumesAction) DoAction ¶
func (a HostVolumesAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
Action for any pod with a hostVolume
type ImageRepoAction ¶
type ImageRepoAction struct {
violations.Violation
}
func (ImageRepoAction) DoAction ¶
func (a ImageRepoAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for invalid repo for an image
type ImageSizeAction ¶
type ImageSizeAction struct {
violations.Violation
}
func (ImageSizeAction) DoAction ¶
func (a ImageSizeAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for a container with a big image size
type IngressAction ¶
type IngressAction struct {
violations.Violation
}
func (IngressAction) DoAction ¶
func (a IngressAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for ingress, a special kind that we don't warn.
type NoOwnerAction ¶ added in v1.0.2
type NoOwnerAction struct {
violations.Violation
}
func (NoOwnerAction) DoAction ¶ added in v1.0.2
func (a NoOwnerAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing owner
type PrivilegedAction ¶
type PrivilegedAction struct {
violations.Violation
}
func (PrivilegedAction) DoAction ¶
func (a PrivilegedAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
Action for privileged mode containers
type RequiredDaemonSetAction ¶ added in v1.0.2
type RequiredDaemonSetAction struct {
violations.Violation
}
func (RequiredDaemonSetAction) DoAction ¶ added in v1.0.2
func (a RequiredDaemonSetAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing mandatory daemonset
type RequiredDaemonSetAnnotationAction ¶ added in v1.0.2
type RequiredDaemonSetAnnotationAction struct {
violations.Violation
}
func (RequiredDaemonSetAnnotationAction) DoAction ¶ added in v1.0.2
func (a RequiredDaemonSetAnnotationAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing daemonset annotation
type RequiredDaemonSetLabelAction ¶ added in v1.0.2
type RequiredDaemonSetLabelAction struct {
violations.Violation
}
func (RequiredDaemonSetLabelAction) DoAction ¶ added in v1.0.2
func (a RequiredDaemonSetLabelAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing daemonset label
type RequiredDeploymentAction ¶ added in v1.0.2
type RequiredDeploymentAction struct {
violations.Violation
}
func (RequiredDeploymentAction) DoAction ¶ added in v1.0.2
func (a RequiredDeploymentAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing mandatory deployment
type RequiredDeploymentAnnotationAction ¶ added in v1.0.2
type RequiredDeploymentAnnotationAction struct {
violations.Violation
}
func (RequiredDeploymentAnnotationAction) DoAction ¶ added in v1.0.2
func (a RequiredDeploymentAnnotationAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing namespace annotation
type RequiredDeploymentLabelAction ¶ added in v1.0.2
type RequiredDeploymentLabelAction struct {
violations.Violation
}
func (RequiredDeploymentLabelAction) DoAction ¶ added in v1.0.2
func (a RequiredDeploymentLabelAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing namespace label
type RequiredNamespaceAction ¶ added in v1.0.2
type RequiredNamespaceAction struct {
violations.Violation
}
func (RequiredNamespaceAction) DoAction ¶ added in v1.0.2
func (a RequiredNamespaceAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing mandatory namespace
type RequiredNamespaceAnnotationAction ¶ added in v1.0.2
type RequiredNamespaceAnnotationAction struct {
violations.Violation
}
func (RequiredNamespaceAnnotationAction) DoAction ¶ added in v1.0.2
func (a RequiredNamespaceAnnotationAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing namespace annotation
type RequiredNamespaceLabelAction ¶ added in v1.0.2
type RequiredNamespaceLabelAction struct {
violations.Violation
}
func (RequiredNamespaceLabelAction) DoAction ¶ added in v1.0.2
func (a RequiredNamespaceLabelAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing namespace label
type RequiredPodAction ¶ added in v1.0.2
type RequiredPodAction struct {
violations.Violation
}
func (RequiredPodAction) DoAction ¶ added in v1.0.2
func (a RequiredPodAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing mandatory pod
type RequiredPodAnnotationAction ¶ added in v1.0.2
type RequiredPodAnnotationAction struct {
violations.Violation
}
func (RequiredPodAnnotationAction) DoAction ¶ added in v1.0.2
func (a RequiredPodAnnotationAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing pod annotation
type RequiredPodLabelAction ¶ added in v1.0.2
type RequiredPodLabelAction struct {
violations.Violation
}
func (RequiredPodLabelAction) DoAction ¶ added in v1.0.2
func (a RequiredPodLabelAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing pod label
type RequiredResourceQuotaAction ¶ added in v1.0.2
type RequiredResourceQuotaAction struct {
violations.Violation
}
func (RequiredResourceQuotaAction) DoAction ¶ added in v1.0.2
func (a RequiredResourceQuotaAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for missing mandatory resourcequota
type SingleReplicaAction ¶
type SingleReplicaAction struct {
violations.Violation
}
func (SingleReplicaAction) DoAction ¶
func (a SingleReplicaAction) DoAction(entity ActionableEntity, vEntity libs.ViolatableEntity, lastActions map[string][]time.Time) []string
action for pods with single replica , currently action is supressed.