mirror of https://github.com/k3s-io/k3s
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 ```pull/6/head
commit
7d07810c6d
|
@ -23,7 +23,7 @@ import (
|
|||
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.
|
||||
type WantsServiceResolver interface {
|
||||
SetServiceResolver(webhookconfig.ServiceResolver)
|
||||
|
|
|
@ -62,7 +62,7 @@ const (
|
|||
// The stage for events generated once the response body has been completed, and no more bytes
|
||||
// will be sent.
|
||||
StageResponseComplete = "ResponseComplete"
|
||||
// The stage for events generated when a panic occured.
|
||||
// The stage for events generated when a panic occurred.
|
||||
StagePanic = "Panic"
|
||||
)
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ const (
|
|||
DecisionDeny Decision = iota
|
||||
// DecisionAllow means that an authorizer decided to allow the action.
|
||||
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.
|
||||
DecisionNoOpinion
|
||||
)
|
||||
|
|
|
@ -239,7 +239,7 @@ func (f *fancyResponseWriterDelegator) Hijack() (net.Conn, *bufio.ReadWriter, er
|
|||
// fake a response status before protocol switch happens
|
||||
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.
|
||||
// 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.
|
||||
|
|
|
@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
|
|||
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"
|
||||
|
|
|
@ -112,7 +112,7 @@ func isPrettyPrint(req *http.Request) bool {
|
|||
}
|
||||
}
|
||||
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") {
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -78,11 +78,11 @@ var (
|
|||
},
|
||||
[]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(
|
||||
prometheus.CounterOpts{
|
||||
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"},
|
||||
)
|
||||
|
|
|
@ -90,6 +90,6 @@ func TestGenericHttpResponseCheckerLimitReader(t *testing.T) {
|
|||
t.Error("unexpected non-error")
|
||||
}
|
||||
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()))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import (
|
|||
)
|
||||
|
||||
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.
|
||||
StorageConfig storagebackend.Config
|
||||
EncryptionProviderConfigFilepath string
|
||||
|
|
|
@ -6498,7 +6498,7 @@ function marked(src, opt, callback) {
|
|||
} catch (e) {
|
||||
e.message += '\nPlease report this to https://github.com/chjj/marked.';
|
||||
if ((opt || marked.defaults).silent) {
|
||||
return '<p>An error occured:</p><pre>'
|
||||
return '<p>An error occurred:</p><pre>'
|
||||
+ escape(e.message + '', true)
|
||||
+ '</pre>';
|
||||
}
|
||||
|
@ -7152,7 +7152,7 @@ var Shred = function(options) {
|
|||
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.Response = require("./shred/response");
|
||||
|
@ -8351,7 +8351,7 @@ Changelog:
|
|||
a regress. I appologize for that.
|
||||
|
||||
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)
|
||||
- switched from GPL to BSD license
|
||||
|
||||
|
|
|
@ -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
|
||||
// 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) {
|
||||
overrides := s.Overrides[groupResource]
|
||||
overrides.disablePaging = true
|
||||
|
|
|
@ -348,7 +348,7 @@ func TestGetNotFoundErr(t *testing.T) {
|
|||
var got example.Pod
|
||||
err := helper.Get(context.TODO(), boguskey, "", &got, false)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ type etcdWatcher struct {
|
|||
valueTransformer ValueTransformer
|
||||
|
||||
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
|
||||
pred storage.SelectionPredicate
|
||||
|
||||
|
|
|
@ -1186,7 +1186,7 @@ func testSetup(t *testing.T) (context.Context, *store, *integration.ClusterV3) {
|
|||
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.
|
||||
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.
|
||||
|
|
|
@ -362,7 +362,7 @@ func (w *watchCache) GetByKey(key string) (interface{}, bool, error) {
|
|||
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 {
|
||||
version, err := parseResourceVersion(resourceVersion)
|
||||
if err != nil {
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
{
|
||||
test: "valid configuration (certificate data embeded in config)",
|
||||
test: "valid configuration (certificate data embedded in config)",
|
||||
cluster: &defaultCluster,
|
||||
user: &defaultUser,
|
||||
errRegex: "",
|
||||
|
|
|
@ -357,7 +357,7 @@ func (b *batchBackend) sendBatchEvents(events []auditinternal.Event) {
|
|||
b.reqMutex.RLock()
|
||||
go func() {
|
||||
// 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 runtime.HandleCrash()
|
||||
|
|
|
@ -42,7 +42,7 @@ import (
|
|||
"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.
|
||||
// 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 {
|
||||
|
|
|
@ -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
|
||||
// serialized api.authorization.v1beta1.SubjectAccessReview object. An example request body is
|
||||
// provided bellow.
|
||||
// provided below.
|
||||
//
|
||||
// {
|
||||
// "apiVersion": "authorization.k8s.io/v1beta1",
|
||||
|
|
Loading…
Reference in New Issue