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 unused chaosclient #68409

Merged
merged 1 commit into from
Oct 3, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/kubelet/app/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ go_library(
"//pkg/api/legacyscheme:go_default_library",
"//pkg/apis/core:go_default_library",
"//pkg/capabilities:go_default_library",
"//pkg/client/chaosclient:go_default_library",
"//pkg/cloudprovider:go_default_library",
"//pkg/cloudprovider/providers:go_default_library",
"//pkg/credentialprovider:go_default_library",
Expand Down
14 changes: 0 additions & 14 deletions cmd/kubelet/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ import (
"k8s.io/kubernetes/pkg/api/legacyscheme"
api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/capabilities"
"k8s.io/kubernetes/pkg/client/chaosclient"
"k8s.io/kubernetes/pkg/cloudprovider"
"k8s.io/kubernetes/pkg/credentialprovider"
"k8s.io/kubernetes/pkg/features"
Expand Down Expand Up @@ -890,22 +889,9 @@ func createAPIServerClientConfig(s *options.KubeletServer) (*restclient.Config,
clientConfig.QPS = float32(s.KubeAPIQPS)
clientConfig.Burst = int(s.KubeAPIBurst)

addChaosToClientConfig(s, clientConfig)
return clientConfig, nil
}

// addChaosToClientConfig injects random errors into client connections if configured.
func addChaosToClientConfig(s *options.KubeletServer, config *restclient.Config) {
if s.ChaosChance != 0.0 {
config.WrapTransport = func(rt http.RoundTripper) http.RoundTripper {
seed := chaosclient.NewSeed(1)
// TODO: introduce a standard chaos package with more tunables - this is just a proof of concept
// TODO: introduce random latency and stalls
return chaosclient.NewChaosRoundTripper(rt, chaosclient.LogChaos, seed.P(s.ChaosChance, chaosclient.ErrSimulatedConnectionResetByPeer))
}
}
}

// RunKubelet is responsible for setting up and running a kubelet. It is used in three different applications:
// 1 Integration tests
// 2 Kubelet binary
Expand Down
1 change: 0 additions & 1 deletion pkg/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ filegroup(
"//pkg/auth/authorizer/abac:all-srcs",
"//pkg/auth/nodeidentifier:all-srcs",
"//pkg/capabilities:all-srcs",
"//pkg/client/chaosclient:all-srcs",
"//pkg/client/clientset_generated/internalclientset:all-srcs",
"//pkg/client/conditions:all-srcs",
"//pkg/client/informers/informers_generated/internalversion:all-srcs",
Expand Down
33 changes: 0 additions & 33 deletions pkg/client/chaosclient/BUILD

This file was deleted.

6 changes: 0 additions & 6 deletions pkg/client/chaosclient/OWNERS

This file was deleted.

158 changes: 0 additions & 158 deletions pkg/client/chaosclient/chaosclient.go

This file was deleted.

82 changes: 0 additions & 82 deletions pkg/client/chaosclient/chaosclient_test.go

This file was deleted.

1 change: 0 additions & 1 deletion test/test_owners.csv
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,liggitt,0,
k8s.io/kubernetes/pkg/apis/rbac/validation,erictune,0,
k8s.io/kubernetes/pkg/apis/storage/validation,caesarxuchao,1,
k8s.io/kubernetes/pkg/auth/authorizer/abac,liggitt,0,
k8s.io/kubernetes/pkg/client/chaosclient,deads2k,1,
k8s.io/kubernetes/pkg/client/legacylisters,jsafrane,1,
k8s.io/kubernetes/pkg/client/listers/batch/internalversion,mqliang,0,
k8s.io/kubernetes/pkg/client/listers/extensions/internalversion,eparis,1,
Expand Down