Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove remote rules #4698

Merged
merged 2 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions pkg/diag/download/http.go

This file was deleted.

29 changes: 0 additions & 29 deletions pkg/diag/download/http_test.go

This file was deleted.

100 changes: 0 additions & 100 deletions pkg/diag/recommender/custom.go

This file was deleted.

134 changes: 0 additions & 134 deletions pkg/diag/recommender/custom_test.go

This file was deleted.

5 changes: 1 addition & 4 deletions pkg/diag/validator/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,8 @@ type PodValidator struct {
}

// NewPodValidator initializes a PodValidator
func NewPodValidator(k kubernetes.Interface, deployContext map[string]string) *PodValidator {
func NewPodValidator(k kubernetes.Interface) *PodValidator {
rs := []Recommender{recommender.ContainerError{}}
if r, err := recommender.NewCustom(recommender.DiagDefaultRules, deployContext); err == nil {
rs = append(rs, r)
}
return &PodValidator{k: k, recos: rs}
}

Expand Down
10 changes: 1 addition & 9 deletions pkg/skaffold/deploy/status_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ const (
kubernetesMaxDeadline = 600
)

var (
deployContext map[string]string
)

type counter struct {
total int
pending int32
Expand All @@ -76,10 +72,6 @@ func statusCheck(ctx context.Context, defaultLabeller *DefaultLabeller, runCtx *
return proto.StatusCode_STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR, fmt.Errorf("getting Kubernetes client: %w", err)
}

deployContext = map[string]string{
"clusterName": runCtx.GetKubeContext(),
}

deployments := make([]*resource.Deployment, 0)
for _, n := range runCtx.GetNamespaces() {
newDeployments, err := getDeployments(client, n, defaultLabeller,
Expand Down Expand Up @@ -135,7 +127,7 @@ func getDeployments(client kubernetes.Interface, ns string, l *DefaultLabeller,
}
pd := diag.New([]string{d.Namespace}).
WithLabel(RunIDLabel, l.Labels()[RunIDLabel]).
WithValidators([]validator.Validator{validator.NewPodValidator(client, deployContext)})
WithValidators([]validator.Validator{validator.NewPodValidator(client)})

for k, v := range d.Spec.Template.Labels {
pd = pd.WithLabel(k, v)
Expand Down