Update godeps
This commit is contained in:
parent
a965f44f84
commit
73e22a50d2
453 changed files with 84778 additions and 70308 deletions
6
vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go
generated
vendored
|
|
@ -25,11 +25,11 @@ import (
|
|||
// TODO: Move these values into the API package.
|
||||
const (
|
||||
// The prefix to an annotation key specifying a container profile.
|
||||
ContainerAnnotationKeyPrefix = "container.apparmor.security.alpha.kubernetes.io/"
|
||||
ContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/"
|
||||
// The annotation key specifying the default AppArmor profile.
|
||||
DefaultProfileAnnotationKey = "apparmor.security.alpha.kubernetes.io/defaultProfileName"
|
||||
DefaultProfileAnnotationKey = "apparmor.security.beta.kubernetes.io/defaultProfileName"
|
||||
// The annotation key specifying the allowed AppArmor profiles.
|
||||
AllowedProfilesAnnotationKey = "apparmor.security.alpha.kubernetes.io/allowedProfileNames"
|
||||
AllowedProfilesAnnotationKey = "apparmor.security.beta.kubernetes.io/allowedProfileNames"
|
||||
|
||||
// The profile specifying the runtime default.
|
||||
ProfileRuntimeDefault = "runtime/default"
|
||||
|
|
|
|||
15
vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go
generated
vendored
15
vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go
generated
vendored
|
|
@ -27,6 +27,7 @@ import (
|
|||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
utilconfig "k8s.io/kubernetes/pkg/util/config"
|
||||
)
|
||||
|
||||
// Whether AppArmor should be disabled by default.
|
||||
|
|
@ -36,6 +37,7 @@ var isDisabledBuild bool
|
|||
// Interface for validating that a pod with with an AppArmor profile can be run by a Node.
|
||||
type Validator interface {
|
||||
Validate(pod *api.Pod) error
|
||||
ValidateHost() error
|
||||
}
|
||||
|
||||
func NewValidator(runtime string) Validator {
|
||||
|
|
@ -63,7 +65,7 @@ func (v *validator) Validate(pod *api.Pod) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
if v.validateHostErr != nil {
|
||||
if v.ValidateHost() != nil {
|
||||
return v.validateHostErr
|
||||
}
|
||||
|
||||
|
|
@ -86,11 +88,20 @@ func (v *validator) Validate(pod *api.Pod) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (v *validator) ValidateHost() error {
|
||||
return v.validateHostErr
|
||||
}
|
||||
|
||||
// Verify that the host and runtime is capable of enforcing AppArmor profiles.
|
||||
func validateHost(runtime string) error {
|
||||
// Check feature-gates
|
||||
if !utilconfig.DefaultFeatureGate.AppArmor() {
|
||||
return errors.New("AppArmor disabled by feature-gate")
|
||||
}
|
||||
|
||||
// Check build support.
|
||||
if isDisabledBuild {
|
||||
return errors.New("Binary not compiled for linux.")
|
||||
return errors.New("Binary not compiled for linux")
|
||||
}
|
||||
|
||||
// Check kernel support.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue