Documentation
¶
Overview ¶
Package feature configures and handles feature flags for use in the application
Index ¶
Constants ¶
const FeatureCustomRepos = "fleet-management.custom-repos"
FeatureCustomRepos is the const of the custom repo feature flag
const FeatureImageBuildMS = "fleet-management.images_iso"
FeatureImageBuildMS is the const of the ms build feature flag
Variables ¶
var BuildUpdateRepoWithOldCommits = &Flag{Name: "edge-management.build_update_repo_with_old_commits", EnvVar: "FEATURE_BUILD_UPDATE_REPO_WITH_OLD_COMMITS"}
BuildUpdateRepoWithOldCommits is the feature flag for services.BuildUpdateRepo() to enable oldCommits feature
var CleanUPDeleteImages = &Flag{Name: "edge-management.cleanup_delete_images", EnvVar: "FEATURE_CLEANUP_DELETE_IMAGES"}
CleanUPDeleteImages is a feature flag to use for cleanup delete images
var CleanUPDevices = &Flag{Name: "edge-management.cleanup_devices", EnvVar: "FEATURE_CLEANUP_DEVICES"}
CleanUPDevices is a feature flag to use for cleanup devices
var CleanUPImages = &Flag{Name: "edge-management.cleanup_images", EnvVar: "FEATURE_CLEANUP_IMAGES"}
CleanUPImages is a feature flag to use for cleanup images
var CleanUPOrphanCommits = &Flag{Name: "edge-management.cleanup_orphan_commits", EnvVar: "FEATURE_CLEANUP_ORPHAN_COMMITS"}
CleanUPOrphanCommits is a feature flag to use for cleanup orphan commits
var ContentSources = &Flag{Name: "edge-management.content_sources", EnvVar: "FEATURE_CONTENT_SOURCES"}
ContentSources is a feature flag to use for code related to Parity and custom repositories
var DeviceSync = &Flag{Name: "edge-management.device_sync", EnvVar: "DEVICE_SYNC"}
DeviceSync is the feature flag for routes.CreateImageUpdate() EDA code
var DeviceSyncCreate = &Flag{Name: "edge-management.device_sync_create", EnvVar: "DEVICE_SYNC_CREATE"}
DeviceSyncCreate is the feature flag for routes.CreateImageUpdate() EDA code
var DeviceSyncDelete = &Flag{Name: "edge-management.device_sync_delete", EnvVar: "DEVICE_SYNC_DELETE"}
DeviceSyncDelete is the feature flag for routes.CreateImageUpdate() EDA code
var EdgeParityGroupsMigration = &Flag{Name: "edgeParity.groups-migration", EnvVar: "FEATURE_EDGE_PARITY_GROUPS_MIGRATION"}
EdgeParityGroupsMigration toggles edge parity groups migration
var EdgeParityInventoryGroupsEnabled = &Flag{Name: "edgeParity.inventory-groups-enabled", EnvVar: "FEATURE_INVENTORY_GROUPS_ENABLED"}
EdgeParityInventoryGroupsEnabled is a feature flag for inventory groups usage
var EdgeParityInventoryRbac = &Flag{Name: "edgeParity.inventory-rbac", EnvVar: "FEATURE_INVENTORY_RBAC"}
EdgeParityInventoryRbac is a feature flag for inventory rbac usage
var EnforceEdgeGroups = &Flag{Name: "edge-management.enforce_edge_groups", EnvVar: "FEATURE_ENFORCE_EDGE_GROUPS"}
EnforceEdgeGroups is a feature flag to query to query unleash whether the org is enforced to use edge groups
var GlitchtipLogging = &Flag{Name: "edge-management.glitchtip_logging", EnvVar: "GLITCHTIP_LOGGING"}
GlitchtipLogging is the feature flag for reporting errors to GlitchTip
var HideCreateGroup = &Flag{Name: "edge-management.hide-create-group", EnvVar: "FEATURE_HIDE_CREATE_GROUP"}
HideCreateGroup toggles creation of static deltas
var JobQueue = &Flag{Name: "edge-management.job_queue", EnvVar: "FEATURE_JOBQUEUE"}
JOB QUEUE FLAGS
var KafkaLogging = &Flag{Name: "edge-management.kafka_logging", EnvVar: "KAFKA_LOGGING"}
KafkaLogging is the feature flag for logging kafka messages
var MigrateCustomRepositories = &Flag{Name: "edge-management.migrate_custom_repositories", EnvVar: "FEATURE_MIGRATE_CUSTOM_REPOSITORIES"}
MigrateCustomRepositories is a feature flag to use for code related to custom repositories migration to content-sources
var PostMigrateDeleteCustomRepositories = &Flag{Name: "edge-management.post_migrate_delete_repos", EnvVar: "FEATURE_POST_MIGRATE_DELETE_REPOSITORIES"}
PostMigrateDeleteCustomRepositories is a feature flag to use for deletion of repos after migration
var PulpIntegration = &Flag{Name: "edge-management.pulp_integration", EnvVar: "FEATURE_PULP_INTEGRATION"}
PulpIntegration covers the overall integration of pulp and deprecation of AWS storage
var PulpIntegrationDisableAWSRepoStore = &Flag{Name: "edge-management.pulp_integration_disable_awsrepostore", EnvVar: "FEATURE_PULP_INTEGRATION_DISABLE_AWSREPOSTORE"}
PulpIntegrationDisableAWSRepoStore disables the AWS repo store process for development
var PulpIntegrationUpdateViaPulp = &Flag{Name: "edge-management.pulp_integration_updateviapulp", EnvVar: "FEATURE_PULP_INTEGRATION_UPDATEVIAPULP"}
PulpIntegrationUpdateViaPulp uses the Pulp Distribution URL for image and system updates
var SilentGormLogging = &Flag{Name: "edge-management.silent_gorm_logging", EnvVar: "FEATURE_SILENT_GORM_LOGGING"}
SilentGormLogging toggles noisy logging from Gorm (using for tests during development on slow machines/connections
var SkipUpdateRepo = &Flag{Name: "edge-management.skip_update_repo", EnvVar: "FEATURE_SKIP_UPDATE_REPO"}
SkipUpdateRepo is a feature flag to skip the process of download and re-upload of update repositories
var StorageImagesRepos = &Flag{Name: "edge-management.storage_images_repos", EnvVar: "STORAGE_IMAGES_REPOS"}
StorageImagesRepos is the feature flag to use storage.images-repos when updating images or creating ISO artifacts
Functions ¶
func CheckFeature ¶
CheckFeature checks to see if a given feature is available
Types ¶
type Flag ¶
Flag defines names for feature flag service and local env
func (*Flag) IsEnabledCtx ¶
IsEnabledCtx checks both the feature flag service and env vars on demand. Organization ID is passed from the context if present.
func (*Flag) IsEnabledLocal ¶
IsEnabledLocal returns a bool directly from the environment. Use before Unleash is init'd