Files
kubernetes/pkg/api
k8s-merge-robot eb733cbf45 Merge pull request #25285 from ingvagabund/extend-secrets-volumes-with-path-control
Automatic merge from submit-queue

Extend secrets volumes with path control

As per [1] this PR extends secrets mapped into volume with:

* key-to-path mapping the same way as is for configmap. E.g.

```
{
 "apiVersion": "v1",
 "kind": "Pod",
  "metadata": {
    "name": "mypod",
    "namespace": "default"
  },
  "spec": {
    "containers": [{
      "name": "mypod",
      "image": "redis",
      "volumeMounts": [{
        "name": "foo",
        "mountPath": "/etc/foo",
        "readOnly": true
      }]
    }],
    "volumes": [{
      "name": "foo",
      "secret": {
        "secretName": "mysecret",
        "items": [{
          "key": "username",
          "path": "my-username"
        }]
      }
    }]
  }
}
```

Here the ``spec.volumes[0].secret.items`` added changing original target ``/etc/foo/username`` to ``/etc/foo/my-username``.

* secondly, refactoring ``pkg/volumes/secrets/secrets.go`` volume plugin to use ``AtomicWritter`` to project a secret into file.

[1] https://github.com/kubernetes/kubernetes/blob/master/docs/design/configmap.md#changes-to-secret
2016-05-21 03:55:13 -07:00
..
2016-05-15 16:04:19 -07:00
2016-04-29 17:12:10 -04:00
2016-05-13 17:27:58 -07:00
2015-10-09 15:14:03 -07:00
2015-08-05 17:30:03 -07:00
2016-03-21 20:21:39 +08:00
2015-08-05 17:30:03 -07:00
2016-05-15 16:04:19 -07:00
2016-05-15 16:04:19 -07:00
2016-03-02 20:46:32 -05:00