Commit c743e68f authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #50694 from dims/fix-make-cross-problem-with-helpers

Automatic merge from submit-queue (batch tested with PRs 50694, 50702) Fix make cross build failure **What this PR does / why we need it**: had to fix the method getSecurityOpts in helpers_windows.go to match the implementation in helpers_linux.go from commit: bf01fa2f **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # Fixes #50675 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents df8287c9 493ee8b2
...@@ -26,7 +26,6 @@ import ( ...@@ -26,7 +26,6 @@ import (
dockercontainer "github.com/docker/docker/api/types/container" dockercontainer "github.com/docker/docker/api/types/container"
dockerfilters "github.com/docker/docker/api/types/filters" dockerfilters "github.com/docker/docker/api/types/filters"
"github.com/golang/glog" "github.com/golang/glog"
"k8s.io/api/core/v1"
runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
) )
...@@ -34,19 +33,10 @@ func DefaultMemorySwap() int64 { ...@@ -34,19 +33,10 @@ func DefaultMemorySwap() int64 {
return 0 return 0
} }
func (ds *dockerService) getSecurityOpts(containerName string, sandboxConfig *runtimeapi.PodSandboxConfig, separator rune) ([]string, error) { func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) ([]string, error) {
hasSeccompSetting := false if seccompProfile != "" {
annotations := sandboxConfig.GetAnnotations() glog.Warningf("seccomp annotations are not supported on windows")
if _, ok := annotations[v1.SeccompContainerAnnotationKeyPrefix+containerName]; !ok {
_, hasSeccompSetting = annotations[v1.SeccompPodAnnotationKey]
} else {
hasSeccompSetting = true
} }
if hasSeccompSetting {
glog.Warningf("seccomp annotations found, but it is not supported on windows")
}
return nil, nil return nil, nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment