1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

feat(featureflags): improved feature flag handling [EE-4609] (#8222)

* updated and improved feature flags using new module

* merge init into parse

* update the package documentation

* better docs

* minor tidy
This commit is contained in:
Matt Hook 2023-02-09 17:17:46 +13:00 committed by GitHub
parent 51b9804fab
commit bfc610c192
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 257 additions and 184 deletions

View file

@ -9,6 +9,7 @@ import (
"github.com/docker/docker/api/types/volume"
gittypes "github.com/portainer/portainer/api/git/types"
models "github.com/portainer/portainer/api/http/models/kubernetes"
"github.com/portainer/portainer/pkg/featureflags"
v1 "k8s.io/api/core/v1"
)
@ -104,7 +105,7 @@ type (
AdminPasswordFile *string
Assets *string
Data *string
FeatureFlags *[]Pair
FeatureFlags *[]string
DemoEnvironment *bool
EnableEdgeComputeFeatures *bool
EndpointURL *string
@ -1531,8 +1532,11 @@ const (
WebSocketKeepAlive = 1 * time.Hour
)
// List of supported features
var SupportedFeatureFlags = []Feature{}
// SupportFeatureFlags is a list of supported features. They should all be lower case
// e.g. "microk8s","kaas"
var SupportedFeatureFlags = []featureflags.Feature{
"microk8s",
}
const (
_ AuthenticationMethod = iota