func (r *PostgreSql) Default() {
	postgresqllog.Info("createdResource", "namespace", r.Namespace, "name", r.Name)

	if r.Spec.Project.Region == "" {
		r.Spec.Project.Region = "europe-west1"
	}
	if r.Spec.Project.Zone == "" {
		r.Spec.Project.Zone = "europe-west1-b"
	}

	SetDefaultBucketSpec(&r.Spec.BucketConfig, r.Spec.RemoteState.BucketName, r.Spec.Project.Name)

	for k := range r.Spec.SqlInstance.Settings {
		a := &r.Spec.SqlInstance.Settings[k]
		SetIpConfigurationDefaultSpec(&a.IpConfiguration)
		SetDatabaseInstanceSettingsSpec(a)
		SetLocationPreferenceDefaultSpec(&a.LocationPreference)
	}

	for k := range r.Spec.Users {
		x := &r.Spec.Users[k]
		SetDatabaseUserDefaultSpec(x, r.Name, r.Spec.Project.Name)
	}
	for k := range r.Spec.Databases {
		x := &r.Spec.Databases[k]
		SetDatabaseDefaultSpec(x, r.Name, r.Spec.Project.Name)
	}

	SetDefaultSqlInstanceSpec(&r.Spec.SqlInstance, r.Name, r.Spec.Project.Name)
}
// Default implements webhook.Defaulter so a webhook will be registered for the type
Default implements webhook.Defaulter so a webhook will be registered for the type
// Default implements webhook . Defaulter so a webhook will be registered for the type
func (r *PostgreSql) Default() {
	postgresqllog.Info("createdResource", "namespace", r.Namespace, "name", r.Name)
	if r.Spec.Project.Region == "" {
		r.Spec.Project.Region = "europe-west1"
	}
	if r.Spec.Project.Zone == "" {
		r.Spec.Project.Zone = "europe-west1-b"
	}
	SetDefaultBucketSpec(&r.Spec.BucketConfig, r.Spec.RemoteState.BucketName, r.Spec.Project.Name)
	for k := range r.Spec.SqlInstance.Settings {
		a := &r.Spec.SqlInstance.Settings[k]
		SetIpConfigurationDefaultSpec(&a.IpConfiguration)
		SetDatabaseInstanceSettingsSpec(a)
		SetLocationPreferenceDefaultSpec(&a.LocationPreference)
	}
	for k := range r.Spec.Users {
		x := &r.Spec.Users[k]
		SetDatabaseUserDefaultSpec(x, r.Name, r.Spec.Project.Name)
	}
	for k := range r.Spec.Databases {
		x := &r.Spec.Databases[k]
		SetDatabaseDefaultSpec(x, r.Name, r.Spec.Project.Name)
	}
	SetDefaultSqlInstanceSpec(&r.Spec.SqlInstance, r.Name, r.Spec.Project.Name)
}
func ( r * PostgreSql ) Default ( ) { postgresqllog . Info ( " " , " " , r . Namespace , " " , r . Name ) if r . Spec . Project . Region == " " { r . Spec . Project . Region = " " } if r . Spec . Project . Zone == " " { r . Spec . Project . Zone = " " } SetDefaultBucketSpec ( & r . Spec . BucketConfig , r . Spec . RemoteState . BucketName , r . Spec . Project . Name ) for k := range r . Spec . SqlInstance . Settings { a := & r . Spec . SqlInstance . Settings [ k ] SetIpConfigurationDefaultSpec ( & a . IpConfiguration ) SetDatabaseInstanceSettingsSpec ( a ) SetLocationPreferenceDefaultSpec ( & a . LocationPreference ) } for k := range r . Spec . Users { x := & r . Spec . Users [ k ] SetDatabaseUserDefaultSpec ( x , r . Name , r . Spec . Project . Name ) } for k := range r . Spec . Databases { x := & r . Spec . Databases [ k ] SetDatabaseDefaultSpec ( x , r . Name , r . Spec . Project . Name ) } SetDefaultSqlInstanceSpec ( & r . Spec . SqlInstance , r . Name , r . Spec . Project . Name ) }
Default implements webhook.Defaulter so a webhook will be registered for the type
Default implements webhook . Defaulter so a webhook will be registered for the type