Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyModified ¶ added in v2.15.0
func AnyModified() bool
AnyModified returns true if any feature flag value is different to its default.
Types ¶
type FeatureFlag ¶
type FeatureFlag string
FeatureFlag represents a command line switch to turn certain features ON or OFF. Values are read from environment variables defined by the feature flag. The feature flag can have default value which is used when the resp. environment variable does not exist
const ( // VerifyEnvironmentType controls whether the environment check at the beginning of execution is enabled or not. // Introduced: before 2023-04-27; v2.0.0 VerifyEnvironmentType FeatureFlag = "MONACO_FEAT_VERIFY_ENV_TYPE" // ManagementZoneSettingsNumericIDs tells whether configs of settings type builtin:management-zones // are addressed directly via their object ID or their resolved numeric ID when they are referenced. // Introduced: 2023-04-18; v2.0.1 ManagementZoneSettingsNumericIDs FeatureFlag = "MONACO_FEAT_USE_MZ_NUMERIC_ID" // DangerousCommands returns the feature flag that tells whether dangerous commands for the CLI are enabled or not DangerousCommands FeatureFlag = "MONACO_ENABLE_DANGEROUS_COMMANDS" // FastDependencyResolver controls which deplenency resolver is used when downloading. // When set to true, the fast (but memory intensive) Aho-Corasick algorithm based is used. // whet set to false, the old naive and CPU intensive resolver is used. FastDependencyResolver FeatureFlag = "MONACO_FEAT_FAST_DEPENDENCY_RESOLVER" // DownloadFilter controls whether download filters out configurations that we believe can't // be managed by config-as-code. Some users may still want to download everything on an environment, and turning off the // filters allows them to do so. DownloadFilter FeatureFlag = "MONACO_FEAT_DOWNLOAD_FILTER" // DownloadFilterSettings returns the controls whether general filters are applied to Settings download. DownloadFilterSettings FeatureFlag = "MONACO_FEAT_DOWNLOAD_FILTER_SETTINGS" // DownloadFilterSettingsUnmodifiable returns the feature flag controlling whether Settings marked as unmodifiable by // their dtclient.SettingsModificationInfo are filtered out on download. DownloadFilterSettingsUnmodifiable FeatureFlag = "MONACO_FEAT_DOWNLOAD_FILTER_SETTINGS_UNMODIFIABLE" // DownloadFilterClassicConfigs returns the feature flag controlling whether download filters are applied to Classic Config API download. DownloadFilterClassicConfigs FeatureFlag = "MONACO_FEAT_DOWNLOAD_FILTER_CLASSIC_CONFIGS" // SkipVersionCheck returns the feature flag to control disabling the version check that happens at the end of each monaco run SkipVersionCheck FeatureFlag = "MONACO_SKIP_VERSION_CHECK" // ExtractScopeAsParameter returns the feature flag to controlling whether the scope field of setting 2.0 objects shall be extracted as monaco parameter ExtractScopeAsParameter FeatureFlag = "MONACO_FEAT_EXTRACT_SCOPE_AS_PARAMETER" // BuildSimpleClassicURL returns the feature flag to controlling whether we attempt to create the Classic URL of a platform environment via string replacement before using the metadata API. // As there may be networking/DNS edge-cases where the replaced URL is valid (GET returns 200) but is not actually a Classic environment, this feature flag allows deactivation of the feature. BuildSimpleClassicURL FeatureFlag = "MONACO_FEAT_SIMPLE_CLASSIC_URL" // LogToFile returns the feature flag to control whether log files shall be created or not LogToFile FeatureFlag = "MONACO_LOG_FILE_ENABLED" // UpdateNonUniqueByNameIfSingleOneExists toggles whether we attempt update api.API configurations with NonUniqueName, // by name if only a single one is found on the environment. As this causes issues if a project defines more than one config // with the same name - they will overwrite each other, and keep a single on the environment - the feature flag is introduced // to turn it off until a generally better solution is available. // Introduced: 2023-09-01; v2.9.1 UpdateNonUniqueByNameIfSingleOneExists FeatureFlag = "MONACO_FEAT_UPDATE_SINGLE_NON_UNIQUE_BY_NAME" )
const ( // SkipReadOnlyAccountGroupUpdates toggles whether updates to read-only account groups are skipped or not. // Introduced: 2024-03-29; v2.13.0 SkipReadOnlyAccountGroupUpdates FeatureFlag = "MONACO_SKIP_READ_ONLY_ACCOUNT_GROUP_UPDATES" // PersistSettingsOrder toggles whether insertAfter config parameter is persisted for ordered settings. // Introduced: 2024-05-15; v2.14.0 PersistSettingsOrder FeatureFlag = "MONACO_FEAT_PERSIST_SETTINGS_ORDER" // OpenPipeline toggles whether openpipeline configurations are downloaded and / or deployed. // Introduced: 2024-06-10; v2.15.0 OpenPipeline FeatureFlag = "MONACO_FEAT_OPENPIPELINE" // IgnoreSkippedConfigs toggles whether configurations that are marked to be skipped should also be excluded // from the dependency graph created by Monaco. These configs are not only skipped during deployment but also // not validated prior to deployment. Further, other configs cannot reference properties of this config anymore. IgnoreSkippedConfigs FeatureFlag = "MONACO_FEAT_IGNORE_SKIPPED_CONFIGS" // Segments toggles whether segment configurations are downloaded and / or deployed. // Introduced: v2.18.0 Segments FeatureFlag = "MONACO_FEAT_SEGMENTS" // ServiceUsers toggles whether account service users configurations are downloaded and / or deployed. // Introduced: v2.18.0 ServiceUsers FeatureFlag = "MONACO_FEAT_SERVICE_USERS" // OnlyCreateReferencesInStringValues toggles whether references are created arbitarily in JSON templates // or when enabled only in string values within the JSON. // Introduced: v2.19.0 OnlyCreateReferencesInStringValues FeatureFlag = "MONACO_FEAT_ONLY_CREATE_REFERENCES_IN_STRINGS" // ServiceLevelObjective toggles whether slo configurations are downloaded and / or deployed. // Introduced: v2.19.0 ServiceLevelObjective FeatureFlag = "MONACO_FEAT_SLO_V2" )
func (FeatureFlag) Enabled ¶
func (ff FeatureFlag) Enabled() bool
Enabled look up between known temporary and permanent flags and evaluates it. Feature flags are considered to be "enabled" if their resp. environment variable is set to 1, t, T, TRUE, true or True. Feature flags are considered to be "disabled" if their resp. environment variable is set to 0, f, F, FALSE, false or False.
func (FeatureFlag) EnvName ¶
func (ff FeatureFlag) EnvName() string
EnvName gives back the environment variable name for the feature flag
func (FeatureFlag) String ¶ added in v2.18.0
func (ff FeatureFlag) String() string