helpers_unsupported.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // +build !linux
  2. /*
  3. Copyright 2016 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 cm
  15. import (
  16. "k8s.io/api/core/v1"
  17. "k8s.io/apimachinery/pkg/types"
  18. )
  19. const (
  20. MinShares = 0
  21. SharesPerCPU = 0
  22. MilliCPUToCPU = 0
  23. MinQuotaPeriod = 0
  24. )
  25. // MilliCPUToQuota converts milliCPU and period to CFS quota values.
  26. func MilliCPUToQuota(milliCPU, period int64) int64 {
  27. return 0
  28. }
  29. // MilliCPUToShares converts the milliCPU to CFS shares.
  30. func MilliCPUToShares(milliCPU int64) int64 {
  31. return 0
  32. }
  33. // ResourceConfigForPod takes the input pod and outputs the cgroup resource config.
  34. func ResourceConfigForPod(pod *v1.Pod, enforceCPULimit bool, cpuPeriod uint64) *ResourceConfig {
  35. return nil
  36. }
  37. // GetCgroupSubsystems returns information about the mounted cgroup subsystems
  38. func GetCgroupSubsystems() (*CgroupSubsystems, error) {
  39. return nil, nil
  40. }
  41. func getCgroupProcs(dir string) ([]int, error) {
  42. return nil, nil
  43. }
  44. // GetPodCgroupNameSuffix returns the last element of the pod CgroupName identifier
  45. func GetPodCgroupNameSuffix(podUID types.UID) string {
  46. return ""
  47. }
  48. // NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup
  49. func NodeAllocatableRoot(cgroupRoot, cgroupDriver string) string {
  50. return ""
  51. }
  52. // GetKubeletContainer returns the cgroup the kubelet will use
  53. func GetKubeletContainer(kubeletCgroups string) (string, error) {
  54. return "", nil
  55. }
  56. // GetRuntimeContainer returns the cgroup used by the container runtime
  57. func GetRuntimeContainer(containerRuntime, runtimeCgroups string) (string, error) {
  58. return "", nil
  59. }