Merge pull request #59140 from halfcrazy/typo-apiserver

Automatic merge from submit-queue (batch tested with PRs 57683, 59116, 58728, 59140, 58976). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

doc: fix typo in package apiserver

**What this PR does / why we need it**:
fix typo in package apiserver

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-02-01 07:04:43 -08:00 committed by GitHub
commit 7d07810c6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 22 additions and 22 deletions

View File

@ -23,7 +23,7 @@ import (
webhookconfig "k8s.io/apiserver/pkg/admission/plugin/webhook/config" webhookconfig "k8s.io/apiserver/pkg/admission/plugin/webhook/config"
) )
// WantsServiceResolver defines a fuction that accepts a ServiceResolver for // WantsServiceResolver defines a function that accepts a ServiceResolver for
// admission plugins that need to make calls to services. // admission plugins that need to make calls to services.
type WantsServiceResolver interface { type WantsServiceResolver interface {
SetServiceResolver(webhookconfig.ServiceResolver) SetServiceResolver(webhookconfig.ServiceResolver)

View File

@ -62,7 +62,7 @@ const (
// The stage for events generated once the response body has been completed, and no more bytes // The stage for events generated once the response body has been completed, and no more bytes
// will be sent. // will be sent.
StageResponseComplete = "ResponseComplete" StageResponseComplete = "ResponseComplete"
// The stage for events generated when a panic occured. // The stage for events generated when a panic occurred.
StagePanic = "Panic" StagePanic = "Panic"
) )

View File

@ -152,7 +152,7 @@ const (
DecisionDeny Decision = iota DecisionDeny Decision = iota
// DecisionAllow means that an authorizer decided to allow the action. // DecisionAllow means that an authorizer decided to allow the action.
DecisionAllow DecisionAllow
// DecisionNoOpionion means that an authorizer has no opinion on wether // DecisionNoOpionion means that an authorizer has no opinion on whether
// to allow or deny an action. // to allow or deny an action.
DecisionNoOpinion DecisionNoOpinion
) )

View File

@ -239,7 +239,7 @@ func (f *fancyResponseWriterDelegator) Hijack() (net.Conn, *bufio.ReadWriter, er
// fake a response status before protocol switch happens // fake a response status before protocol switch happens
f.processCode(http.StatusSwitchingProtocols) f.processCode(http.StatusSwitchingProtocols)
// This will be ignored if WriteHeader() function has aready been called. // This will be ignored if WriteHeader() function has already been called.
// It's not guaranteed Audit-ID http header is sent for all requests. // It's not guaranteed Audit-ID http header is sent for all requests.
// For example, when user run "kubectl exec", apiserver uses a proxy handler // For example, when user run "kubectl exec", apiserver uses a proxy handler
// to deal with the request, users can only get http headers returned by kubelet node. // to deal with the request, users can only get http headers returned by kubelet node.

View File

@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// Package negotation contains media type negotiation logic. // Package negotiation contains media type negotiation logic.
package negotiation // import "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" package negotiation // import "k8s.io/apiserver/pkg/endpoints/handlers/negotiation"

View File

@ -112,7 +112,7 @@ func isPrettyPrint(req *http.Request) bool {
} }
} }
userAgent := req.UserAgent() userAgent := req.UserAgent()
// This covers basic all browers and cli http tools // This covers basic all browsers and cli http tools
if strings.HasPrefix(userAgent, "curl") || strings.HasPrefix(userAgent, "Wget") || strings.HasPrefix(userAgent, "Mozilla/5.0") { if strings.HasPrefix(userAgent, "curl") || strings.HasPrefix(userAgent, "Wget") || strings.HasPrefix(userAgent, "Mozilla/5.0") {
return true return true
} }

View File

@ -78,11 +78,11 @@ var (
}, },
[]string{"verb", "resource", "subresource", "scope"}, []string{"verb", "resource", "subresource", "scope"},
) )
// DroppedRequests is a number of requests dropped with 'Try again later' reponse" // DroppedRequests is a number of requests dropped with 'Try again later' response"
DroppedRequests = prometheus.NewCounterVec( DroppedRequests = prometheus.NewCounterVec(
prometheus.CounterOpts{ prometheus.CounterOpts{
Name: "apiserver_dropped_requests", Name: "apiserver_dropped_requests",
Help: "Number of requests dropped with 'Try again later' reponse", Help: "Number of requests dropped with 'Try again later' response",
}, },
[]string{"requestKind"}, []string{"requestKind"},
) )

