diff --git a/docker-compose.yml b/docker-compose.yml index a2dc5fb456..760a27d0cf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,7 @@ services: - REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN} - PMM_LESS_LOG_NOISE=1 - PMM_RELEASE_PATH=/root/go/bin - - PMM_ENABLE_RBAC=${PMM_ENABLE_RBAC:-0} + - PMM_ENABLE_ACCESS_CONTROL=${PMM_ENABLE_ACCESS_CONTROL:-0} - PMM_DEV_VERSION_SERVICE_URL=${PMM_DEV_VERSION_SERVICE_URL} # - PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check.localhost # - PMM_DEV_PERCONA_PLATFORM_INSECURE=1 diff --git a/docs/process/v2_to_v3_environment_variables.md b/docs/process/v2_to_v3_environment_variables.md index 2d982527d3..4375de9c21 100644 --- a/docs/process/v2_to_v3_environment_variables.md +++ b/docs/process/v2_to_v3_environment_variables.md @@ -4,7 +4,6 @@ Below is a list of affected variables and their new names. | PMM 2 | PMM 3 | Comments | |-----------------------------------------------|--------------------------------------------|--------------------------------------------------------------| -| `CONTAINER` | `PMM_CONTAINER` | | | `DATA_RETENTION` | `PMM_DATA_RETENTION` | | | `DISABLE_ALERTING` | `PMM_DISABLE_ALERTING` | | | `DISABLE_UPDATES` | `PMM_DISABLE_UPDATES` | | @@ -12,8 +11,7 @@ Below is a list of affected variables and their new names. | `PERCONA_PLATFORM_API_TIMEOUT` | `PMM_PERCONA_PLATFORM_API_TIMEOUT` | | | `DISABLE_BACKUP_MANAGEMENT` | `PMM_DISABLE_BACKUP_MANAGEMENT` | | | `ENABLE_AZUREDISCOVER` | `PMM_ENABLE_AZURE_DISCOVER` | | -| `ENABLE_RBAC` | `PMM_ENABLE_RBAC` | | -| `ENABLE_RBAC` | `PMM_ENABLE_RBAC` | | +| `ENABLE_RBAC` | `PMM_ENABLE_ACCESS_CONTROL` | | | `LESS_LOG_NOISE` | `PMM_LESS_LOG_NOISE` | | | `METRICS_RESOLUTION` | `PMM_METRICS_RESOLUTION` | | | `METRICS_RESOLUTION_HR` | `PMM_METRICS_RESOLUTION_HR` | | @@ -31,7 +29,7 @@ Below is a list of affected variables and their new names. | `PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE` | `PMM_CLICKHOUSE_BLOCK_SIZE` | | | `PERCONA_TEST_PMM_CLICKHOUSE_DATABASE` | `PMM_CLICKHOUSE_DATABASE` | | | `PERCONA_TEST_PMM_CLICKHOUSE_DATASOURCE` | `PMM_CLICKHOUSE_DATASOURCE` | | -| `PERCONA_TEST_PMM_CLICKHOUSE_HOST` | `PMM_CLICKHOUSE_HOST` | | +| `PERCONA_TEST_PMM_CLICKHOUSE_HOST` | `PERCONA_DEV_PMM_CLICKHOUSE_HOST` | | | `PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE` | `PMM_CLICKHOUSE_POOL_SIZE` | | | `PERCONA_TEST_PMM_CLICKHOUSE_PORT` | `PMM_CLICKHOUSE_PORT` | | | `PERCONA_TEST_PMM_DISABLE_BUILTIN_CLICKHOUSE` | `PMM_DISABLE_BUILTIN_CLICKHOUSE` | | diff --git a/managed/CONTRIBUTING.md b/managed/CONTRIBUTING.md index c2a1db69ed..bebeceb0a3 100644 --- a/managed/CONTRIBUTING.md +++ b/managed/CONTRIBUTING.md @@ -53,25 +53,21 @@ go test -timeout=30s -p 1 ./... ## Available test environment variables: -| Variable | Description | Default | -|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------|------------------------------------------| -| PMM_CLICKHOUSE_ADDR | Sets Clickhouse address | 127.0.0.1:9000 | -| PMM_CLICKHOUSE_DATABASE | Sets Clickhouse database | pmm | -| PMM_CLICKHOUSE_POOL_SIZE | Sets Clickhouse connections pool size | none | -| PMM_CLICKHOUSE_BLOCK_SIZE | Sets Clickhouse block size | none | -| PMM_ADVISORS_STARLARK_ALLOW_RECURSION | Allows recursive functions in checks scripts | false | -| PMM_NICER_API | Enables nicer API with default/zero values in response. | false | -| PMM_DEV_VERSION_SERVICE_URL | Sets versions service URL | https://check.percona.com/versions/v1 | -| PMM_DEV_ADVISOR_CHECKS_FILE | Specifies path to local checks file and disables downlading checks files from Percona Platform | none | -| PMM_ADVISORS_CHECKS_DISABLE_START_DELAY | Disables checks service startup delay | false | -| PMM_DEV_TELEMETRY_INTERVAL | Sets telemetry reporting interval | 24h | -| PMM_DEV_TELEMETRY_DISABLE_SEND | Disables sending of telemetry data to SaaS. This param doesn't affect telemetry data gathering from the datasources | false | -| PMM_DEV_TELEMETRY_FILE | Sets path for telemetry config file | | -| PMM_DEV_TELEMETRY_DISABLE_START_DELAY | Disable the default telemetry execution start delay, so that telemetry gathering is run immediately upon system | false | -| PMM_DEV_TELEMETRY_RETRY_BACKOFF | Sets telemetry reporting retry backoff time | 1h | -| PMM_DEV_PERCONA_PLATFORM_ADDRESS | Sets Percona Platform address | https://check.percona.com | -| PMM_DEV_PERCONA_PLATFORM_INSECURE | Allows insecure TLS connections to Percona Platform | false | -| PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY | Sets Percona Platform public key (Minisign) | set of keys embedded into managed binary | +| Variable | Description | Default | +|------------------------------------------|---------------------------------------------------------------------------------------------------------------------|------------------------------------------| +| PMM_DEV_ADVISOR_STARLARK_ALLOW_RECURSION | Allows recursive functions in checks scripts | false | +| PMM_NICER_API | Enables nicer API with default/zero values in response. | false | +| PMM_DEV_VERSION_SERVICE_URL | Sets versions service URL | https://check.percona.com/versions/v1 | +| PMM_DEV_ADVISOR_CHECKS_FILE | Specifies path to local checks file and disables downlading checks files from Percona Platform | none | +| PMM_ADVISORS_CHECKS_DISABLE_START_DELAY | Disables checks service startup delay | false | +| PMM_DEV_TELEMETRY_INTERVAL | Sets telemetry reporting interval | 24h | +| PMM_DEV_TELEMETRY_DISABLE_SEND | Disables sending of telemetry data to SaaS. This param doesn't affect telemetry data gathering from the datasources | false | +| PMM_DEV_TELEMETRY_FILE | Sets path for telemetry config file | | +| PMM_DEV_TELEMETRY_DISABLE_START_DELAY | Disable the default telemetry execution start delay, so that telemetry gathering is run immediately upon system | false | +| PMM_DEV_TELEMETRY_RETRY_BACKOFF | Sets telemetry reporting retry backoff time | 1h | +| PMM_DEV_PERCONA_PLATFORM_ADDRESS | Sets Percona Platform address | https://check.percona.com | +| PMM_DEV_PERCONA_PLATFORM_INSECURE | Allows insecure TLS connections to Percona Platform | false | +| PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY | Sets Percona Platform public key (Minisign) | set of keys embedded into managed binary | ## Add instances for monitoring diff --git a/managed/utils/envvars/parser.go b/managed/utils/envvars/parser.go index 6b7f73ae2c..8bee846e41 100644 --- a/managed/utils/envvars/parser.go +++ b/managed/utils/envvars/parser.go @@ -36,7 +36,7 @@ const ( envPlatformInsecure = "PMM_DEV_PERCONA_PLATFORM_INSECURE" envPlatformPublicKey = "PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY" evnInterfaceToBind = "PMM_INTERFACE_TO_BIND" - envEnableAccessControl = "PMM_ENABLE_RBAC" + envEnableAccessControl = "PMM_ENABLE_ACCESS_CONTROL" envPlatformAPITimeout = "PMM_PERCONA_PLATFORM_API_TIMEOUT" defaultPlatformAPITimeout = 30 * time.Second // ENVvmAgentPrefix is the prefix for environment variables related to the VM agent. @@ -62,7 +62,7 @@ func (e InvalidDurationError) Error() string { return string(e) } // - PMM_METRICS_RESOLUTION, PMM_METRICS_RESOLUTION_MR, PMM_METRICS_RESOLUTION_HR, PMM_METRICS_RESOLUTION_LR are durations of metrics resolution; // - PMM_DATA_RETENTION is the duration of how long keep time-series data in ClickHouse; // - PMM_ENABLE_AZURE_DISCOVER enables Azure Discover; -// - PMM_ENABLE_RBAC enables Access control; +// - PMM_ENABLE_ACCESS_CONTROL enables Access control; // - the environment variables prefixed with GF_ passed as related to Grafana. // - the environment variables relating to proxies // - the environment variable set by podman @@ -217,14 +217,13 @@ func ParseEnvVars(envs []string) (*models.ChangeSettingsParams, []error, []strin if strings.HasPrefix(k, "PERCONA_") { warns = append(warns, "PERCONA_* env variables IS NOT SUPPORTED, please use PMM_* env variables, for details please check our documentation") + continue } if !strings.HasPrefix(k, "PMM_TEST_PERCONA") { warns = append(warns, fmt.Sprintf("unknown environment variable %q", env)) continue } - - warns = append(warns, fmt.Sprintf("environment variable %q IS NOT SUPPORTED and WILL BE REMOVED IN THE FUTURE", k)) } if err != nil {