Add seccomp and apparmor support.

This commit is contained in:
Random-Liu
2016-09-26 00:46:29 -07:00
parent 9f99f4a554
commit 88fb149cf5
7 changed files with 78 additions and 21 deletions

View File

@@ -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.