Deployment Profiles
Deployment profiles provide 2 features:
- "Defaults" provide preference values that are applied on first run (or after a factory reset).
- "Locked" settings allow an administrator to pin preference values.
They can be specified both by an "admin" or by the "user". If either the "defaults" or the "locked" settings exists in the "admin" context, then the "user" profile is ignored.
Preferences values at startup​
Rancher Desktop settings are determined as follows:
- Load "admin" deployment profile (both "defaults" and "locked")
- If neither of them exist then load "user" deployment profile (again both "defaults" and "locked")
- Load saved preferences from
settings.json
file - If there are no saved settings, use the "defaults" profile loaded earlier instead
- Copy values from command-line arguments used to launch the app into settings
- If the settings are still completely empty, show the first-run dialog
- Fill any missing values from the builtin application defaults
- Copy values from the "locked" profile over the current settings
The user cannot modify any settings (via GUI or CLI) that have been locked by the profile.
Rancher Desktop will refuse to load the application if a profile exists, but cannot be parsed correctly.
Deployment profiles will not be modified or removed by Rancher Desktop. They will not be affected by a factory reset or uninstall.
The structure of the profile data matches the application settings:
{
...
"containerEngine": {
"allowedImages": {
"enabled": false,
"patterns": []
},
"name": "containerd"
},
...
}
The platform-specific documentation below will show how to create a deployment profile that changes the default container engine to moby
, disables Kubernetes, and locks down the list of allowed images to just busybox
and nginx
.
Profile format and location​
Deployment profiles are stored in a platform-specific format and location.
- Windows
- macOS
- Linux
On Windows the deployment profiles are stored in the registry and can be distributed via group policy.
The locations for the profiles are:
HKEY_LOCAL_MACHINE\Software\Rancher Desktop\Profile\Defaults
HKEY_LOCAL_MACHINE\Software\Rancher Desktop\Profile\Locked
HKEY_CURRENT_USER\Software\Rancher Desktop\Profile\Defaults
HKEY_CURRENT_USER\Software\Rancher Desktop\Profile\Locked
The reg
tool can be used to create a profile manually. To create an "admin" profile it will have to be executed from an elevated shell.
Boolean values are stored in REG_DWORD
format, and lists in REG_MULTI_SZ
.
Delete existing profiles​
reg delete "HKCU\Software\Rancher Desktop\Profile" /f
By default use the "moby" container engine and disable Kubernetes​
reg add "HKCU\Software\Rancher Desktop\Profile\Defaults\containerEngine" /v name /t REG_SZ -d moby
reg add "HKCU\Software\Rancher Desktop\Profile\Defaults\kubernetes" /v enabled /t REG_DWORD -d 0