helpers_unsupported.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // +build !linux,!windows
  2. /*
  3. Copyright 2015 The Kubernetes Authors.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. */
  14. package dockershim
  15. import (
  16. "fmt"
  17. "github.com/blang/semver"
  18. dockertypes "github.com/docker/docker/api/types"
  19. runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
  20. "k8s.io/klog"
  21. )
  22. func DefaultMemorySwap() int64 {
  23. return -1
  24. }
  25. func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) ([]string, error) {
  26. klog.Warningf("getSecurityOpts is unsupported in this build")
  27. return nil, nil
  28. }
  29. func (ds *dockerService) updateCreateConfig(
  30. createConfig *dockertypes.ContainerCreateConfig,
  31. config *runtimeapi.ContainerConfig,
  32. sandboxConfig *runtimeapi.PodSandboxConfig,
  33. podSandboxID string, securityOptSep rune, apiVersion *semver.Version) error {
  34. klog.Warningf("updateCreateConfig is unsupported in this build")
  35. return nil
  36. }
  37. func (ds *dockerService) determinePodIPBySandboxID(uid string) []string {
  38. klog.Warningf("determinePodIPBySandboxID is unsupported in this build")
  39. return nil
  40. }
  41. func getNetworkNamespace(c *dockertypes.ContainerJSON) (string, error) {
  42. return "", fmt.Errorf("unsupported platform")
  43. }
  44. // applyExperimentalCreateConfig applies experimental configures from sandbox annotations.
  45. func applyExperimentalCreateConfig(createConfig *dockertypes.ContainerCreateConfig, annotations map[string]string) {
  46. }