add apparmor build tag and update readme
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
This commit is contained in:
parent
bec3c3e2aa
commit
4f323377ee
10 changed files with 235 additions and 64 deletions
27
server/apparmor/apparmor_unsupported.go
Normal file
27
server/apparmor/apparmor_unsupported.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
// +build !apparmor
|
||||
|
||||
package apparmor
|
||||
|
||||
const (
|
||||
// ContainerAnnotationKeyPrefix is the prefix to an annotation key specifying a container profile.
|
||||
ContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/"
|
||||
|
||||
// ProfileRuntimeDefault is he profile specifying the runtime default.
|
||||
ProfileRuntimeDefault = "runtime/default"
|
||||
// ProfileNamePrefix is the prefix for specifying profiles loaded on the node.
|
||||
ProfileNamePrefix = "localhost/"
|
||||
)
|
||||
|
||||
// IsEnabled returns false, when build without apparmor build tag.
|
||||
func IsEnabled() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// InstallDefaultAppArmorProfile dose nothing, when build without apparmor build tag.
|
||||
func InstallDefaultAppArmorProfile() {
|
||||
}
|
||||
|
||||
// GetProfileNameFromPodAnnotations dose nothing, when build without apparmor build tag.
|
||||
func GetProfileNameFromPodAnnotations(annotations map[string]string, containerName string) string {
|
||||
return ""
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue