[
{
"ID": "ib7yble4rm5qbz3ijmk83cxeh",
"Version": {
"Index": 776
},
"CreatedAt": "2018-02-28T09:42:57.612406537Z",
"UpdatedAt": "2018-02-28T09:42:57.612406537Z",
"Spec": {
"Name": "myservice",
"Labels": {},
"TaskTemplate": {
"ContainerSpec": {
"Image": "nginx:alpine@sha256:48947591194ac5a9dce1e110f9198a547debb21630f121081640b87d99ca8b11",
"StopGracePeriod": 10000000000,
"DNSConfig": {},
"Secrets": [
{
"File": {
"Name": "/secret.conf",
"UID": "234",
"GID": "567",
"Mode": 292
},
"SecretID": "yv9vtn86nugxsbshu1ccumlod",
"SecretName": "secret.conf"
}
],
"Configs": [
{
"File": {
"Name": "/foo.conf",
"UID": "123",
"GID": "456",
"Mode": 292
},
"ConfigID": "j915gbt419wv9022nr2w8pqdh",
"ConfigName": "foo.conf"
}
],
"Isolation": "default"
},
"Resources": {
"Limits": {},
"Reservations": {}
},
"RestartPolicy": {
"Condition": "any",
"Delay": 5000000000,
"MaxAttempts": 0
},
"Placement": {
"Platforms": [
{
"Architecture": "amd64",
"OS": "linux"
},
{
"Architecture": "arm64",
"OS": "linux"
},
{
"Architecture": "386",
"OS": "linux"
},
{
"Architecture": "ppc64le",
"OS": "linux"
},
{
"Architecture": "s390x",
"OS": "linux"
}
]
},
"ForceUpdate": 0,
"Runtime": "container"
},
"Mode": {
"Replicated": {
"Replicas": 1
}
},
"UpdateConfig": {
"Parallelism": 1,
"FailureAction": "pause",
"Monitor": 5000000000,
"MaxFailureRatio": 0,
"Order": "stop-first"
},
"RollbackConfig": {
"Parallelism": 1,
"FailureAction": "pause",
"Monitor": 5000000000,
"MaxFailureRatio": 0,
"Order": "stop-first"
},
"EndpointSpec": {
"Mode": "vip"
}
},
"Endpoint": {
"Spec": {}
}
}
]
Create a service using a secret and a config:
Inspect the service with the
--prettyoption:Notice that no information about the configs or secrets is printed.
Inspect the service without
--pretty:Details
[ { "ID": "ib7yble4rm5qbz3ijmk83cxeh", "Version": { "Index": 776 }, "CreatedAt": "2018-02-28T09:42:57.612406537Z", "UpdatedAt": "2018-02-28T09:42:57.612406537Z", "Spec": { "Name": "myservice", "Labels": {}, "TaskTemplate": { "ContainerSpec": { "Image": "nginx:alpine@sha256:48947591194ac5a9dce1e110f9198a547debb21630f121081640b87d99ca8b11", "StopGracePeriod": 10000000000, "DNSConfig": {}, "Secrets": [ { "File": { "Name": "/secret.conf", "UID": "234", "GID": "567", "Mode": 292 }, "SecretID": "yv9vtn86nugxsbshu1ccumlod", "SecretName": "secret.conf" } ], "Configs": [ { "File": { "Name": "/foo.conf", "UID": "123", "GID": "456", "Mode": 292 }, "ConfigID": "j915gbt419wv9022nr2w8pqdh", "ConfigName": "foo.conf" } ], "Isolation": "default" }, "Resources": { "Limits": {}, "Reservations": {} }, "RestartPolicy": { "Condition": "any", "Delay": 5000000000, "MaxAttempts": 0 }, "Placement": { "Platforms": [ { "Architecture": "amd64", "OS": "linux" }, { "Architecture": "arm64", "OS": "linux" }, { "Architecture": "386", "OS": "linux" }, { "Architecture": "ppc64le", "OS": "linux" }, { "Architecture": "s390x", "OS": "linux" } ] }, "ForceUpdate": 0, "Runtime": "container" }, "Mode": { "Replicated": { "Replicas": 1 } }, "UpdateConfig": { "Parallelism": 1, "FailureAction": "pause", "Monitor": 5000000000, "MaxFailureRatio": 0, "Order": "stop-first" }, "RollbackConfig": { "Parallelism": 1, "FailureAction": "pause", "Monitor": 5000000000, "MaxFailureRatio": 0, "Order": "stop-first" }, "EndpointSpec": { "Mode": "vip" } }, "Endpoint": { "Spec": {} } } ]Notice that information about secrets and configs is present, so this would be an easy change (just adjusting the template for
--pretty)