mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Merge branch 'master' into upgrade_aliases_branch
This commit is contained in:
commit
6215d9894f
@ -306,7 +306,6 @@ func (rq *ResourceQuotaController) syncResourceQuotaFromKey(key string) (err err
|
|||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Infof("Unable to retrieve resource quota %v from store: %v", key, err)
|
glog.Infof("Unable to retrieve resource quota %v from store: %v", key, err)
|
||||||
rq.queue.Add(key)
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return rq.syncResourceQuota(quota)
|
return rq.syncResourceQuota(quota)
|
||||||
|
@ -1315,11 +1315,13 @@ func describeContainerBasicInfo(container api.Container, status api.ContainerSta
|
|||||||
if strings.Contains(portString, ",") {
|
if strings.Contains(portString, ",") {
|
||||||
w.Write(LEVEL_2, "Ports:\t%s\n", portString)
|
w.Write(LEVEL_2, "Ports:\t%s\n", portString)
|
||||||
} else {
|
} else {
|
||||||
if len(portString) == 0 {
|
w.Write(LEVEL_2, "Port:\t%s\n", stringOrNone(portString))
|
||||||
w.Write(LEVEL_2, "Port:\t<none>\n")
|
|
||||||
} else {
|
|
||||||
w.Write(LEVEL_2, "Port:\t%s\n", portString)
|
|
||||||
}
|
}
|
||||||
|
hostPortString := describeContainerHostPorts(container.Ports)
|
||||||
|
if strings.Contains(hostPortString, ",") {
|
||||||
|
w.Write(LEVEL_2, "Host Ports:\t%s\n", hostPortString)
|
||||||
|
} else {
|
||||||
|
w.Write(LEVEL_2, "Host Port:\t%s\n", stringOrNone(hostPortString))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1331,6 +1333,14 @@ func describeContainerPorts(cPorts []api.ContainerPort) string {
|
|||||||
return strings.Join(ports, ", ")
|
return strings.Join(ports, ", ")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func describeContainerHostPorts(cPorts []api.ContainerPort) string {
|
||||||
|
ports := make([]string, 0, len(cPorts))
|
||||||
|
for _, cPort := range cPorts {
|
||||||
|
ports = append(ports, fmt.Sprintf("%d/%s", cPort.HostPort, cPort.Protocol))
|
||||||
|
}
|
||||||
|
return strings.Join(ports, ", ")
|
||||||
|
}
|
||||||
|
|
||||||
func describeContainerCommand(container api.Container, w PrefixWriter) {
|
func describeContainerCommand(container api.Container, w PrefixWriter) {
|
||||||
if len(container.Command) > 0 {
|
if len(container.Command) > 0 {
|
||||||
w.Write(LEVEL_2, "Command:\n")
|
w.Write(LEVEL_2, "Command:\n")
|
||||||
|
@ -171,11 +171,11 @@ func (le *LeaderElector) IsLeader() bool {
|
|||||||
// acquire loops calling tryAcquireOrRenew and returns immediately when tryAcquireOrRenew succeeds.
|
// acquire loops calling tryAcquireOrRenew and returns immediately when tryAcquireOrRenew succeeds.
|
||||||
func (le *LeaderElector) acquire() {
|
func (le *LeaderElector) acquire() {
|
||||||
stop := make(chan struct{})
|
stop := make(chan struct{})
|
||||||
glog.Infof("attempting to acquire leader lease...")
|
desc := le.config.Lock.Describe()
|
||||||
|
glog.Infof("attempting to acquire leader lease %v...", desc)
|
||||||
wait.JitterUntil(func() {
|
wait.JitterUntil(func() {
|
||||||
succeeded := le.tryAcquireOrRenew()
|
succeeded := le.tryAcquireOrRenew()
|
||||||
le.maybeReportTransition()
|
le.maybeReportTransition()
|
||||||
desc := le.config.Lock.Describe()
|
|
||||||
if !succeeded {
|
if !succeeded {
|
||||||
glog.V(4).Infof("failed to acquire lease %v", desc)
|
glog.V(4).Infof("failed to acquire lease %v", desc)
|
||||||
return
|
return
|
||||||
|
@ -244,7 +244,7 @@ func StartVolumeServer(client clientset.Interface, config VolumeTestConfig) *v1.
|
|||||||
mountName := fmt.Sprintf("path%d", i)
|
mountName := fmt.Sprintf("path%d", i)
|
||||||
volumes[i].Name = mountName
|
volumes[i].Name = mountName
|
||||||
if src == "" {
|
if src == "" {
|
||||||
volumes[i].VolumeSource.EmptyDir = &v1.EmptyDirVolumeSource{Medium: v1.StorageMediumMemory}
|
volumes[i].VolumeSource.EmptyDir = &v1.EmptyDirVolumeSource{}
|
||||||
} else {
|
} else {
|
||||||
volumes[i].VolumeSource.HostPath = &v1.HostPathVolumeSource{
|
volumes[i].VolumeSource.HostPath = &v1.HostPathVolumeSource{
|
||||||
Path: src,
|
Path: src,
|
||||||
|
@ -4,5 +4,7 @@ approvers:
|
|||||||
- vishh
|
- vishh
|
||||||
- derekwaynecarr
|
- derekwaynecarr
|
||||||
- yujuhong
|
- yujuhong
|
||||||
|
- balajismaniam
|
||||||
|
- ConnorDoyle
|
||||||
reviewers:
|
reviewers:
|
||||||
- sig-node-reviewers
|
- sig-node-reviewers
|
||||||
|
Loading…
Reference in New Issue
Block a user