mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
fix typos: remove duplicated word in comments
This commit is contained in:
parent
0f7aa6727c
commit
87c29a08e1
@ -72,7 +72,7 @@ def install_load_balancer(apiserver, tls):
|
|||||||
cert_exists = server_cert_path and os.path.isfile(server_cert_path)
|
cert_exists = server_cert_path and os.path.isfile(server_cert_path)
|
||||||
server_key_path = layer_options.get('server_key_path')
|
server_key_path = layer_options.get('server_key_path')
|
||||||
key_exists = server_key_path and os.path.isfile(server_key_path)
|
key_exists = server_key_path and os.path.isfile(server_key_path)
|
||||||
# Do both the the key and certificate exist?
|
# Do both the key and certificate exist?
|
||||||
if cert_exists and key_exists:
|
if cert_exists and key_exists:
|
||||||
# At this point the cert and key exist, and they are owned by root.
|
# At this point the cert and key exist, and they are owned by root.
|
||||||
chown = ['chown', 'www-data:www-data', server_cert_path]
|
chown = ['chown', 'www-data:www-data', server_cert_path]
|
||||||
|
@ -636,7 +636,7 @@ function install-kubernetes-on-master {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install Kubernetes on the the nodes in parallel
|
# Install Kubernetes on the nodes in parallel
|
||||||
# This uses the kubernetes-master-salt.sh script created by gen-node-salt
|
# This uses the kubernetes-master-salt.sh script created by gen-node-salt
|
||||||
# That script uses salt to install Kubernetes
|
# That script uses salt to install Kubernetes
|
||||||
#
|
#
|
||||||
|
@ -33,7 +33,7 @@ const TokenUser = "tls-bootstrap-token-user"
|
|||||||
// For returns a KubeConfig object that can be used for doing the TLS Bootstrap with the right credentials
|
// For returns a KubeConfig object that can be used for doing the TLS Bootstrap with the right credentials
|
||||||
// Also, before returning anything, it makes sure it can trust the API Server
|
// Also, before returning anything, it makes sure it can trust the API Server
|
||||||
func For(cfg *kubeadmapi.NodeConfiguration) (*clientcmdapi.Config, error) {
|
func For(cfg *kubeadmapi.NodeConfiguration) (*clientcmdapi.Config, error) {
|
||||||
// TODO: Print summary info about the CA certificate, along with the the checksum signature
|
// TODO: Print summary info about the CA certificate, along with the checksum signature
|
||||||
// we also need an ability for the user to configure the client to validate received CA cert against a checksum
|
// we also need an ability for the user to configure the client to validate received CA cert against a checksum
|
||||||
clusterinfo, err := GetValidatedClusterInfoObject(cfg)
|
clusterinfo, err := GetValidatedClusterInfoObject(cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -263,7 +263,7 @@ kube::golang::current_platform() {
|
|||||||
echo "$os/$arch"
|
echo "$os/$arch"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Takes the the platform name ($1) and sets the appropriate golang env variables
|
# Takes the platform name ($1) and sets the appropriate golang env variables
|
||||||
# for that platform.
|
# for that platform.
|
||||||
kube::golang::set_platform_envs() {
|
kube::golang::set_platform_envs() {
|
||||||
[[ -n ${1-} ]] || {
|
[[ -n ${1-} ]] || {
|
||||||
|
@ -96,7 +96,7 @@ func SetDefaults_KubeProxyConfiguration(obj *KubeProxyConfiguration) {
|
|||||||
if obj.Conntrack.TCPCloseWaitTimeout == zero {
|
if obj.Conntrack.TCPCloseWaitTimeout == zero {
|
||||||
// See https://github.com/kubernetes/kubernetes/issues/32551.
|
// See https://github.com/kubernetes/kubernetes/issues/32551.
|
||||||
//
|
//
|
||||||
// CLOSE_WAIT conntrack state occurs when the the Linux kernel
|
// CLOSE_WAIT conntrack state occurs when the Linux kernel
|
||||||
// sees a FIN from the remote server. Note: this is a half-close
|
// sees a FIN from the remote server. Note: this is a half-close
|
||||||
// condition that persists as long as the local side keeps the
|
// condition that persists as long as the local side keeps the
|
||||||
// socket open. The condition is rare as it is typical in most
|
// socket open. The condition is rare as it is typical in most
|
||||||
|
@ -55,7 +55,7 @@ func (dc *DeploymentController) rollback(d *extensions.Deployment, rsList []*ext
|
|||||||
glog.V(4).Infof("Found replica set %q with desired revision %d", rs.Name, v)
|
glog.V(4).Infof("Found replica set %q with desired revision %d", rs.Name, v)
|
||||||
// rollback by copying podTemplate.Spec from the replica set
|
// rollback by copying podTemplate.Spec from the replica set
|
||||||
// revision number will be incremented during the next getAllReplicaSetsAndSyncRevision call
|
// revision number will be incremented during the next getAllReplicaSetsAndSyncRevision call
|
||||||
// no-op if the the spec matches current deployment's podTemplate.Spec
|
// no-op if the spec matches current deployment's podTemplate.Spec
|
||||||
performedRollback, err := dc.rollbackToTemplate(d, rs)
|
performedRollback, err := dc.rollbackToTemplate(d, rs)
|
||||||
if performedRollback && err == nil {
|
if performedRollback && err == nil {
|
||||||
dc.emitRollbackNormalEvent(d, fmt.Sprintf("Rolled back deployment %q to revision %d", d.Name, *toRevision))
|
dc.emitRollbackNormalEvent(d, fmt.Sprintf("Rolled back deployment %q to revision %d", d.Name, *toRevision))
|
||||||
|
@ -21,7 +21,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// GetResourceUtilizationRatio takes in a set of metrics, a set of matching requests,
|
// GetResourceUtilizationRatio takes in a set of metrics, a set of matching requests,
|
||||||
// and a target utilization percentage, and calculates the the ratio of
|
// and a target utilization percentage, and calculates the ratio of
|
||||||
// desired to actual utilization (returning that, the actual utilization, and the raw average value)
|
// desired to actual utilization (returning that, the actual utilization, and the raw average value)
|
||||||
func GetResourceUtilizationRatio(metrics PodMetricsInfo, requests map[string]int64, targetUtilization int32) (utilizationRatio float64, currentUtilization int32, rawAverageValue int64, err error) {
|
func GetResourceUtilizationRatio(metrics PodMetricsInfo, requests map[string]int64, targetUtilization int32) (utilizationRatio float64, currentUtilization int32, rawAverageValue int64, err error) {
|
||||||
metricsTotal := int64(0)
|
metricsTotal := int64(0)
|
||||||
|
@ -400,7 +400,7 @@ func (ssc *StatefulSetController) processNextWorkItem() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// worker runs a worker goroutine that invokes processNextWorkItem until the the controller's queue is closed
|
// worker runs a worker goroutine that invokes processNextWorkItem until the controller's queue is closed
|
||||||
func (ssc *StatefulSetController) worker() {
|
func (ssc *StatefulSetController) worker() {
|
||||||
for ssc.processNextWorkItem() {
|
for ssc.processNextWorkItem() {
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ type actualStateOfWorld struct {
|
|||||||
sync.RWMutex
|
sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
||||||
// The volume object represents a volume the the attach/detach controller
|
// The volume object represents a volume the attach/detach controller
|
||||||
// believes to be successfully attached to a node it is managing.
|
// believes to be successfully attached to a node it is managing.
|
||||||
type attachedVolume struct {
|
type attachedVolume struct {
|
||||||
// volumeName contains the unique identifier for this volume.
|
// volumeName contains the unique identifier for this volume.
|
||||||
|
@ -250,7 +250,7 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I
|
|||||||
return nil, fmt.Errorf("invalid configuration: cgroup-root %q doesn't exist: %v", cgroupRoot, err)
|
return nil, fmt.Errorf("invalid configuration: cgroup-root %q doesn't exist: %v", cgroupRoot, err)
|
||||||
}
|
}
|
||||||
glog.Infof("container manager verified user specified cgroup-root exists: %v", cgroupRoot)
|
glog.Infof("container manager verified user specified cgroup-root exists: %v", cgroupRoot)
|
||||||
// Include the the top level cgroup for enforcing node allocatable into cgroup-root.
|
// Include the top level cgroup for enforcing node allocatable into cgroup-root.
|
||||||
// This way, all sub modules can avoid having to understand the concept of node allocatable.
|
// This way, all sub modules can avoid having to understand the concept of node allocatable.
|
||||||
cgroupRoot = path.Join(cgroupRoot, defaultNodeAllocatableCgroupName)
|
cgroupRoot = path.Join(cgroupRoot, defaultNodeAllocatableCgroupName)
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ type HandlerRunner interface {
|
|||||||
type RuntimeHelper interface {
|
type RuntimeHelper interface {
|
||||||
GenerateRunContainerOptions(pod *v1.Pod, container *v1.Container, podIP string) (contOpts *RunContainerOptions, useClusterFirstPolicy bool, err error)
|
GenerateRunContainerOptions(pod *v1.Pod, container *v1.Container, podIP string) (contOpts *RunContainerOptions, useClusterFirstPolicy bool, err error)
|
||||||
GetClusterDNS(pod *v1.Pod) (dnsServers []string, dnsSearches []string, useClusterFirstPolicy bool, err error)
|
GetClusterDNS(pod *v1.Pod) (dnsServers []string, dnsSearches []string, useClusterFirstPolicy bool, err error)
|
||||||
// GetPodCgroupParent returns the the CgroupName identifer, and its literal cgroupfs form on the host
|
// GetPodCgroupParent returns the CgroupName identifer, and its literal cgroupfs form on the host
|
||||||
// of a pod.
|
// of a pod.
|
||||||
GetPodCgroupParent(pod *v1.Pod) string
|
GetPodCgroupParent(pod *v1.Pod) string
|
||||||
GetPodDir(podUID types.UID) string
|
GetPodDir(podUID types.UID) string
|
||||||
|
@ -48,7 +48,7 @@ type portal struct {
|
|||||||
|
|
||||||
// ServiceInfo contains information and state for a particular proxied service
|
// ServiceInfo contains information and state for a particular proxied service
|
||||||
type ServiceInfo struct {
|
type ServiceInfo struct {
|
||||||
// Timeout is the the read/write timeout (used for UDP connections)
|
// Timeout is the read/write timeout (used for UDP connections)
|
||||||
Timeout time.Duration
|
Timeout time.Duration
|
||||||
// ActiveClients is the cache of active UDP clients being proxied by this proxy for this service
|
// ActiveClients is the cache of active UDP clients being proxied by this proxy for this service
|
||||||
ActiveClients *ClientCache
|
ActiveClients *ClientCache
|
||||||
|
@ -550,7 +550,7 @@ func (p *Parser) lookahead(context ParserContext) (Token, string) {
|
|||||||
return tok, lit
|
return tok, lit
|
||||||
}
|
}
|
||||||
|
|
||||||
// consume returns current token and string. Increments the the position
|
// consume returns current token and string. Increments the position
|
||||||
func (p *Parser) consume(context ParserContext) (Token, string) {
|
func (p *Parser) consume(context ParserContext) (Token, string) {
|
||||||
p.position++
|
p.position++
|
||||||
tok, lit := p.scannedItems[p.position-1].tok, p.scannedItems[p.position-1].literal
|
tok, lit := p.scannedItems[p.position-1].tok, p.scannedItems[p.position-1].literal
|
||||||
|
@ -67,7 +67,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultLegacyAPIPrefix is where the the legacy APIs will be located.
|
// DefaultLegacyAPIPrefix is where the legacy APIs will be located.
|
||||||
DefaultLegacyAPIPrefix = "/api"
|
DefaultLegacyAPIPrefix = "/api"
|
||||||
|
|
||||||
// APIGroupPrefix is where non-legacy API group will be located.
|
// APIGroupPrefix is where non-legacy API group will be located.
|
||||||
|
@ -62,7 +62,7 @@ type APIServerHandler struct {
|
|||||||
// which we don't fit into and it still muddies up swagger. Trying to switch the webservices into a route doesn't work because the
|
// which we don't fit into and it still muddies up swagger. Trying to switch the webservices into a route doesn't work because the
|
||||||
// containing webservice faces all the same problems listed above.
|
// containing webservice faces all the same problems listed above.
|
||||||
// This leads to the crazy thing done here. Our mux does what we need, so we'll place it in front of gorestful. It will introspect to
|
// This leads to the crazy thing done here. Our mux does what we need, so we'll place it in front of gorestful. It will introspect to
|
||||||
// decide if the the route is likely to be handled by goresful and route there if needed. Otherwise, it goes to PostGoRestful mux in
|
// decide if the route is likely to be handled by goresful and route there if needed. Otherwise, it goes to PostGoRestful mux in
|
||||||
// order to handle "normal" paths and delegation. Hopefully no API consumers will ever have to deal with this level of detail. I think
|
// order to handle "normal" paths and delegation. Hopefully no API consumers will ever have to deal with this level of detail. I think
|
||||||
// we should consider completely removing gorestful.
|
// we should consider completely removing gorestful.
|
||||||
// Other servers should only use this opaquely to delegate to an API server.
|
// Other servers should only use this opaquely to delegate to an API server.
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// secretbox implements at rest encryption of the provided values given a 32 byte secret key.
|
// secretbox implements at rest encryption of the provided values given a 32 byte secret key.
|
||||||
// Uses a standard 24 byte nonce (placed at the the beginning of the cipher text) generated
|
// Uses a standard 24 byte nonce (placed at the beginning of the cipher text) generated
|
||||||
// from crypto/rand. Does not perform authentication of the data at rest.
|
// from crypto/rand. Does not perform authentication of the data at rest.
|
||||||
type secretboxTransformer struct {
|
type secretboxTransformer struct {
|
||||||
key [32]byte
|
key [32]byte
|
||||||
|
@ -56,7 +56,7 @@ type clientPoolImpl struct {
|
|||||||
mapper meta.RESTMapper
|
mapper meta.RESTMapper
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewClientPool returns a ClientPool from the specified config. It reuses clients for the the same
|
// NewClientPool returns a ClientPool from the specified config. It reuses clients for the same
|
||||||
// group version. It is expected this type may be wrapped by specific logic that special cases certain
|
// group version. It is expected this type may be wrapped by specific logic that special cases certain
|
||||||
// resources or groups.
|
// resources or groups.
|
||||||
func NewClientPool(config *restclient.Config, mapper meta.RESTMapper, apiPathResolverFunc APIPathResolverFunc) ClientPool {
|
func NewClientPool(config *restclient.Config, mapper meta.RESTMapper, apiPathResolverFunc APIPathResolverFunc) ClientPool {
|
||||||
|
@ -169,7 +169,7 @@ func (f *FIFO) AddIfNotPresent(obj interface{}) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// addIfNotPresent assumes the fifo lock is already held and adds the the provided
|
// addIfNotPresent assumes the fifo lock is already held and adds the provided
|
||||||
// item to the queue under id if it does not already exist.
|
// item to the queue under id if it does not already exist.
|
||||||
func (f *FIFO) addIfNotPresent(id string, obj interface{}) {
|
func (f *FIFO) addIfNotPresent(id string, obj interface{}) {
|
||||||
f.populated = true
|
f.populated = true
|
||||||
|
@ -21,7 +21,7 @@ type BreadthFirst struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Walk performs a breadth-first traversal of the graph g starting from the given node,
|
// Walk performs a breadth-first traversal of the graph g starting from the given node,
|
||||||
// depending on the the EdgeFilter field and the until parameter if they are non-nil. The
|
// depending on the EdgeFilter field and the until parameter if they are non-nil. The
|
||||||
// traversal follows edges for which EdgeFilter(edge) is true and returns the first node
|
// traversal follows edges for which EdgeFilter(edge) is true and returns the first node
|
||||||
// for which until(node, depth) is true. During the traversal, if the Visit field is
|
// for which until(node, depth) is true. During the traversal, if the Visit field is
|
||||||
// non-nil, it is called with the nodes joined by each followed edge.
|
// non-nil, it is called with the nodes joined by each followed edge.
|
||||||
@ -113,7 +113,7 @@ type DepthFirst struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Walk performs a depth-first traversal of the graph g starting from the given node,
|
// Walk performs a depth-first traversal of the graph g starting from the given node,
|
||||||
// depending on the the EdgeFilter field and the until parameter if they are non-nil. The
|
// depending on the EdgeFilter field and the until parameter if they are non-nil. The
|
||||||
// traversal follows edges for which EdgeFilter(edge) is true and returns the first node
|
// traversal follows edges for which EdgeFilter(edge) is true and returns the first node
|
||||||
// for which until(node) is true. During the traversal, if the Visit field is non-nil, it
|
// for which until(node) is true. During the traversal, if the Visit field is non-nil, it
|
||||||
// is called with the nodes joined by each followed edge.
|
// is called with the nodes joined by each followed edge.
|
||||||
|
@ -30,7 +30,7 @@ type VisitingDepthFirst struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Walk performs a depth-first traversal of the graph g starting from the given node,
|
// Walk performs a depth-first traversal of the graph g starting from the given node,
|
||||||
// depending on the the EdgeFilter field and the until parameter if they are non-nil. The
|
// depending on the EdgeFilter field and the until parameter if they are non-nil. The
|
||||||
// traversal follows edges for which EdgeFilter(edge) is true and returns the first node
|
// traversal follows edges for which EdgeFilter(edge) is true and returns the first node
|
||||||
// for which until(node) is true. During the traversal, if the Visit field is non-nil, it
|
// for which until(node) is true. During the traversal, if the Visit field is non-nil, it
|
||||||
// is called with the nodes joined by each followed edge.
|
// is called with the nodes joined by each followed edge.
|
||||||
|
Loading…
Reference in New Issue
Block a user