Class KubernetesAccountProperties
- java.lang.Object
-
- com.netflix.spinnaker.clouddriver.kubernetes.config.KubernetesAccountProperties
-
public class KubernetesAccountProperties extends java.lang.ObjectPreviously, accounts were stored in theKubernetesConfigurationPropertiesclass. If there are loads of accounts defined in a configuration properties file, then letting Spring boot read and bind them is a fairly time-consuming process. For 1500 accounts, we observed that it took >10m to load them.To speed this up, a feature-flagged change was introduced (see: https://github.com/spinnaker/clouddriver/pull/5125) to let us do a manual binding of the properties directly, instead of letting spring boot do it. This results in the load times dropping to ~1-2s. But the main drawback of this manual binding is the fact that we have to explicitly define all the properties that we need to bind. For example, if accounts are defined in one configuration file and the other properties are defined in a different file, those other properties will not be loaded unless they are defined in the same configuration file. Also, for that to work, we have to explicitly bind these properties to the target class.
By moving accounts out of the
KubernetesConfigurationPropertiesclass, we don't need to do any manual binding for those other properties. And we do the manual binding for accounts only, which makes it more maintainable. Plus, this leaves us with aKubernetesConfigurationPropertiesclass which can cater to all the other configuration aspects related to Kubernetes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKubernetesAccountProperties.ManagedAccount
-
Constructor Summary
Constructors Constructor Description KubernetesAccountProperties()
-