func NewObservable(labels map[string]string) reconciler.Observable {
	return reconciler.Observable{
		Type: Type,
		Obj: Observable{
			Labels: labels,
		},
	}
}
NewObservable returns an observable object
package gcs
import (
	"context"
	"golang.org/x/oauth2/google"
	"google.golang.org/api/storage/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"reflect"
	"sigs.k8s.io/controller-reconciler/pkg/reconciler"
	"sigs.k8s.io/controller-reconciler/pkg/reconciler/manager"
	"sigs.k8s.io/controller-reconciler/pkg/reconciler/manager/gcp"
	"strings"
)
const (
	Type      = "gcs"
	UserAgent = "kcc/controller-manager"
)
type RsrcManager struct {
	name    string
	service *storage.Service
}
func Getter(ctx context.Context) func() (string, manager.Manager, error) {
	return func() (string, manager.Manager, error) {
		rm := &RsrcManager{}
		service, err := NewService(ctx)
		if err != nil {
			return "", nil, err
		}
		rm.WithService(service).WithName(Type + "Mgr")
		return Type, rm, nil
	}
}
func NewRsrcManager(ctx context.Context, name string) (*RsrcManager, error) {
	rm := &RsrcManager{}
	service, err := NewService(ctx)
	if err != nil {
		return nil, err
	}
	rm.WithService(service).WithName(name)
	return rm, nil
}
func (rm *RsrcManager) WithName(v string) *RsrcManager {
	rm.name = v
	return rm
}
func (rm *RsrcManager) WithService(s *storage.Service) *RsrcManager {
	rm.service = s
	return rm
}
type Object struct {
	Bucket    *storage.Bucket
	ProjectID string
}
func (o *Object) SetLabels(labels map[string]string) {
	o.Bucket.Labels = gcp.CompliantLabelMap(labels)
}
func (o *Object) SetOwnerReferences(refs *metav1.OwnerReference) bool { return false }
func (o *Object) IsSameAs(a interface{}) bool {
	same := false
	e := a.(*Object)
	if e.Bucket.Name == o.Bucket.Name {
		same = true
	}
	return same
}
func (o *Object) GetName() string {
	return "gcs-bucket/" + o.ProjectID + "/" + o.Bucket.Location + "/" + o.Bucket.Name
}
type Observable struct {
	Labels map[string]string
	Obj *storage.Bucket
	ProjectID string
}
func (o *Object) AsReconcilerObject() *reconciler.Object {
	return &reconciler.Object{
		Obj:       o,
		Lifecycle: reconciler.LifecycleManaged,
		Type:      Type,
	}
}