...

Source file src/k8s.io/kubernetes/pkg/kubelet/cm/helpers_unsupported.go

Documentation: k8s.io/kubernetes/pkg/kubelet/cm

     1  //go:build !linux
     2  // +build !linux
     3  
     4  /*
     5  Copyright 2016 The Kubernetes Authors.
     6  
     7  Licensed under the Apache License, Version 2.0 (the "License");
     8  you may not use this file except in compliance with the License.
     9  You may obtain a copy of the License at
    10  
    11      http://www.apache.org/licenses/LICENSE-2.0
    12  
    13  Unless required by applicable law or agreed to in writing, software
    14  distributed under the License is distributed on an "AS IS" BASIS,
    15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16  See the License for the specific language governing permissions and
    17  limitations under the License.
    18  */
    19  
    20  package cm
    21  
    22  import (
    23  	"k8s.io/api/core/v1"
    24  	"k8s.io/apimachinery/pkg/types"
    25  )
    26  
    27  const (
    28  	MinShares = 0
    29  	MaxShares = 0
    30  
    31  	SharesPerCPU  = 0
    32  	MilliCPUToCPU = 0
    33  
    34  	QuotaPeriod    = 0
    35  	MinQuotaPeriod = 0
    36  )
    37  
    38  // MilliCPUToQuota converts milliCPU and period to CFS quota values.
    39  func MilliCPUToQuota(milliCPU, period int64) int64 {
    40  	return 0
    41  }
    42  
    43  // MilliCPUToShares converts the milliCPU to CFS shares.
    44  func MilliCPUToShares(milliCPU int64) int64 {
    45  	return 0
    46  }
    47  
    48  // ResourceConfigForPod takes the input pod and outputs the cgroup resource config.
    49  func ResourceConfigForPod(pod *v1.Pod, enforceCPULimit bool, cpuPeriod uint64, enforceMemoryQoS bool) *ResourceConfig {
    50  	return nil
    51  }
    52  
    53  // GetCgroupSubsystems returns information about the mounted cgroup subsystems
    54  func GetCgroupSubsystems() (*CgroupSubsystems, error) {
    55  	return nil, nil
    56  }
    57  
    58  func getCgroupProcs(dir string) ([]int, error) {
    59  	return nil, nil
    60  }
    61  
    62  // GetPodCgroupNameSuffix returns the last element of the pod CgroupName identifier
    63  func GetPodCgroupNameSuffix(podUID types.UID) string {
    64  	return ""
    65  }
    66  
    67  // NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup
    68  func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver string) string {
    69  	return ""
    70  }
    71  
    72  // GetKubeletContainer returns the cgroup the kubelet will use
    73  func GetKubeletContainer(kubeletCgroups string) (string, error) {
    74  	return "", nil
    75  }
    76  

View as plain text