View File

@ -90,6 +90,6 @@ func TestGenericHttpResponseCheckerLimitReader(t *testing.T) {
t.Error("unexpected non-error") t.Error("unexpected non-error")
} }
if len(err.Error()) != maxReadLength { if len(err.Error()) != maxReadLength {
t.Errorf("expected lenth of error message: %d, saw: %d", maxReadLength, len(err.Error())) t.Errorf("expected length of error message: %d, saw: %d", maxReadLength, len(err.Error()))
} }
} }

View File

@ -36,7 +36,7 @@ import (
) )
type EtcdOptions struct { type EtcdOptions struct {
// The value of Paging on StorageConfig will be overriden by the // The value of Paging on StorageConfig will be overridden by the
// calculated feature gate value. // calculated feature gate value.
StorageConfig storagebackend.Config StorageConfig storagebackend.Config
EncryptionProviderConfigFilepath string EncryptionProviderConfigFilepath string

View File

@ -6498,7 +6498,7 @@ function marked(src, opt, callback) {
} catch (e) { } catch (e) {
e.message += '\nPlease report this to https://github.com/chjj/marked.'; e.message += '\nPlease report this to https://github.com/chjj/marked.';
if ((opt || marked.defaults).silent) { if ((opt || marked.defaults).silent) {
return '<p>An error occured:</p><pre>' return '<p>An error occurred:</p><pre>'
+ escape(e.message + '', true) + escape(e.message + '', true)
+ '</pre>'; + '</pre>';
} }
@ -7152,7 +7152,7 @@ var Shred = function(options) {
this.logCurl = options.logCurl || false; this.logCurl = options.logCurl || false;
}; };
// Most of the real work is done in the request and reponse classes. // Most of the real work is done in the request and response classes.
Shred.Request = require("./shred/request"); Shred.Request = require("./shred/request");
Shred.Response = require("./shred/response"); Shred.Response = require("./shred/response");
@ -8351,7 +8351,7 @@ Changelog:
a regress. I appologize for that. a regress. I appologize for that.
2010.05.09 - 0.5: 2010.05.09 - 0.5:
- bug fix: 0 is now preceeded with a + sign - bug fix: 0 is now preceded with a + sign
- bug fix: the sign was not at the right position on padded results (Kamal Abdali) - bug fix: the sign was not at the right position on padded results (Kamal Abdali)
- switched from GPL to BSD license - switched from GPL to BSD license

View File

@ -189,7 +189,7 @@ func (s *DefaultStorageFactory) SetEtcdPrefix(groupResource schema.GroupResource
} }
// SetDisableAPIListChunking allows a specific resource to disable paging at the storage layer, to prevent // SetDisableAPIListChunking allows a specific resource to disable paging at the storage layer, to prevent
// exposure of key names in continuations. This may be overriden by feature gates. // exposure of key names in continuations. This may be overridden by feature gates.
func (s *DefaultStorageFactory) SetDisableAPIListChunking(groupResource schema.GroupResource) { func (s *DefaultStorageFactory) SetDisableAPIListChunking(groupResource schema.GroupResource) {
overrides := s.Overrides[groupResource] overrides := s.Overrides[groupResource]
overrides.disablePaging = true overrides.disablePaging = true

View File

@ -348,7 +348,7 @@ func TestGetNotFoundErr(t *testing.T) {
var got example.Pod var got example.Pod
err := helper.Get(context.TODO(), boguskey, "", &got, false) err := helper.Get(context.TODO(), boguskey, "", &got, false)
if !storage.IsNotFound(err) { if !storage.IsNotFound(err) {
t.Errorf("Unexpected reponse on key=%v, err=%v", boguskey, err) t.Errorf("Unexpected response on key=%v, err=%v", boguskey, err)
} }
} }

View File

@ -76,7 +76,7 @@ type etcdWatcher struct {
valueTransformer ValueTransformer valueTransformer ValueTransformer
list bool // If we're doing a recursive watch, should be true. list bool // If we're doing a recursive watch, should be true.
quorum bool // If we enable quorum, shoule be true quorum bool // If we enable quorum, should be true
include includeFunc include includeFunc
pred storage.SelectionPredicate pred storage.SelectionPredicate

View File

@ -1186,7 +1186,7 @@ func testSetup(t *testing.T) (context.Context, *store, *integration.ClusterV3) {
return ctx, store, cluster return ctx, store, cluster
} }
// testPropogateStore helps propogates store with objects, automates key generation, and returns // testPropogateStore helps propagates store with objects, automates key generation, and returns
// keys and stored objects. // keys and stored objects.
func testPropogateStore(ctx context.Context, t *testing.T, store *store, obj *example.Pod) (string, *example.Pod) { func testPropogateStore(ctx context.Context, t *testing.T, store *store, obj *example.Pod) (string, *example.Pod) {
// Setup store with a key and grab the output for returning. // Setup store with a key and grab the output for returning.

View File

@ -362,7 +362,7 @@ func (w *watchCache) GetByKey(key string) (interface{}, bool, error) {
return w.store.GetByKey(key) return w.store.GetByKey(key)
} }
// Replace takes slice of runtime.Object as a paramater. // Replace takes slice of runtime.Object as a parameter.
func (w *watchCache) Replace(objs []interface{}, resourceVersion string) error { func (w *watchCache) Replace(objs []interface{}, resourceVersion string) error {
version, err := parseResourceVersion(resourceVersion) version, err := parseResourceVersion(resourceVersion)
if err != nil { if err != nil {

View File

@ -230,7 +230,7 @@ func TestKubeConfigFile(t *testing.T) {
errRegex: "tls: found a certificate rather than a key in the PEM for the private key", errRegex: "tls: found a certificate rather than a key in the PEM for the private key",
}, },
{ {
test: "valid configuration (certificate data embeded in config)", test: "valid configuration (certificate data embedded in config)",
cluster: &defaultCluster, cluster: &defaultCluster,
user: &defaultUser, user: &defaultUser,
errRegex: "", errRegex: "",

View File

@ -357,7 +357,7 @@ func (b *batchBackend) sendBatchEvents(events []auditinternal.Event) {
b.reqMutex.RLock() b.reqMutex.RLock()
go func() { go func() {
// Execute the webhook POST in a goroutine to keep it from blocking. // Execute the webhook POST in a goroutine to keep it from blocking.
// This lets the webhook continue to drain the queue immediatly. // This lets the webhook continue to drain the queue immediately.
defer b.reqMutex.RUnlock() defer b.reqMutex.RUnlock()
defer runtime.HandleCrash() defer runtime.HandleCrash()

View File

@ -42,7 +42,7 @@ import (
"k8s.io/client-go/tools/clientcmd/api/v1" "k8s.io/client-go/tools/clientcmd/api/v1"
) )
// newWebhookHandler returns a handler which recieves webhook events and decodes the // newWebhookHandler returns a handler which receives webhook events and decodes the
// request body. The caller passes a callback which is called on each webhook POST. // request body. The caller passes a callback which is called on each webhook POST.
// The object passed to cb is of the same type as list. // The object passed to cb is of the same type as list.
func newWebhookHandler(t *testing.T, list runtime.Object, cb func(events runtime.Object)) http.Handler { func newWebhookHandler(t *testing.T, list runtime.Object, cb func(events runtime.Object)) http.Handler {

View File

@ -100,7 +100,7 @@ func newWithBackoff(subjectAccessReview authorizationclient.SubjectAccessReviewI
// Authorize makes a REST request to the remote service describing the attempted action as a JSON // Authorize makes a REST request to the remote service describing the attempted action as a JSON
// serialized api.authorization.v1beta1.SubjectAccessReview object. An example request body is // serialized api.authorization.v1beta1.SubjectAccessReview object. An example request body is
// provided bellow. // provided below.
// //
// { // {
// "apiVersion": "authorization.k8s.io/v1beta1", // "apiVersion": "authorization.k8s.io/v1beta1",