Merge pull request #25204 from yongtang/25195-docker-info-ca-configuration
Output external CAs in swarm mode with `docker info`
This commit is contained in:
commit
8f78dae4e3
|
@ -98,6 +98,12 @@ func runInfo(dockerCli *client.DockerCli) error {
|
||||||
fmt.Fprintf(dockerCli.Out(), " Heartbeat Period: %s\n", units.HumanDuration(time.Duration(info.Swarm.Cluster.Spec.Dispatcher.HeartbeatPeriod)))
|
fmt.Fprintf(dockerCli.Out(), " Heartbeat Period: %s\n", units.HumanDuration(time.Duration(info.Swarm.Cluster.Spec.Dispatcher.HeartbeatPeriod)))
|
||||||
fmt.Fprintf(dockerCli.Out(), " CA Configuration:\n")
|
fmt.Fprintf(dockerCli.Out(), " CA Configuration:\n")
|
||||||
fmt.Fprintf(dockerCli.Out(), " Expiry Duration: %s\n", units.HumanDuration(info.Swarm.Cluster.Spec.CAConfig.NodeCertExpiry))
|
fmt.Fprintf(dockerCli.Out(), " Expiry Duration: %s\n", units.HumanDuration(info.Swarm.Cluster.Spec.CAConfig.NodeCertExpiry))
|
||||||
|
if len(info.Swarm.Cluster.Spec.CAConfig.ExternalCAs) > 0 {
|
||||||
|
fmt.Fprintf(dockerCli.Out(), " External CAs:\n")
|
||||||
|
for _, entry := range info.Swarm.Cluster.Spec.CAConfig.ExternalCAs {
|
||||||
|
fmt.Fprintf(dockerCli.Out(), " %s: %s\n", entry.Protocol, entry.URL)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fmt.Fprintf(dockerCli.Out(), " Node Address: %s\n", info.Swarm.NodeAddr)
|
fmt.Fprintf(dockerCli.Out(), " Node Address: %s\n", info.Swarm.NodeAddr)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue