for kubernetes 0.23.0
This commit is contained in:
parent
1628f83514
commit
cb629f34a9
7
Makefile
7
Makefile
|
@ -13,8 +13,9 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
|
||||||
|
|
||||||
# Image URL to use all building/pushing image targets
|
# Image URL to use all building/pushing image targets
|
||||||
IMG ?= gfxlabs/seaweedfs-operator:$(VERSION)
|
IMG ?= gfxlabs/seaweedfs-operator:$(VERSION)
|
||||||
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
|
# by default only support v1.22+
|
||||||
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"
|
CRD_OPTIONS ?= "crd"
|
||||||
|
#CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"
|
||||||
|
|
||||||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
|
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
|
||||||
ifeq (,$(shell go env GOBIN))
|
ifeq (,$(shell go env GOBIN))
|
||||||
|
@ -95,7 +96,7 @@ ifeq (, $(shell which controller-gen))
|
||||||
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
|
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
|
||||||
cd $$CONTROLLER_GEN_TMP_DIR ;\
|
cd $$CONTROLLER_GEN_TMP_DIR ;\
|
||||||
go mod init tmp ;\
|
go mod init tmp ;\
|
||||||
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0 ;\
|
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 ;\
|
||||||
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
|
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
|
||||||
}
|
}
|
||||||
CONTROLLER_GEN=$(GOBIN)/controller-gen
|
CONTROLLER_GEN=$(GOBIN)/controller-gen
|
||||||
|
|
|
@ -39,7 +39,7 @@ func (r *Seaweed) SetupWebhookWithManager(mgr ctrl.Manager) error {
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
||||||
|
|
||||||
// +kubebuilder:webhook:path=/mutate-seaweed-seaweedfs-com-v1-seaweed,mutating=true,failurePolicy=fail,groups=seaweed.seaweedfs.com,resources=seaweeds,verbs=create;update,versions=v1,name=mseaweed.kb.io
|
// +kubebuilder:webhook:path=/mutate-seaweed-seaweedfs-com-v1-seaweed,mutating=true,failurePolicy=fail,groups=seaweed.seaweedfs.com,resources=seaweedfs,verbs=create;update,versions=v1,admissionReviewVersions=v1,sideEffects=none,name=mseaweed.kb.io
|
||||||
|
|
||||||
var _ webhook.Defaulter = &Seaweed{}
|
var _ webhook.Defaulter = &Seaweed{}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ func (r *Seaweed) Default() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
|
// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
|
||||||
// +kubebuilder:webhook:verbs=create;update,path=/validate-seaweed-seaweedfs-com-v1-seaweed,mutating=false,failurePolicy=fail,groups=seaweed.seaweedfs.com,resources=seaweeds,versions=v1,name=vseaweed.kb.io
|
// +kubebuilder:webhook:verbs=create;update,path=/validate-seaweed-seaweedfs-com-v1-seaweed,mutating=false,failurePolicy=fail,groups=seaweed.seaweedfs.com,resources=seaweeds,versions=v1,admissionReviewVersions=v1,sideEffects=none,name=vseaweed.kb.io
|
||||||
|
|
||||||
var _ webhook.Validator = &Seaweed{}
|
var _ webhook.Validator = &Seaweed{}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
# The following patch adds a directive for certmanager to inject CA into the CRD
|
# The following patch adds a directive for certmanager to inject CA into the CRD
|
||||||
# CRD conversion requires k8s 1.13 or later.
|
# CRD conversion requires k8s 1.13 or later.
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
# The following patch enables conversion webhook for CRD
|
# The following patch enables conversion webhook for CRD
|
||||||
# CRD conversion requires k8s 1.13 or later.
|
# CRD conversion requires k8s 1.13 or later.
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: seaweeds.seaweed.seaweedfs.com
|
name: seaweeds.seaweed.seaweedfs.com
|
||||||
spec:
|
spec:
|
||||||
conversion:
|
conversion:
|
||||||
strategy: Webhook
|
strategy: Webhook
|
||||||
webhookClientConfig:
|
webhook:
|
||||||
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
|
conversionReviewVersions: ["v1"]
|
||||||
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
|
clientConfig:
|
||||||
caBundle: Cg==
|
caBundle: Cg==
|
||||||
service:
|
service:
|
||||||
namespace: system
|
namespace: system
|
||||||
name: webhook-service
|
name: webhook-service
|
||||||
path: /convert
|
path: /convert
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# This patch add annotation to admission webhook config and
|
# This patch add annotation to admission webhook config and
|
||||||
# the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize.
|
# the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize.
|
||||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
kind: MutatingWebhookConfiguration
|
kind: MutatingWebhookConfiguration
|
||||||
metadata:
|
metadata:
|
||||||
name: mutating-webhook-configuration
|
name: mutating-webhook-configuration
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
|
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
|
||||||
---
|
---
|
||||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
kind: ValidatingWebhookConfiguration
|
kind: ValidatingWebhookConfiguration
|
||||||
metadata:
|
metadata:
|
||||||
name: validating-webhook-configuration
|
name: validating-webhook-configuration
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
name: metrics-reader
|
name: metrics-reader
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
kind: MutatingWebhookConfiguration
|
kind: MutatingWebhookConfiguration
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: mutating-webhook-configuration
|
name: mutating-webhook-configuration
|
||||||
webhooks:
|
webhooks:
|
||||||
- clientConfig:
|
- admissionReviewVersions:
|
||||||
caBundle: Cg==
|
- v1
|
||||||
|
clientConfig:
|
||||||
service:
|
service:
|
||||||
name: webhook-service
|
name: webhook-service
|
||||||
namespace: system
|
namespace: system
|
||||||
|
@ -23,18 +23,18 @@ webhooks:
|
||||||
- CREATE
|
- CREATE
|
||||||
- UPDATE
|
- UPDATE
|
||||||
resources:
|
resources:
|
||||||
- seaweeds
|
- seaweedfs
|
||||||
timeoutSeconds: 15
|
sideEffects: None
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
kind: ValidatingWebhookConfiguration
|
kind: ValidatingWebhookConfiguration
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: validating-webhook-configuration
|
name: validating-webhook-configuration
|
||||||
webhooks:
|
webhooks:
|
||||||
- clientConfig:
|
- admissionReviewVersions:
|
||||||
caBundle: Cg==
|
- v1
|
||||||
|
clientConfig:
|
||||||
service:
|
service:
|
||||||
name: webhook-service
|
name: webhook-service
|
||||||
namespace: system
|
namespace: system
|
||||||
|
@ -51,4 +51,4 @@ webhooks:
|
||||||
- UPDATE
|
- UPDATE
|
||||||
resources:
|
resources:
|
||||||
- seaweeds
|
- seaweeds
|
||||||
timeoutSeconds: 15
|
sideEffects: None
|
||||||
|
|
|
@ -74,7 +74,7 @@ func (r *SeaweedReconciler) createFilerStatefulSet(m *seaweedv1.Seaweed) *appsv1
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ReadinessProbe: &corev1.Probe{
|
ReadinessProbe: &corev1.Probe{
|
||||||
Handler: corev1.Handler{
|
ProbeHandler: corev1.ProbeHandler{
|
||||||
HTTPGet: &corev1.HTTPGetAction{
|
HTTPGet: &corev1.HTTPGetAction{
|
||||||
Path: "/",
|
Path: "/",
|
||||||
Port: intstr.FromInt(seaweedv1.FilerHTTPPort),
|
Port: intstr.FromInt(seaweedv1.FilerHTTPPort),
|
||||||
|
@ -88,7 +88,7 @@ func (r *SeaweedReconciler) createFilerStatefulSet(m *seaweedv1.Seaweed) *appsv1
|
||||||
FailureThreshold: 100,
|
FailureThreshold: 100,
|
||||||
},
|
},
|
||||||
LivenessProbe: &corev1.Probe{
|
LivenessProbe: &corev1.Probe{
|
||||||
Handler: corev1.Handler{
|
ProbeHandler: corev1.ProbeHandler{
|
||||||
HTTPGet: &corev1.HTTPGetAction{
|
HTTPGet: &corev1.HTTPGetAction{
|
||||||
Path: "/",
|
Path: "/",
|
||||||
Port: intstr.FromInt(seaweedv1.FilerHTTPPort),
|
Port: intstr.FromInt(seaweedv1.FilerHTTPPort),
|
||||||
|
|
|
@ -88,7 +88,7 @@ func (r *SeaweedReconciler) createMasterStatefulSet(m *seaweedv1.Seaweed) *appsv
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ReadinessProbe: &corev1.Probe{
|
ReadinessProbe: &corev1.Probe{
|
||||||
Handler: corev1.Handler{
|
ProbeHandler: corev1.ProbeHandler{
|
||||||
HTTPGet: &corev1.HTTPGetAction{
|
HTTPGet: &corev1.HTTPGetAction{
|
||||||
Path: "/cluster/status",
|
Path: "/cluster/status",
|
||||||
Port: intstr.FromInt(seaweedv1.MasterHTTPPort),
|
Port: intstr.FromInt(seaweedv1.MasterHTTPPort),
|
||||||
|
@ -102,7 +102,7 @@ func (r *SeaweedReconciler) createMasterStatefulSet(m *seaweedv1.Seaweed) *appsv
|
||||||
FailureThreshold: 100,
|
FailureThreshold: 100,
|
||||||
},
|
},
|
||||||
LivenessProbe: &corev1.Probe{
|
LivenessProbe: &corev1.Probe{
|
||||||
Handler: corev1.Handler{
|
ProbeHandler: corev1.ProbeHandler{
|
||||||
HTTPGet: &corev1.HTTPGetAction{
|
HTTPGet: &corev1.HTTPGetAction{
|
||||||
Path: "/cluster/status",
|
Path: "/cluster/status",
|
||||||
Port: intstr.FromInt(seaweedv1.MasterHTTPPort),
|
Port: intstr.FromInt(seaweedv1.MasterHTTPPort),
|
||||||
|
|
|
@ -31,35 +31,36 @@ const (
|
||||||
// MergeFn is to resolve conflicts
|
// MergeFn is to resolve conflicts
|
||||||
type MergeFn func(existing, desired runtime.Object) error
|
type MergeFn func(existing, desired runtime.Object) error
|
||||||
|
|
||||||
// CreateOrUpdate create an object to the Kubernetes cluster for controller, if the object to create is existed,
|
// CreateOrUpdate create an object to the Kubernetes cluster for controller, if the object to create exists,
|
||||||
// call mergeFn to merge the change in new object to the existing object, then update the existing object.
|
// call mergeFn to merge the change in new object to the existing object, then update the existing object.
|
||||||
// The object will also be adopted by the given controller.
|
// The object will also be adopted by the given controller.
|
||||||
func (r *SeaweedReconciler) CreateOrUpdate(obj runtime.Object, mergeFn MergeFn) (runtime.Object, error) {
|
func (r *SeaweedReconciler) CreateOrUpdate(obj client.Object, mergeFn MergeFn) (runtime.Object, error) {
|
||||||
|
|
||||||
// controller-runtime/client will mutate the object pointer in-place,
|
// controller-runtime/client will mutate the object pointer in-place,
|
||||||
// to be consistent with other methods in our controller, we copy the object
|
// to be consistent with other methods in our controller, we copy the object
|
||||||
// to avoid the in-place mutation here and hereafter.
|
// to avoid the in-place mutation here and hereafter.
|
||||||
desired := obj.DeepCopyObject()
|
desired, ok := obj.DeepCopyObject().(client.Object)
|
||||||
|
if !ok {
|
||||||
|
return nil, fmt.Errorf("error in deep copy")
|
||||||
|
}
|
||||||
|
|
||||||
// 1. try to create and see if there is any conflicts
|
// 1. try to create and see if there is any conflicts
|
||||||
err := r.Create(context.TODO(), desired)
|
err := r.Create(context.TODO(), desired)
|
||||||
if errors.IsAlreadyExists(err) {
|
|
||||||
|
|
||||||
|
if errors.IsAlreadyExists(err) {
|
||||||
// 2. object has already existed, merge our desired changes to it
|
// 2. object has already existed, merge our desired changes to it
|
||||||
existing, err := EmptyClone(obj)
|
existing, err := EmptyClone(obj)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
key, err := client.ObjectKeyFromObject(existing)
|
key := client.ObjectKeyFromObject(existing)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
err = r.Get(context.TODO(), key, existing)
|
err = r.Get(context.TODO(), key, existing)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
mutated, ok := existing.DeepCopyObject().(client.Object)
|
||||||
mutated := existing.DeepCopyObject()
|
if !ok {
|
||||||
|
return nil, fmt.Errorf("error in deep copy")
|
||||||
|
}
|
||||||
// 4. invoke mergeFn to mutate a copy of the existing object
|
// 4. invoke mergeFn to mutate a copy of the existing object
|
||||||
if err := mergeFn(mutated, desired); err != nil {
|
if err := mergeFn(mutated, desired); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -242,7 +243,7 @@ func (r *SeaweedReconciler) CreateOrUpdateConfigMap(configMap *corev1.ConfigMap)
|
||||||
}
|
}
|
||||||
|
|
||||||
// EmptyClone create an clone of the resource with the same name and namespace (if namespace-scoped), with other fields unset
|
// EmptyClone create an clone of the resource with the same name and namespace (if namespace-scoped), with other fields unset
|
||||||
func EmptyClone(obj runtime.Object) (runtime.Object, error) {
|
func EmptyClone(obj runtime.Object) (client.Object, error) {
|
||||||
meta, ok := obj.(metav1.Object)
|
meta, ok := obj.(metav1.Object)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("Obj %v is not a metav1.Object, cannot call EmptyClone", obj)
|
return nil, fmt.Errorf("Obj %v is not a metav1.Object, cannot call EmptyClone", obj)
|
||||||
|
@ -255,13 +256,13 @@ func EmptyClone(obj runtime.Object) (runtime.Object, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
instMeta, ok := inst.(metav1.Object)
|
instMeta, ok := inst.(client.Object)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("New instatnce %v created from scheme is not a metav1.Object, EmptyClone failed", inst)
|
return nil, fmt.Errorf("New instance %v created from scheme is not a client.Object, EmptyClone failed", inst)
|
||||||
}
|
}
|
||||||
instMeta.SetName(meta.GetName())
|
instMeta.SetName(meta.GetName())
|
||||||
instMeta.SetNamespace(meta.GetNamespace())
|
instMeta.SetNamespace(meta.GetNamespace())
|
||||||
return inst, nil
|
return instMeta, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// InferObjectKind infers the object kind
|
// InferObjectKind infers the object kind
|
||||||
|
|
|
@ -97,7 +97,7 @@ func (r *SeaweedReconciler) createVolumeServerStatefulSet(m *seaweedv1.Seaweed)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ReadinessProbe: &corev1.Probe{
|
ReadinessProbe: &corev1.Probe{
|
||||||
Handler: corev1.Handler{
|
ProbeHandler: corev1.ProbeHandler{
|
||||||
HTTPGet: &corev1.HTTPGetAction{
|
HTTPGet: &corev1.HTTPGetAction{
|
||||||
Path: "/status",
|
Path: "/status",
|
||||||
Port: intstr.FromInt(seaweedv1.VolumeHTTPPort),
|
Port: intstr.FromInt(seaweedv1.VolumeHTTPPort),
|
||||||
|
@ -111,7 +111,7 @@ func (r *SeaweedReconciler) createVolumeServerStatefulSet(m *seaweedv1.Seaweed)
|
||||||
FailureThreshold: 100,
|
FailureThreshold: 100,
|
||||||
},
|
},
|
||||||
LivenessProbe: &corev1.Probe{
|
LivenessProbe: &corev1.Probe{
|
||||||
Handler: corev1.Handler{
|
ProbeHandler: corev1.ProbeHandler{
|
||||||
HTTPGet: &corev1.HTTPGetAction{
|
HTTPGet: &corev1.HTTPGetAction{
|
||||||
Path: "/status",
|
Path: "/status",
|
||||||
Port: intstr.FromInt(seaweedv1.VolumeHTTPPort),
|
Port: intstr.FromInt(seaweedv1.VolumeHTTPPort),
|
||||||
|
|
|
@ -46,8 +46,7 @@ type SeaweedReconciler struct {
|
||||||
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;
|
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;
|
||||||
|
|
||||||
// Reconcile implements the reconcilation logic
|
// Reconcile implements the reconcilation logic
|
||||||
func (r *SeaweedReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
|
func (r *SeaweedReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
|
||||||
ctx := context.Background()
|
|
||||||
log := r.Log.WithValues("seaweed", req.NamespacedName)
|
log := r.Log.WithValues("seaweed", req.NamespacedName)
|
||||||
|
|
||||||
log.Info("start Reconcile ...")
|
log.Info("start Reconcile ...")
|
||||||
|
|
|
@ -51,7 +51,7 @@ func TestAPIs(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ = BeforeSuite(func(done Done) {
|
var _ = BeforeSuite(func(done Done) {
|
||||||
logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
|
logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter)))
|
||||||
|
|
||||||
By("bootstrapping test environment")
|
By("bootstrapping test environment")
|
||||||
testEnv = &envtest.Environment{
|
testEnv = &envtest.Environment{
|
||||||
|
|
100
go.mod
100
go.mod
|
@ -4,68 +4,67 @@ go 1.17
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/chrislusf/seaweedfs v0.0.0-20211103083639-3c245c69d369
|
github.com/chrislusf/seaweedfs v0.0.0-20211103083639-3c245c69d369
|
||||||
github.com/go-logr/logr v0.1.0
|
github.com/go-logr/logr v1.2.3
|
||||||
github.com/onsi/ginkgo v1.14.2
|
github.com/onsi/ginkgo v1.16.5
|
||||||
github.com/onsi/gomega v1.10.4
|
github.com/onsi/gomega v1.17.0
|
||||||
google.golang.org/grpc v1.40.0
|
google.golang.org/grpc v1.43.0
|
||||||
k8s.io/api v0.18.2
|
k8s.io/api v0.23.5
|
||||||
k8s.io/apimachinery v0.18.2
|
k8s.io/apimachinery v0.23.5
|
||||||
k8s.io/client-go v0.18.2
|
k8s.io/client-go v0.23.5
|
||||||
k8s.io/klog v1.0.0
|
k8s.io/klog v1.0.0
|
||||||
sigs.k8s.io/controller-runtime v0.6.0
|
sigs.k8s.io/controller-runtime v0.11.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go v0.94.1 // indirect
|
cloud.google.com/go v0.99.0 // indirect
|
||||||
github.com/aws/aws-sdk-go v1.35.3 // indirect
|
github.com/aws/aws-sdk-go v1.35.3 // indirect
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.1.1 // indirect
|
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/disintegration/imaging v1.6.2 // indirect
|
github.com/disintegration/imaging v1.6.2 // indirect
|
||||||
github.com/evanphx/json-patch v4.5.0+incompatible // indirect
|
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
|
||||||
github.com/fsnotify/fsnotify v1.4.9 // indirect
|
github.com/fsnotify/fsnotify v1.5.1 // indirect
|
||||||
github.com/go-errors/errors v1.1.1 // indirect
|
github.com/go-errors/errors v1.1.1 // indirect
|
||||||
github.com/go-logr/zapr v0.1.0 // indirect
|
github.com/go-logr/zapr v1.2.0 // indirect
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
|
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||||
github.com/golang/protobuf v1.5.2 // indirect
|
github.com/golang/protobuf v1.5.2 // indirect
|
||||||
github.com/golang/snappy v0.0.4 // indirect
|
github.com/golang/snappy v0.0.4 // indirect
|
||||||
github.com/google/btree v1.0.0 // indirect
|
github.com/google/btree v1.0.1 // indirect
|
||||||
github.com/google/go-cmp v0.5.6 // indirect
|
github.com/google/go-cmp v0.5.7 // indirect
|
||||||
github.com/google/gofuzz v1.1.0 // indirect
|
github.com/google/gofuzz v1.2.0 // indirect
|
||||||
github.com/google/uuid v1.3.0 // indirect
|
github.com/google/uuid v1.3.0 // indirect
|
||||||
github.com/googleapis/gax-go/v2 v2.1.0 // indirect
|
github.com/googleapis/gnostic v0.5.5 // indirect
|
||||||
github.com/googleapis/gnostic v0.3.1 // indirect
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
|
|
||||||
github.com/hashicorp/golang-lru v0.5.1 // indirect
|
|
||||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
github.com/imdario/mergo v0.3.6 // indirect
|
github.com/imdario/mergo v0.3.12 // indirect
|
||||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||||
github.com/json-iterator/go v1.1.11 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/karlseguin/ccache/v2 v2.0.7 // indirect
|
github.com/karlseguin/ccache/v2 v2.0.7 // indirect
|
||||||
github.com/klauspost/cpuid v1.2.1 // indirect
|
github.com/klauspost/cpuid v1.2.1 // indirect
|
||||||
github.com/klauspost/reedsolomon v1.9.2 // indirect
|
github.com/klauspost/reedsolomon v1.9.2 // indirect
|
||||||
github.com/magiconair/properties v1.8.1 // indirect
|
github.com/magiconair/properties v1.8.5 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.7 // indirect
|
github.com/mattn/go-runewidth v0.0.7 // indirect
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||||
github.com/mitchellh/mapstructure v1.1.2 // indirect
|
github.com/mitchellh/mapstructure v1.4.3 // indirect
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.1 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/nxadm/tail v1.4.4 // indirect
|
github.com/nxadm/tail v1.4.8 // indirect
|
||||||
github.com/pelletier/go-toml v1.7.0 // indirect
|
github.com/pelletier/go-toml v1.9.4 // indirect
|
||||||
github.com/peterh/liner v1.1.0 // indirect
|
github.com/peterh/liner v1.1.0 // indirect
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
github.com/prometheus/client_golang v1.11.0 // indirect
|
github.com/prometheus/client_golang v1.11.0 // indirect
|
||||||
github.com/prometheus/client_model v0.2.0 // indirect
|
github.com/prometheus/client_model v0.2.0 // indirect
|
||||||
github.com/prometheus/common v0.26.0 // indirect
|
github.com/prometheus/common v0.28.0 // indirect
|
||||||
github.com/prometheus/procfs v0.6.0 // indirect
|
github.com/prometheus/procfs v0.6.0 // indirect
|
||||||
github.com/seaweedfs/goexif v1.0.2 // indirect
|
github.com/seaweedfs/goexif v1.0.2 // indirect
|
||||||
github.com/spf13/afero v1.6.0 // indirect
|
github.com/spf13/afero v1.6.0 // indirect
|
||||||
github.com/spf13/cast v1.3.0 // indirect
|
github.com/spf13/cast v1.4.1 // indirect
|
||||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||||
github.com/spf13/pflag v1.0.5 // indirect
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
github.com/spf13/viper v1.4.0 // indirect
|
github.com/spf13/viper v1.10.1 // indirect
|
||||||
|
github.com/subosito/gotenv v1.2.0 // indirect
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 // indirect
|
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 // indirect
|
||||||
github.com/tylertreat/BoomFilters v0.0.0-20210315201527-1a82519a3e43 // indirect
|
github.com/tylertreat/BoomFilters v0.0.0-20210315201527-1a82519a3e43 // indirect
|
||||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||||
|
@ -73,29 +72,30 @@ require (
|
||||||
github.com/viant/toolbox v0.33.2 // indirect
|
github.com/viant/toolbox v0.33.2 // indirect
|
||||||
go.uber.org/atomic v1.7.0 // indirect
|
go.uber.org/atomic v1.7.0 // indirect
|
||||||
go.uber.org/multierr v1.7.0 // indirect
|
go.uber.org/multierr v1.7.0 // indirect
|
||||||
go.uber.org/zap v1.17.0 // indirect
|
go.uber.org/zap v1.19.1 // indirect
|
||||||
golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f // indirect
|
|
||||||
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect
|
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect
|
||||||
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
|
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
|
||||||
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
|
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
|
||||||
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365 // indirect
|
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 // indirect
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
|
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
|
||||||
golang.org/x/text v0.3.6 // indirect
|
golang.org/x/text v0.3.7 // indirect
|
||||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
|
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
|
||||||
gomodules.xyz/jsonpatch/v2 v2.0.1 // indirect
|
|
||||||
google.golang.org/api v0.57.0 // indirect
|
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6 // indirect
|
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 // indirect
|
||||||
google.golang.org/protobuf v1.27.1 // indirect
|
google.golang.org/protobuf v1.28.0 // indirect
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||||
gopkg.in/fsnotify.v1 v1.4.7 // indirect
|
|
||||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
|
gopkg.in/ini.v1 v1.66.2 // indirect
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
k8s.io/apiextensions-apiserver v0.18.2 // indirect
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||||
k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c // indirect
|
k8s.io/apiextensions-apiserver v0.23.5 // indirect
|
||||||
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 // indirect
|
k8s.io/component-base v0.23.5 // indirect
|
||||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0 // indirect
|
k8s.io/klog/v2 v2.60.1 // indirect
|
||||||
sigs.k8s.io/yaml v1.2.0 // indirect
|
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
|
||||||
|
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
|
||||||
|
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
|
||||||
|
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
|
||||||
|
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
3
main.go
3
main.go
|
@ -22,7 +22,6 @@ import (
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||||
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
|
|
||||||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||||
ctrl "sigs.k8s.io/controller-runtime"
|
ctrl "sigs.k8s.io/controller-runtime"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
||||||
|
@ -38,7 +37,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
|
//utilruntime.Must(clientgoscheme.AddToScheme(scheme))
|
||||||
|
|
||||||
utilruntime.Must(seaweedv1.AddToScheme(scheme))
|
utilruntime.Must(seaweedv1.AddToScheme(scheme))
|
||||||
// +kubebuilder:scaffold:scheme
|
// +kubebuilder:scaffold:scheme
|
||||||
|
|
Loading…
Reference in New Issue