From e878c8bc1e595c2fef76f52a385637e5b4a197b5 Mon Sep 17 00:00:00 2001 From: shuting Date: Fri, 17 May 2019 11:15:30 -0700 Subject: [PATCH] move config to pkg/config --- init.go | 2 +- kubeclient/kubeclient.go | 2 +- {config => pkg/config}/config.go | 0 pkg/webhooks/registration.go | 2 +- pkg/webhooks/server.go | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename {config => pkg/config}/config.go (100%) diff --git a/init.go b/init.go index edb1f64f53..28f747e863 100644 --- a/init.go +++ b/init.go @@ -5,8 +5,8 @@ import ( "log" "net/url" - "github.com/nirmata/kube-policy/config" "github.com/nirmata/kube-policy/kubeclient" + "github.com/nirmata/kube-policy/pkg/config" "github.com/nirmata/kube-policy/pkg/tls" rest "k8s.io/client-go/rest" diff --git a/kubeclient/kubeclient.go b/kubeclient/kubeclient.go index 98797907bc..b259f911b1 100644 --- a/kubeclient/kubeclient.go +++ b/kubeclient/kubeclient.go @@ -6,8 +6,8 @@ import ( "os" "time" - "github.com/nirmata/kube-policy/config" types "github.com/nirmata/kube-policy/pkg/apis/policy/v1alpha1" + "github.com/nirmata/kube-policy/pkg/config" apps "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/config/config.go b/pkg/config/config.go similarity index 100% rename from config/config.go rename to pkg/config/config.go diff --git a/pkg/webhooks/registration.go b/pkg/webhooks/registration.go index 6fe8a64f2b..d917c36a8c 100644 --- a/pkg/webhooks/registration.go +++ b/pkg/webhooks/registration.go @@ -4,8 +4,8 @@ import ( "errors" "io/ioutil" - "github.com/nirmata/kube-policy/config" kubeclient "github.com/nirmata/kube-policy/kubeclient" + "github.com/nirmata/kube-policy/pkg/config" admregapi "k8s.io/api/admissionregistration/v1beta1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/webhooks/server.go b/pkg/webhooks/server.go index 4cd34aa1c0..59735f1c2e 100644 --- a/pkg/webhooks/server.go +++ b/pkg/webhooks/server.go @@ -12,9 +12,9 @@ import ( "os" "time" - "github.com/nirmata/kube-policy/config" kubeClient "github.com/nirmata/kube-policy/kubeclient" policylister "github.com/nirmata/kube-policy/pkg/client/listers/policy/v1alpha1" + "github.com/nirmata/kube-policy/pkg/config" engine "github.com/nirmata/kube-policy/pkg/engine" "github.com/nirmata/kube-policy/pkg/engine/mutation" tlsutils "github.com/nirmata/kube-policy/pkg/tls"