mirror of https://github.com/docker/cli.git
adding configs/secrets to service inspect pretty
Signed-off-by: Essam A. Hassan <es.hassan187@gmail.com>
This commit is contained in:
parent
e5980c541a
commit
3ae2d4b24c
|
@ -97,6 +97,18 @@ Mounts:
|
||||||
ReadOnly = {{ $mount.ReadOnly }}
|
ReadOnly = {{ $mount.ReadOnly }}
|
||||||
Type = {{ $mount.Type }}
|
Type = {{ $mount.Type }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- if .Configs}}
|
||||||
|
Configs:
|
||||||
|
{{- range $config := .Configs }}
|
||||||
|
Target: {{$config.File.Name}}
|
||||||
|
Source: {{$config.ConfigName}}
|
||||||
|
{{- end }}{{ end }}
|
||||||
|
{{- if .Secrets }}
|
||||||
|
Secrets:
|
||||||
|
{{- range $secret := .Secrets }}
|
||||||
|
Target: {{$secret.File.Name}}
|
||||||
|
Source: {{$secret.SecretName}}
|
||||||
|
{{- end }}{{ end }}
|
||||||
{{- if .HasResources }}
|
{{- if .HasResources }}
|
||||||
Resources:
|
Resources:
|
||||||
{{- if .HasResourceReservations }}
|
{{- if .HasResourceReservations }}
|
||||||
|
@ -200,6 +212,14 @@ func (ctx *serviceInspectContext) Labels() map[string]string {
|
||||||
return ctx.Service.Spec.Labels
|
return ctx.Service.Spec.Labels
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ctx *serviceInspectContext) Configs() []*swarm.ConfigReference {
|
||||||
|
return ctx.Service.Spec.TaskTemplate.ContainerSpec.Configs
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ctx *serviceInspectContext) Secrets() []*swarm.SecretReference {
|
||||||
|
return ctx.Service.Spec.TaskTemplate.ContainerSpec.Secrets
|
||||||
|
}
|
||||||
|
|
||||||
func (ctx *serviceInspectContext) IsModeGlobal() bool {
|
func (ctx *serviceInspectContext) IsModeGlobal() bool {
|
||||||
return ctx.Service.Spec.Mode.Global != nil
|
return ctx.Service.Spec.Mode.Global != nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue