diff --git a/checks/basic/admission_controller_webhook_test.go b/checks/basic/admission_controller_webhook_test.go index 53bf127..45d2e6b 100644 --- a/checks/basic/admission_controller_webhook_test.go +++ b/checks/basic/admission_controller_webhook_test.go @@ -22,7 +22,7 @@ import ( "github.com/digitalocean/clusterlint/checks" "github.com/digitalocean/clusterlint/kube" "github.com/stretchr/testify/assert" - ar "k8s.io/api/admissionregistration/v1beta1" + ar "k8s.io/api/admissionregistration/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/checks/doks/admission_controller_webhook_replacement.go b/checks/doks/admission_controller_webhook_replacement.go index a64b898..b3bb332 100644 --- a/checks/doks/admission_controller_webhook_replacement.go +++ b/checks/doks/admission_controller_webhook_replacement.go @@ -19,7 +19,7 @@ package doks import ( "github.com/digitalocean/clusterlint/checks" "github.com/digitalocean/clusterlint/kube" - ar "k8s.io/api/admissionregistration/v1beta1" + ar "k8s.io/api/admissionregistration/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/checks/doks/admission_controller_webhook_replacement_test.go b/checks/doks/admission_controller_webhook_replacement_test.go index 283f97b..4ca248c 100644 --- a/checks/doks/admission_controller_webhook_replacement_test.go +++ b/checks/doks/admission_controller_webhook_replacement_test.go @@ -22,7 +22,7 @@ import ( "github.com/digitalocean/clusterlint/checks" "github.com/digitalocean/clusterlint/kube" "github.com/stretchr/testify/assert" - ar "k8s.io/api/admissionregistration/v1beta1" + ar "k8s.io/api/admissionregistration/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/checks/doks/admission_controller_webhook_timeout_test.go b/checks/doks/admission_controller_webhook_timeout_test.go index 355d070..cdc2e54 100644 --- a/checks/doks/admission_controller_webhook_timeout_test.go +++ b/checks/doks/admission_controller_webhook_timeout_test.go @@ -22,7 +22,7 @@ import ( "github.com/digitalocean/clusterlint/checks" "github.com/digitalocean/clusterlint/kube" "github.com/stretchr/testify/assert" - ar "k8s.io/api/admissionregistration/v1beta1" + ar "k8s.io/api/admissionregistration/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/kube/objects.go b/kube/objects.go index 1a0da2c..85ebfe1 100644 --- a/kube/objects.go +++ b/kube/objects.go @@ -20,7 +20,7 @@ import ( "context" "golang.org/x/sync/errgroup" - ar "k8s.io/api/admissionregistration/v1beta1" + ar "k8s.io/api/admissionregistration/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -42,7 +42,6 @@ type Identifier struct { type Objects struct { Nodes *corev1.NodeList PersistentVolumes *corev1.PersistentVolumeList - ComponentStatuses *corev1.ComponentStatusList SystemNamespace *corev1.Namespace Pods *corev1.PodList PodTemplates *corev1.PodTemplateList @@ -68,7 +67,7 @@ type Client struct { // ctx is currently unused during API calls. More info: https://github.com/kubernetes/community/pull/1166 func (c *Client) FetchObjects(ctx context.Context, filter ObjectFilter) (*Objects, error) { client := c.KubeClient.CoreV1() - admissionControllerClient := c.KubeClient.AdmissionregistrationV1beta1() + admissionControllerClient := c.KubeClient.AdmissionregistrationV1() batchClient := c.KubeClient.BatchV1beta1() opts := metav1.ListOptions{} objects := &Objects{} @@ -82,10 +81,6 @@ func (c *Client) FetchObjects(ctx context.Context, filter ObjectFilter) (*Object objects.PersistentVolumes, err = client.PersistentVolumes().List(gCtx, opts) return }) - g.Go(func() (err error) { - objects.ComponentStatuses, err = client.ComponentStatuses().List(gCtx, opts) - return - }) g.Go(func() (err error) { objects.Pods, err = client.Pods(corev1.NamespaceAll).List(gCtx, filter.NamespaceOptions(opts)) return diff --git a/kube/objects_test.go b/kube/objects_test.go index 567a0e8..019f3f9 100644 --- a/kube/objects_test.go +++ b/kube/objects_test.go @@ -45,7 +45,6 @@ func TestFetchObjects(t *testing.T) { assert.NotNil(t, actual.Nodes) assert.NotNil(t, actual.PersistentVolumes) - assert.NotNil(t, actual.ComponentStatuses) assert.NotNil(t, actual.Pods) assert.NotNil(t, actual.PodTemplates) assert.NotNil(t, actual.PersistentVolumeClaims)