// Complete initializes the options instance and validates flags
Complete initializes the options instance and validates flags
// Complete initializes the options instance and validates flags
func (o *options) Complete() error {
	log, err := logger.New(nil)
	if err != nil {
		return err
	}
	o.log = log.WithName("setup")
	logger.SetLogger(log)
	err = o.validate() 
	if err != nil {
		return err
	}
	allErrs := field.ErrorList{}
	o.webhook.webhookServicePort = o.webhookServicePort
	o.webhook.enabledWebhooks = filterWebhookedResources(defaultWebhookedResources(), stringListToMap(o.disabledWebhooks))
	if len(o.webhook.enabledWebhooks) != 0 && len(o.webhookServiceNamespaceName) != 0 {
		webhookService := strings.Split(o.webhookServiceNamespaceName, "/")
		o.webhook.webhookServiceNamespace = webhookService[0]
		o.webhook.webhookServiceName = webhookService[1]
	}
	o.webhook.certificatesNamespace = getCertificateNamespace(o)
	return allErrs.ToAggregate()
}
func ( o * options ) Complete ( ) error { log , err := logger . New ( nil ) if err != nil { return err } o . log = log . WithName ( " " ) logger . SetLogger ( log ) err = o . validate ( ) if err != nil { return err } allErrs := field . ErrorList { } o . webhook . webhookServicePort = o . webhookServicePort o . webhook . enabledWebhooks = filterWebhookedResources ( defaultWebhookedResources ( ) , stringListToMap ( o . disabledWebhooks ) ) if len ( o . webhook . enabledWebhooks ) != 0 && len ( o . webhookServiceNamespaceName ) != 0 { webhookService := strings . Split ( o . webhookServiceNamespaceName , " " ) o . webhook . webhookServiceNamespace = webhookService [ 0 ] o . webhook . webhookServiceName = webhookService [ 1 ] } o . webhook . certificatesNamespace = getCertificateNamespace ( o ) return allErrs . ToAggregate ( ) }
Complete initializes the options instance and validates flags
Complete initializes the options instance and validates flags
// validate options