Update godeps
This commit is contained in:
parent
1c8773fc98
commit
1bc383f9c5
1723 changed files with 287976 additions and 411028 deletions
39
vendor/k8s.io/kubernetes/pkg/security/apparmor/BUILD
generated
vendored
Normal file
39
vendor/k8s.io/kubernetes/pkg/security/apparmor/BUILD
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_binary",
|
||||
"go_library",
|
||||
"go_test",
|
||||
"cgo_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"helpers.go",
|
||||
"validate.go",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/util:go_default_library",
|
||||
"//pkg/util/config:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["validate_test.go"],
|
||||
data = [
|
||||
"testdata/profiles",
|
||||
],
|
||||
library = "go_default_library",
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//vendor:github.com/stretchr/testify/assert",
|
||||
],
|
||||
)
|
||||
8
vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go
generated
vendored
8
vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go
generated
vendored
|
|
@ -49,7 +49,13 @@ func isRequired(pod *api.Pod) bool {
|
|||
|
||||
// Returns the name of the profile to use with the container.
|
||||
func GetProfileName(pod *api.Pod, containerName string) string {
|
||||
return pod.Annotations[ContainerAnnotationKeyPrefix+containerName]
|
||||
return GetProfileNameFromPodAnnotations(pod.Annotations, containerName)
|
||||
}
|
||||
|
||||
// GetProfileNameFromPodAnnotations gets the name of the profile to use with container from
|
||||
// pod annotations
|
||||
func GetProfileNameFromPodAnnotations(annotations map[string]string, containerName string) string {
|
||||
return annotations[ContainerAnnotationKeyPrefix+containerName]
|
||||
}
|
||||
|
||||
// Sets the name of the profile to use with the container.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue