Skip to content

Commit

Permalink
Remove remote rules (#4698)
Browse files Browse the repository at this point in the history
Remove remote rules
  • Loading branch information
tejal29 authored Aug 19, 2020
1 parent 6e98174 commit 035c89f
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 312 deletions.
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

0 comments on commit 035c89f

Please sign in to comment.