func (r *SingleSignOnConfig) Default() {
	singlesignonconfiglog.Info("default", "name", r.Name)
	if r.Spec.IDTokenExpirySeconds == nil {
		r.Spec.IDTokenExpirySeconds = &SSODefaultIDTokenExpirySeconds
	}
}
Default implements webhook.Defaulter so a webhook will be registered for the type
package v1alpha1
import (
	"encoding/json"
	"fmt"
	"strconv"
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/apimachinery/pkg/util/validation/field"
	ctrl "sigs.k8s.io/controller-runtime"
	logf "sigs.k8s.io/controller-runtime/pkg/log"
	"sigs.k8s.io/controller-runtime/pkg/webhook"
)
var singlesignonconfiglog = logf.Log.WithName("singlesignonconfig-resource")
var SSODefaultIDTokenExpirySeconds = uint32(300)
func (r *SingleSignOnConfig) SetupWebhookWithManager(mgr ctrl.Manager) error {
	return ctrl.NewWebhookManagedBy(mgr).
		For(r).
		Complete()
}
const (
	SSOConnectorTypeGithub = "github"
	SSOConnectorTypeGitlab = "gitlab"
)
type SSOGithubConnector struct {
	ID     string `json:"id"`
	Type   string `json:"type"`
	Name   string `json:"name"`
	Config struct {
		ClientID     string `json:"clientID"`
		ClientSecret string `json:"clientSecret"`
		Orgs         []struct {
			Name  string   `json:"name"`
			Teams []string `json:"teams"`
		} `json:"orgs"`
	} `json:"config"`
}
type SSOGitlabConnector struct {
	ID     string `json:"id"`
	Type   string `json:"type"`
	Name   string `json:"name"`
	Config struct {
		BaseURL      string   `json:"baseURL"`
		ClientID     string   `json:"clientID"`
		ClientSecret string   `json:"clientSecret"`
		Groups       []string `json:"groups"`
	} `json:"config"`
}
var _ webhook.Defaulter = &SingleSignOnConfig{}