volcano.sh/volcano@v1.9.0/pkg/features/volcano_features.go (about)

     1  /*
     2   Copyright 2023 The Volcano Authors.
     3  
     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  
     8       http://www.apache.org/licenses/LICENSE-2.0
     9  
    10   Unless required by applicable law or agreed to in writing, software
    11   distributed under the License is distributed on an "AS IS" BASIS,
    12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   See the License for the specific language governing permissions and
    14   limitations under the License.
    15  */
    16  
    17  package features
    18  
    19  import (
    20  	"k8s.io/apimachinery/pkg/util/runtime"
    21  	utilfeature "k8s.io/apiserver/pkg/util/feature"
    22  	"k8s.io/component-base/featuregate"
    23  )
    24  
    25  const (
    26  	// WorkLoadSupport can cache and operate **K8s native resource**, Deployment/Replicas/ReplicationController/StatefulSet resources currently.
    27  	WorkLoadSupport featuregate.Feature = "WorkLoadSupport"
    28  
    29  	// VolcanoJobSupport can identify and schedule volcano job.
    30  	VolcanoJobSupport featuregate.Feature = "VolcanoJobSupport"
    31  
    32  	// PodDisruptionBudgetsSupport can cache and support PodDisruptionBudgets
    33  	PodDisruptionBudgetsSupport featuregate.Feature = "PodDisruptionBudgetsSupport"
    34  
    35  	// QueueCommandSync supports queue command sync.
    36  	QueueCommandSync featuregate.Feature = "QueueCommandSync"
    37  
    38  	// PriorityClass to provide the capacity of preemption at pod group level.
    39  	PriorityClass featuregate.Feature = "PriorityClass"
    40  
    41  	// CSIStorage tracking of available storage capacity that CSI drivers provide
    42  	CSIStorage featuregate.Feature = "CSIStorage"
    43  
    44  	// ResourceTopology supports resources like cpu/memory topology aware.
    45  	ResourceTopology featuregate.Feature = "ResourceTopology"
    46  )
    47  
    48  func init() {
    49  	runtime.Must(utilfeature.DefaultMutableFeatureGate.Add(defaultVolcanoFeatureGates))
    50  }
    51  
    52  var defaultVolcanoFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
    53  	WorkLoadSupport:             {Default: true, PreRelease: featuregate.Alpha},
    54  	VolcanoJobSupport:           {Default: true, PreRelease: featuregate.Alpha},
    55  	PodDisruptionBudgetsSupport: {Default: true, PreRelease: featuregate.Alpha},
    56  	QueueCommandSync:            {Default: true, PreRelease: featuregate.Alpha},
    57  	PriorityClass:               {Default: true, PreRelease: featuregate.Alpha},
    58  	// CSIStorage is explicitly set to false by default.
    59  	CSIStorage:       {Default: false, PreRelease: featuregate.Alpha},
    60  	ResourceTopology: {Default: true, PreRelease: featuregate.Alpha},
    61  }