From 493ee8b28560c118cebd2165ba9ef0959cfa2bc3 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 15 Aug 2017 11:06:51 -0400 Subject: [PATCH] Fix make cross build failure had to fix the method getSecurityOpts in helpers_windows.go to match the implementation in helpers_linux.go from commit: bf01fa2f0010ae02d1ef3369ea268a2b4241619d Fixes #50675 --- pkg/kubelet/dockershim/helpers_windows.go | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/pkg/kubelet/dockershim/helpers_windows.go b/pkg/kubelet/dockershim/helpers_windows.go index f7735e4320a..b9ddfd2c649 100644 --- a/pkg/kubelet/dockershim/helpers_windows.go +++ b/pkg/kubelet/dockershim/helpers_windows.go @@ -26,7 +26,6 @@ import ( dockercontainer "github.com/docker/docker/api/types/container" dockerfilters "github.com/docker/docker/api/types/filters" "github.com/golang/glog" - "k8s.io/api/core/v1" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" ) @@ -34,19 +33,10 @@ func DefaultMemorySwap() int64 { return 0 } -func (ds *dockerService) getSecurityOpts(containerName string, sandboxConfig *runtimeapi.PodSandboxConfig, separator rune) ([]string, error) { - hasSeccompSetting := false - annotations := sandboxConfig.GetAnnotations() - if _, ok := annotations[v1.SeccompContainerAnnotationKeyPrefix+containerName]; !ok { - _, hasSeccompSetting = annotations[v1.SeccompPodAnnotationKey] - } else { - hasSeccompSetting = true +func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) ([]string, error) { + if seccompProfile != "" { + glog.Warningf("seccomp annotations are not supported on windows") } - - if hasSeccompSetting { - glog.Warningf("seccomp annotations found, but it is not supported on windows") - } - return nil, nil }