Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add proxy feature gate #473

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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