diff --git a/kube/objects.go b/kube/objects.go index e2b2e91..ae6db7e 100644 --- a/kube/objects.go +++ b/kube/objects.go @@ -53,13 +53,13 @@ type Objects struct { // Client encapsulates a client for a Kubernetes cluster. type Client struct { - kubeClient kubernetes.Interface + KubeClient kubernetes.Interface } // FetchObjects returns the objects from a Kubernetes cluster. func (c *Client) FetchObjects() (*Objects, error) { - client := c.kubeClient.CoreV1() - admissionControllerClient := c.kubeClient.AdmissionregistrationV1beta1() + client := c.KubeClient.CoreV1() + admissionControllerClient := c.KubeClient.AdmissionregistrationV1beta1() opts := metav1.ListOptions{} objects := &Objects{} @@ -161,7 +161,7 @@ func NewClient(configPath, configContext string) (*Client, error) { } return &Client{ - kubeClient: client, + KubeClient: client, }, nil } @@ -181,6 +181,6 @@ func BuildClient(yaml []byte) (*Client, error) { } return &Client{ - kubeClient: client, + KubeClient: client, }, nil } diff --git a/kube/objects_test.go b/kube/objects_test.go index b8e2d06..3abc77e 100644 --- a/kube/objects_test.go +++ b/kube/objects_test.go @@ -27,10 +27,10 @@ import ( func TestFetchObjects(t *testing.T) { api := &Client{ - kubeClient: fake.NewSimpleClientset(), + KubeClient: fake.NewSimpleClientset(), } - api.kubeClient.CoreV1().Namespaces().Create(&corev1.Namespace{ + api.KubeClient.CoreV1().Namespaces().Create(&corev1.Namespace{ TypeMeta: metav1.TypeMeta{Kind: "Namespace", APIVersion: "v1"}, ObjectMeta: metav1.ObjectMeta{ Name: "kube-system",