diff --git a/utils/envvars/parser.go b/utils/envvars/parser.go index 9e774022c8..425f3ea30f 100644 --- a/utils/envvars/parser.go +++ b/utils/envvars/parser.go @@ -91,6 +91,9 @@ func ParseEnvVars(envs []string) (envSettings *models.ChangeSettingsParams, errs case "PERCONA_TEST_PMM_CLICKHOUSE_DATABASE", "PERCONA_TEST_PMM_CLICKHOUSE_ADDR", "PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE", "PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE": // skip env variables for external clickhouse continue + case "PMM_ADMIN_PASSWORD": + // skip admin password change, so far handled by entrypoint.sh + continue case "DISABLE_UPDATES": envSettings.DisableUpdates, err = strconv.ParseBool(v) if err != nil { diff --git a/utils/envvars/parser_test.go b/utils/envvars/parser_test.go index a1890edb7b..a72820163b 100644 --- a/utils/envvars/parser_test.go +++ b/utils/envvars/parser_test.go @@ -92,6 +92,21 @@ func TestEnvVarValidator(t *testing.T) { assert.Nil(t, gotWarns) }) + t.Run("PMM internal env vars", func(t *testing.T) { + t.Parallel() + + envs := []string{ + "PMM_DEBUG=0", + "PMM_ADMIN_PASSWORD=admin", + } + expectedEnvVars := &models.ChangeSettingsParams{} + + gotEnvVars, gotErrs, gotWarns := ParseEnvVars(envs) + assert.Equal(t, gotEnvVars, expectedEnvVars) + assert.Nil(t, gotErrs) + assert.Nil(t, gotWarns) + }) + t.Run("Invalid env variables values", func(t *testing.T) { t.Parallel()