Commit cf077b29 authored by Chao Xu's avatar Chao Xu

change to list syntax

parent aeff05ae
...@@ -179,99 +179,109 @@ credentials. ...@@ -179,99 +179,109 @@ credentials.
The secrets: The secrets:
```json ```json
[{
"kind": "Secret",
"apiVersion": "v1beta3",
"metadata": {
"name": "prod-db-secret"
},
"data": {
"password": "dmFsdWUtMg0KDQo=",
"username": "dmFsdWUtMQ0K"
}
},
{ {
"kind": "Secret",
"apiVersion": "v1beta3", "apiVersion": "v1beta3",
"metadata": { "kind": "List",
"name": "test-db-secret" "items":
[{
"kind": "Secret",
"apiVersion": "v1beta3",
"metadata": {
"name": "prod-db-secret"
},
"data": {
"password": "dmFsdWUtMg0KDQo=",
"username": "dmFsdWUtMQ0K"
}
}, },
"data": { {
"password": "dmFsdWUtMg0KDQo=", "kind": "Secret",
"username": "dmFsdWUtMQ0K" "apiVersion": "v1beta3",
} "metadata": {
}] "name": "test-db-secret"
},
"data": {
"password": "dmFsdWUtMg0KDQo=",
"username": "dmFsdWUtMQ0K"
}
}]
}
``` ```
The pods: The pods:
```json ```json
[{ {
"kind": "Pod",
"apiVersion": "v1beta3", "apiVersion": "v1beta3",
"metadata": { "kind": "List",
"name": "prod-db-client-pod", "items":
"labels": { [{
"name": "prod-db-client" "kind": "Pod",
} "apiVersion": "v1beta3",
}, "metadata": {
"spec": { "name": "prod-db-client-pod",
"volumes": [ "labels": {
{ "name": "prod-db-client"
"name": "secret-volume",
"secret": {
"secretName": "prod-db-secret"
}
} }
], },
"containers": [ "spec": {
{ "volumes": [
"name": "db-client-container", {
"image": "myClientImage", "name": "secret-volume",
"volumeMounts": [ "secret": {
{ "secretName": "prod-db-secret"
"name": "secret-volume",
"readOnly": true,
"mountPath": "/etc/secret-volume"
} }
] }
} ],
] "containers": [
} {
}, "name": "db-client-container",
{ "image": "myClientImage",
"kind": "Pod", "volumeMounts": [
"apiVersion": "v1beta3", {
"metadata": { "name": "secret-volume",
"name": "test-db-client-pod", "readOnly": true,
"labels": { "mountPath": "/etc/secret-volume"
"name": "test-db-client" }
]
}
]
} }
}, },
"spec": { {
"volumes": [ "kind": "Pod",
{ "apiVersion": "v1beta3",
"name": "secret-volume", "metadata": {
"secret": { "name": "test-db-client-pod",
"secretName": "test-db-secret" "labels": {
} "name": "test-db-client"
} }
], },
"containers": [ "spec": {
{ "volumes": [
"name": "db-client-container", {
"image": "myClientImage", "name": "secret-volume",
"volumeMounts": [ "secret": {
{ "secretName": "test-db-secret"
"name": "secret-volume",
"readOnly": true,
"mountPath": "/etc/secret-volume"
} }
] }
} ],
] "containers": [
} {
}] "name": "db-client-container",
"image": "myClientImage",
"volumeMounts": [
{
"name": "secret-volume",
"readOnly": true,
"mountPath": "/etc/secret-volume"
}
]
}
]
}
}]
}
``` ```
Both containers will have the following files present on their filesystems: Both containers will have the following files present on their filesystems:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment