Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronoff97 committed Jul 11, 2023
1 parent 0abb4cc commit 7d9cb9b
Show file tree
Hide file tree
Showing 25 changed files with 72 additions and 41 deletions.
21 changes: 7 additions & 14 deletions cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,20 @@ package cmd

import (
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dns"
"github.com/lightstep/collector-cluster-check/pkg/steps/kubernetes"
"github.com/lightstep/collector-cluster-check/pkg/steps/metrics"
"github.com/lightstep/collector-cluster-check/pkg/steps/otel"
"github.com/lightstep/collector-cluster-check/pkg/steps/traces"
"os"
"path/filepath"
"strings"

"github.com/jedib0t/go-pretty/v6/table"
"github.com/spf13/cobra"
"k8s.io/client-go/util/homedir"
//"github.com/lightstep/collector-cluster-check/pkg/checks"
//"github.com/lightstep/collector-cluster-check/pkg/checks/certmanager"
//"github.com/lightstep/collector-cluster-check/pkg/checks/dns"
//"github.com/lightstep/collector-cluster-check/pkg/checks/kubernetes"
//"github.com/lightstep/collector-cluster-check/pkg/checks/lightstep"
//"github.com/lightstep/collector-cluster-check/pkg/checks/oteloperator"
//"github.com/lightstep/collector-cluster-check/pkg/checks/prometheus"
//"github.com/lightstep/collector-cluster-check/pkg/dependencies"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dns"
"github.com/lightstep/collector-cluster-check/pkg/steps/kubernetes"
"github.com/lightstep/collector-cluster-check/pkg/steps/metrics"
"github.com/lightstep/collector-cluster-check/pkg/steps/otel"
"github.com/lightstep/collector-cluster-check/pkg/steps/traces"
)

var (
Expand Down
4 changes: 3 additions & 1 deletion pkg/steps/dependencies/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package dependencies

import (
"context"
"github.com/lightstep/collector-cluster-check/pkg/steps"

"k8s.io/client-go/kubernetes"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type CreateKubeClient struct {
Expand Down
4 changes: 3 additions & 1 deletion pkg/steps/dependencies/collectorconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ package dependencies
import (
"context"
_ "embed"
"github.com/lightstep/collector-cluster-check/pkg/steps"

"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type CollectorConfig struct {
Expand Down
4 changes: 3 additions & 1 deletion pkg/steps/dependencies/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package dependencies

import (
"context"
"github.com/lightstep/collector-cluster-check/pkg/steps"

"k8s.io/client-go/tools/clientcmd"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type CreateKubeConfig struct {
Expand Down
4 changes: 3 additions & 1 deletion pkg/steps/dependencies/crdclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package dependencies

import (
"context"
"github.com/lightstep/collector-cluster-check/pkg/steps"

apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type CreateCustomResourceClient struct {
Expand Down
4 changes: 3 additions & 1 deletion pkg/steps/dependencies/dynamicclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package dependencies

import (
"context"
"github.com/lightstep/collector-cluster-check/pkg/steps"

"k8s.io/client-go/dynamic"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type CreateDynamicClient struct {
Expand Down
6 changes: 4 additions & 2 deletions pkg/steps/dependencies/metricprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package dependencies
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"
"time"

"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp"
sdkmetric "go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
"time"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type CreateMeterProvider struct {
Expand Down
8 changes: 5 additions & 3 deletions pkg/steps/dependencies/portforward.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ package dependencies
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"
"io"
"net/http"
"os"

apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/portforward"
"k8s.io/client-go/transport/spdy"
"net/http"
"os"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type PortForward struct {
Expand Down
4 changes: 3 additions & 1 deletion pkg/steps/dependencies/traceprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package dependencies
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"

"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type CreateTraceProvider struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/steps/dns/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package dns
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"
"net"
"time"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type Dial struct{}
Expand Down
3 changes: 2 additions & 1 deletion pkg/steps/dns/iplookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package dns
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"
"net"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type IPLookup struct{}
Expand Down
4 changes: 3 additions & 1 deletion pkg/steps/dns/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ package dns
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"

probing "github.com/prometheus-community/pro-bing"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type Ping struct{}
Expand Down
4 changes: 3 additions & 1 deletion pkg/steps/kubernetes/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package kubernetes

import (
"context"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

type CrdExists struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/steps/kubernetes/finishportforward.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package kubernetes
import (
"context"
"fmt"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
)
Expand Down
4 changes: 3 additions & 1 deletion pkg/steps/kubernetes/podrunning.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package kubernetes
import (
"context"
"fmt"

v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

type PodRunning struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/steps/kubernetes/startportforward.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package kubernetes
import (
"context"
"fmt"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
)
Expand Down
1 change: 1 addition & 0 deletions pkg/steps/kubernetes/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package kubernetes

import (
"context"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
)
Expand Down
1 change: 1 addition & 0 deletions pkg/steps/metrics/counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package metrics
import (
"context"
"fmt"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/steps/metrics/shutdownmeter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package metrics

import (
"context"
"strings"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
"strings"
)

type ShutdownMeter struct{}
Expand Down
8 changes: 5 additions & 3 deletions pkg/steps/otel/createcol.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package otel
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
"strings"

apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"strings"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
)

type CreateCollector struct{}
Expand Down
6 changes: 4 additions & 2 deletions pkg/steps/otel/deletecol.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ package otel
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"

apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
)

type DeleteCollector struct{}
Expand Down
3 changes: 2 additions & 1 deletion pkg/steps/otel/querycol.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package otel
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"
"io"
"net/http"
"regexp"
"strconv"
"strings"

"github.com/lightstep/collector-cluster-check/pkg/steps"
)

type QueryCollector struct{}
Expand Down
8 changes: 5 additions & 3 deletions pkg/steps/otel/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ package otel
import (
"context"
"fmt"
"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
"time"

apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/watch"
"time"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
)

type PodWatcher struct{}
Expand Down
3 changes: 2 additions & 1 deletion pkg/steps/traces/shutdowntracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package traces

import (
"context"
"strings"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
"strings"
)

type ShutdownTracer struct{}
Expand Down
1 change: 1 addition & 0 deletions pkg/steps/traces/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package traces

import (
"context"

"github.com/lightstep/collector-cluster-check/pkg/steps"
"github.com/lightstep/collector-cluster-check/pkg/steps/dependencies"
)
Expand Down

0 comments on commit 7d9cb9b

Please sign in to comment.