...

Source file src/k8s.io/kubernetes/pkg/volume/util/fsquota/quota_unsupported.go

Documentation: k8s.io/kubernetes/pkg/volume/util/fsquota

     1  //go:build !linux
     2  // +build !linux
     3  
     4  /*
     5  Copyright 2018 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 fsquota
    21  
    22  import (
    23  	"errors"
    24  
    25  	"k8s.io/kubernetes/pkg/volume/util/fsquota/common"
    26  	"k8s.io/mount-utils"
    27  
    28  	"k8s.io/apimachinery/pkg/api/resource"
    29  	"k8s.io/apimachinery/pkg/types"
    30  )
    31  
    32  // Dummy quota implementation for systems that do not implement support
    33  // for volume quotas
    34  
    35  var errNotImplemented = errors.New("not implemented")
    36  
    37  func GetQuotaOnDir(_ mount.Interface, _ string) (common.QuotaID, error) {
    38  	return common.BadQuotaID, errNotImplemented
    39  }
    40  
    41  // SupportsQuotas -- dummy implementation
    42  func SupportsQuotas(_ mount.Interface, _ string) (bool, error) {
    43  	return false, errNotImplemented
    44  }
    45  
    46  // AssignQuota -- dummy implementation
    47  func AssignQuota(_ mount.Interface, _ string, _ types.UID, _ *resource.Quantity) error {
    48  	return errNotImplemented
    49  }
    50  
    51  // GetConsumption -- dummy implementation
    52  func GetConsumption(_ string) (*resource.Quantity, error) {
    53  	return nil, errNotImplemented
    54  }
    55  
    56  // GetInodes -- dummy implementation
    57  func GetInodes(_ string) (*resource.Quantity, error) {
    58  	return nil, errNotImplemented
    59  }
    60  
    61  // ClearQuota -- dummy implementation
    62  func ClearQuota(_ mount.Interface, _ string) error {
    63  	return errNotImplemented
    64  }
    65  

View as plain text