cloudspannerecosystem / autoscaler

Automatically scale the capacity of your Spanner instances based on their utilization.
Apache License 2.0
86 stars 33 forks source link

feat!: Add validation of Autoscaler config against JSON schema #338

Closed nielm closed 1 month ago

nielm commented 2 months ago

Fully Deprecate minNodes, maxNodes from configuration

Validate the config against a JSON schema.

Add command line config validator for JSON and GKE configMaps

BREAKING CHANGE: previous configs may fail due to stricter configuration validation.

nielm commented 2 months ago

Potential fix for #318

alexlo03 commented 2 months ago

Hello, this looks good 1) can you please document what the behavior would be if the configuration is invalid? looks like "no-op plus error log" 2) maybe there should be a metric outcome in addition to the logs outcome

nielm commented 2 months ago

Hello, this looks good

  1. can you please document what the behavior would be if the configuration is invalid? looks like "no-op plus error log"
  2. maybe there should be a metric outcome in addition to the logs outcome

yes, the poller component will detect the invalid configuration and this will result in a no-op along with:

This will happen every $polling_interval until the config is fixed.