apis/cluster/cluster.go
func (c *Cluster) SetProviderConfig(config *ControlPlaneProviderConfig) error {
	bytes, err := json.Marshal(config)
	if err != nil {
		logger.Critical("Unable to marshal provider config: %v", err)
		return err
	}
	str := string(bytes)
	c.ClusterAPI.Spec.ProviderConfig = str
	return nil
}
func (c *Cluster) SetProviderConfig(config *ControlPlaneProviderConfig) error {
	bytes, err := json.Marshal(config)
	if err != nil {
		logger.Critical("Unable to marshal provider config: %v", err)
		return err
	}
	str := string(bytes)
	c.ClusterAPI.Spec.ProviderConfig = str
	return nil
}
// SetProviderConfig is a convenience method that will attempt
// to set a provider config on a particular cluster. Just like
// it's counterpart ProviderConfig this makes working with the legacy API much easier.