Manage organization feature flags
Add, update, or delete feature flags for an organization.
Read time 3 minutesLast updated 2 days ago
Feature flags toggle Self-Hosted Deployment capabilities such as a preview of UI functionality or a temporary workaround for a customer-specific issue. They're scoped to one organization at a time: a flag set in organization A has no effect on organization B.
The upc-cli tool exposes the four operations needed to administer feature flags end-to-end:
Operation | Description |
|---|---|
| Shows all feature flags currently set for an organization. |
| Creates a new feature flag and sets its value. |
| Changes the value of an existing feature flag. |
| Removes a feature flag entirely (reverts to the platform default). |
Before you start
To work with feature flags, you need:- The ID of the target organization (a UUID-formatted string, like ). Find it with the
00000000-0000-0000-0000-000000000000command or in the organization properties in the Dashboard (go to Administration > Settings).orgs list - No explicit authentication is required - the tool runs in-cluster and calls relevant APIs directly. Anyone who can execute in the solution namespace can change feature flags; treat
kubectl runaccess as the only access boundary.kubectl - The commands on this page work in a Unix-based shell (Linux, MacOS, WSL on Windows, Git Bash on Windows). If you need to run them in a Windows shell:
- Use PowerShell 7.3 or newer, not Windows PowerShell 5.x.
- Replace line continuation characters () with backticks (
\).`
Use cases
These examples cover:- Listing current feature flags.
- Enabling and disabling a feature flag.
- Changing the value of an existing feature flag.
- Removing a feature flag.
- Previewing a flag change without applying it.
List the current feature flags
This command lists all feature flags set for an organization. Replace the<organizationId>The response is a JSON array of feature flag objects. Each entry includes:kubectl run -it upc-cli --rm \ --image=uccmpprivatecloud.azurecr.io/docker/upc-cli:latest \ -n asset-solutions \ --restart=Never \ --overrides='{"spec":{"imagePullSecrets":[{"name":"acr-unity-registry"}]}}' \ -- \ --fqdn http://mini-usf:8080 \ --path-prefix="" \ --no-auth \ flags list --organization-id <organizationId>
- The feature name.
- The flag's boolean value.
- The flag's internal ID for the particular organization.
- When the flag was created and last updated.
Enable or disable a feature flag
To turn on a flag for the first time run the following command:- Replace the string with the ID of the target organization.
<organizationId> - Replace the string with the feature flag name.
<flag-name> - Accepted literals for (case-insensitive):
--value-
For enabling a flag: ,
true,yes, andon1 -
For disabling a flag: ,
false,no, andoffAny other input is rejected before an HTTP call is made.0
-
For enabling a flag:
kubectl run -it upc-cli --rm \ --image=uccmpprivatecloud.azurecr.io/docker/upc-cli:latest \ -n asset-solutions \ --restart=Never \ --overrides='{"spec":{"imagePullSecrets":[{"name":"acr-unity-registry"}]}}' \ -- \ --fqdn http://mini-usf:8080 \ --path-prefix="" \ --no-auth \ flags add --organization-id <organizationId> --name <flag-name> --value true
Change a flag's value
To change the value of a feature flag that's already set for an organization, (in this example, tofalseThe distinction betweenkubectl run -it upc-cli --rm \ --image=uccmpprivatecloud.azurecr.io/docker/upc-cli:latest \ -n asset-solutions \ --restart=Never \ --overrides='{"spec":{"imagePullSecrets":[{"name":"acr-unity-registry"}]}}' \ -- \ --fqdn http://mini-usf:8080 \ --path-prefix="" \ --no-auth \ flags update --organization-id <organizationId> --name <flag-name> --value false
addupdate- fails (HTTP 409) if a flag with the same name already exists for the organization. Use it for first-time enablement.
add - looks up the existing flag by name and changes its value. It fails if the flag is not yet set for the organization.
update
flags listRemove a feature flag
Removing a flag reverts the organization to the platform's default behavior for that feature. This is different from setting the flag tofalse- Replace the string with the ID of the target organization.
<organizationId> - Replace the string with the feature flag name.
<flag-name>
kubectl run -it upc-cli --rm \ --image=uccmpprivatecloud.azurecr.io/docker/upc-cli:latest \ -n asset-solutions \ --restart=Never \ --overrides='{"spec":{"imagePullSecrets":[{"name":"acr-unity-registry"}]}}' \ -- \ --fqdn http://mini-usf:8080 \ --path-prefix="" \ --no-auth \ flags delete --organization-id <organizationId> --name <flag-name>
Preview a change without applying it
To run a preview, add the--dry-runflagskubectl run -it upc-cli --rm \ --image=uccmpprivatecloud.azurecr.io/docker/upc-cli:latest \ -n asset-solutions \ --restart=Never \ --overrides='{"spec":{"imagePullSecrets":[{"name":"acr-unity-registry"}]}}' \ -- \ --fqdn http://mini-usf:8080 \ --path-prefix="" \ --no-auth \ --dry-run \ flags add --organization-id <organizationId> --name <flag-name> --value true