Skip to content

Commit c743e68

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#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: bf01fa2 **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # Fixes kubernetes#50675 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
2 parents df8287c + 493ee8b commit c743e68

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

pkg/kubelet/dockershim/helpers_windows.go

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,17 @@ import (
2626
dockercontainer "github.com/docker/docker/api/types/container"
2727
dockerfilters "github.com/docker/docker/api/types/filters"
2828
"github.com/golang/glog"
29-
"k8s.io/api/core/v1"
3029
runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
3130
)
3231

3332
func DefaultMemorySwap() int64 {
3433
return 0
3534
}
3635

37-
func (ds *dockerService) getSecurityOpts(containerName string, sandboxConfig *runtimeapi.PodSandboxConfig, separator rune) ([]string, error) {
38-
hasSeccompSetting := false
39-
annotations := sandboxConfig.GetAnnotations()
40-
if _, ok := annotations[v1.SeccompContainerAnnotationKeyPrefix+containerName]; !ok {
41-
_, hasSeccompSetting = annotations[v1.SeccompPodAnnotationKey]
42-
} else {
43-
hasSeccompSetting = true
36+
func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) ([]string, error) {
37+
if seccompProfile != "" {
38+
glog.Warningf("seccomp annotations are not supported on windows")
4439
}
45-
46-
if hasSeccompSetting {
47-
glog.Warningf("seccomp annotations found, but it is not supported on windows")
48-
}
49-
5040
return nil, nil
5141
}
5242

0 commit comments

Comments
 (0)