Skip to content

Commit

Permalink
add proxy feature gate (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
airycanon authored Aug 9, 2023
1 parent 4f3e3e6 commit 0d646c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apis/meta/v1alpha1/labels_annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const (
NamespaceLabelKey = "core.kubernetes.io/namespace"
// IntegrationClassLabelKey for integrationclass resource
IntegrationClassLabelKey = "core.katanomi.dev/integrationClass"
// ProxyEnabledLabelKey
ProxyEnabledLabelKey = "core.katanomi.dev/proxyEnabled"

// ClusterIntegrationLabelKey for cluster integration resources
ClusterIntegrationLabelKey = "integrations.katanomi.dev/clusterIntegration"
Expand Down
9 changes: 9 additions & 0 deletions config/feature_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const (
// If the value is true, the feature is enabled cluster-wide.
VersionEnabledFeatureKey = "version.enabled"

// ProxyEnabledFeatureKey indicates the configuration key of the proxy feature gate.
// If the value is true, the feature is enabled cluster-wide.
ProxyEnabledFeatureKey = "proxy.enabled"

// InitializeAllowLocalRequestsFeatureKey indicates the configuration key of.
// If the value is true, the feature is enabled cluster-wide.
InitializeAllowLocalRequestsFeatureKey = "plugin.gitlab.allow-local-requests"
Expand All @@ -40,6 +44,10 @@ const (
// If the corresponding key does not exist, the default value is returned.
DefaultVersionEnabled FeatureValue = "false"

// DefaultProxyEnabled indicates the default value of the proxy feature gate.
// If the corresponding key does not exist, the default value is returned.
DefaultProxyEnabled FeatureValue = "false"

// DefaultInitializeAllowLocalRequests indicates the configuration key of.
// If the corresponding key does not exist, the default value is returned.
DefaultInitializeAllowLocalRequests FeatureValue = "true"
Expand All @@ -59,6 +67,7 @@ const (
// defaultFeatureValue defines the default value for the feature switch.
var defaultFeatureValue = map[string]FeatureValue{
VersionEnabledFeatureKey: DefaultVersionEnabled,
ProxyEnabledFeatureKey: DefaultProxyEnabled,
InitializeAllowLocalRequestsFeatureKey: DefaultInitializeAllowLocalRequests,
PrunerDelayAfterCompletedFeatureKey: DefaultPrunerDelayAfterCompleted,
PrunerKeepFeatureKey: DefaultPrunerKeep,
Expand Down

0 comments on commit 0d646c0

Please sign in to comment.