Documentation ¶
Overview ¶
Package featureflag implements simple feature-flagging. Feature flags can become an anti-pattern if abused. We should try to use them for two use-cases:
- `Preview` feature flags enable a piece of functionality we haven't yet fully baked. The user needs to 'opt-in'. We expect these flags to be removed at some time. Normally these will default to false.
- Escape-hatch feature flags turn off a default that we consider risky (e.g. pre-creating DNS records). This lets us ship a behaviour, and if we encounter unusual circumstances in the field, we can allow the user to turn the behaviour off. Normally these will default to true.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DNSPreCreate = New("DNSPreCreate", Bool(true))
DNSPreCreate controls whether we pre-create DNS records.
var DrainAndValidateRollingUpdate = New("DrainAndValidateRollingUpdate", Bool(true))
DrainAndValidateRollingUpdate if set will use new rolling update code that will drain and validate.
var EnableExternalCloudController = New("EnableExternalCloudController", Bool(false))
EnableExternalCloudController toggles the use of cloud-controller-manager introduced in v1.7
var EnableExternalDNS = New("EnableExternalDNS", Bool(false))
var EnableNodeAuthorization = New("EnableNodeAuthorization", Bool(false))
EnableNodeAuthorization enables the node authorization features
var EnableSeparateConfigBase = New("EnableSeparateConfigBase", Bool(false))
EnableSeparateConfigBase allows a config-base that is different from the state store
var ExperimentalClusterDNS = New("ExperimentalClusterDNS", Bool(false))
ExperimentalClusterDNS allows for setting the kubelet dns flag to experimental values. It allows for experiments with alternative DNS configurations - in particular local proxies.
var GoogleCloudBucketAcl = New("GoogleCloudBucketAcl", Bool(false))
GoogleCloudBucketAcl means the ACL will be set on a bucket when using GCS In particular, this is the only (?) way to grant the bucket.list permission However we should no longer need it, with the keyset.yaml fix
var KeepLaunchConfigurations = New("KeepLaunchConfigurations", Bool(false))
KeepLaunchConfigurations can be set to prevent garbage collection of old launch configurations
var SkipTerraformFormat = New("SkipTerraformFormat", Bool(false))
SkipTerraformFormat if set will mean that we will not `tf fmt` the generated terraform.
var SpecOverrideFlag = New("SpecOverrideFlag", Bool(false))
SpecOverrideFlag allows setting spec values on create
var Spotinst = New("Spotinst", Bool(false))
Spotinst toggles the use of Spotinst integration.
var VPCSkipEnableDNSSupport = New("VPCSkipEnableDNSSupport", Bool(false))
VPCSkipEnableDNSSupport if set will make that a VPC does not need DNSSupport enabled.
var VSphereCloudProvider = New("VSphereCloudProvider", Bool(false))
Functions ¶
func ParseFlags ¶
func ParseFlags(f string)
Types ¶
type FeatureFlag ¶
type FeatureFlag struct { Key string // contains filtered or unexported fields }
func New ¶
func New(key string, defaultValue *bool) *FeatureFlag
func (*FeatureFlag) Enabled ¶
func (f *FeatureFlag) Enabled() bool