func (r *OAPServer) Default() {
	oapserverlog.Info("default", "name", r.Name)
	image := r.Spec.Image
	if image == "" {
		r.Spec.Image = fmt.Sprintf("apache/skywalking-oap-server:%s", r.Spec.Version)
	}
	for _, envVar := range r.Spec.Config {
		if envVar.Name == "SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS" &&
			r.ObjectMeta.Annotations[annotationKeyIstioSetup] == "" {
			r.Annotations[annotationKeyIstioSetup] = fmt.Sprintf("istioctl install --set profile=demo "+
				"--set meshConfig.defaultConfig.envoyAccessLogService.address=%s.%s:11800 "+
				"--set meshConfig.enableEnvoyAccessLogService=true", r.Name, r.Namespace)
		}
	}
}
Default implements webhook.Defaulter so a webhook will be registered for the type
package v1alpha1
import (
	"fmt"
	"k8s.io/apimachinery/pkg/runtime"
	ctrl "sigs.k8s.io/controller-runtime"
	logf "sigs.k8s.io/controller-runtime/pkg/log"
	"sigs.k8s.io/controller-runtime/pkg/webhook"
)
const annotationKeyIstioSetup = "istio-setup-command"
var oapserverlog = logf.Log.WithName("oapserver-resource")
func (r *OAPServer) SetupWebhookWithManager(mgr ctrl.Manager) error {
	return ctrl.NewWebhookManagedBy(mgr).
		For(r).
		Complete()
}
var _ webhook.Defaulter = &OAPServer{}