sigs.k8s.io/cluster-api-provider-aws@v1.5.5/feature/feature.go (about) 1 /* 2 Copyright 2020 The Kubernetes 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 feature 18 19 import ( 20 "k8s.io/apimachinery/pkg/util/runtime" 21 "k8s.io/component-base/featuregate" 22 ) 23 24 const ( 25 // Every capa-specific feature gate should add method here following this template: 26 // 27 // // owner: @username 28 // // alpha: v1.X 29 // MyFeature featuregate.Feature = "MyFeature". 30 31 // EKS is used to enable EKS support 32 // owner: @richardcase 33 // alpha: v0.4 34 EKS featuregate.Feature = "EKS" 35 36 // EKSEnableIAM will enable the IAM resource creation/modification 37 // owner: @richardcase 38 // alpha: v0.4 39 EKSEnableIAM featuregate.Feature = "EKSEnableIAM" 40 41 // EKSAllowAddRoles is used to enable the usage of additional IAM roles 42 // owner: @richardcase 43 // alpha: v0.4 44 EKSAllowAddRoles featuregate.Feature = "EKSAllowAddRoles" 45 46 // EKSFargate is used to enable the usage of EKS fargate profiles 47 // owner: @richardcase 48 // alpha: v0.4 49 EKSFargate featuregate.Feature = "EKSFargate" 50 51 // MachinePool is used to enable ASG support 52 // owner: @mytunguyen 53 // alpha: v0.1 54 MachinePool featuregate.Feature = "MachinePool" 55 56 // EventBridgeInstanceState will use Event Bridge and notifications to keep instance state up-to-date 57 // owner: @gab-satchi 58 // alpha: v0.7? 59 EventBridgeInstanceState featuregate.Feature = "EventBridgeInstanceState" 60 61 // AutoControllerIdentityCreator will create AWSClusterControllerIdentity instance that allows all namespaces to use it. 62 // owner: @sedefsavas 63 // alpha: v0.6 64 AutoControllerIdentityCreator featuregate.Feature = "AutoControllerIdentityCreator" 65 66 // BootstrapFormatIgnition will allow an user to enable alternate machine bootstrap format, viz. Ignition. 67 BootstrapFormatIgnition featuregate.Feature = "BootstrapFormatIgnition" 68 69 // ExternalResourceGC is used to enable the garbage collection of external resources like NLB/ALB on deletion 70 // owner: @richardcase 71 // alpha: v1.5 72 ExternalResourceGC featuregate.Feature = "ExternalResourceGC" 73 ) 74 75 func init() { 76 runtime.Must(MutableGates.Add(defaultCAPAFeatureGates)) 77 } 78 79 // defaultCAPAFeatureGates consists of all known capa-specific feature keys. 80 // To add a new feature, define a key for it above and add it here. 81 var defaultCAPAFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ 82 // Every feature should be initiated here: 83 EKS: {Default: true, PreRelease: featuregate.Beta}, 84 EKSEnableIAM: {Default: false, PreRelease: featuregate.Beta}, 85 EKSAllowAddRoles: {Default: false, PreRelease: featuregate.Beta}, 86 EKSFargate: {Default: false, PreRelease: featuregate.Alpha}, 87 EventBridgeInstanceState: {Default: false, PreRelease: featuregate.Alpha}, 88 MachinePool: {Default: false, PreRelease: featuregate.Alpha}, 89 AutoControllerIdentityCreator: {Default: true, PreRelease: featuregate.Alpha}, 90 BootstrapFormatIgnition: {Default: false, PreRelease: featuregate.Alpha}, 91 ExternalResourceGC: {Default: false, PreRelease: featuregate.Alpha}, 92 }