Remove usage of deprecated v1beta API endpoints (#6543)

This commit is contained in:
David McKay
2019-10-23 23:35:37 +01:00
committed by Daniel Nelson
parent 988e036641
commit 47a708ec99
11 changed files with 107 additions and 96 deletions

View File

@@ -4,8 +4,7 @@ import (
"context"
"time"
"github.com/ericchiang/k8s/apis/apps/v1beta1"
v1 "github.com/ericchiang/k8s/apis/apps/v1"
"github.com/influxdata/telegraf"
)
@@ -23,7 +22,7 @@ func collectDeployments(ctx context.Context, acc telegraf.Accumulator, ki *Kuber
}
}
func (ki *KubernetesInventory) gatherDeployment(d v1beta1.Deployment, acc telegraf.Accumulator) error {
func (ki *KubernetesInventory) gatherDeployment(d v1.Deployment, acc telegraf.Accumulator) error {
fields := map[string]interface{}{
"replicas_available": d.Status.GetAvailableReplicas(),
"replicas_unavailable": d.Status.GetUnavailableReplicas(),