1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 21:35:23 +02:00

feat(openamt): add feature flag for OpenAMT [INT-5] (#6049)

feat(openamt): add feature flag for OpenAMT [INT-5]
This commit is contained in:
andres-portainer 2021-11-11 15:49:50 -03:00 committed by GitHub
parent af0d637414
commit e126f63965
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 121 additions and 2 deletions

View file

@ -50,6 +50,7 @@ type (
AdminPasswordFile *string
Assets *string
Data *string
FeatureFlags *[]Pair
EnableEdgeComputeFeatures *bool
EndpointURL *string
Labels *[]Pair
@ -388,6 +389,9 @@ type (
// ExtensionID represents a extension identifier
ExtensionID int
// Feature represents a feature that can be enabled or disabled via feature flags
Feature string
// GitlabRegistryData represents data required for gitlab registry to work
GitlabRegistryData struct {
ProjectID int `json:"ProjectId"`
@ -703,6 +707,7 @@ type (
AuthenticationMethod AuthenticationMethod `json:"AuthenticationMethod" example:"1"`
LDAPSettings LDAPSettings `json:"LDAPSettings" example:""`
OAuthSettings OAuthSettings `json:"OAuthSettings" example:""`
FeatureFlagSettings map[Feature]bool `json:"FeatureFlagSettings" example:""`
// The interval in which environment(endpoint) snapshots are created
SnapshotInterval string `json:"SnapshotInterval" example:"5m"`
// URL to the templates that will be displayed in the UI when navigating to App Templates
@ -1514,6 +1519,18 @@ const (
WebSocketKeepAlive = 1 * time.Hour
)
// Supported feature flags
const (
FeatOpenAMT Feature = "open-amt"
FeatFDO Feature = "fdo"
)
// List of supported features
var SupportedFeatureFlags = []Feature{
FeatOpenAMT,
FeatFDO,
}
const (
_ AuthenticationMethod = iota
// AuthenticationInternal represents the internal authentication method (authentication against Portainer API)