mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Support env variables based on ConfigMaps sent in payload
Fixes #12363 Signed-off-by: Jakub Dzon <jdzon@redhat.com>
This commit is contained in:
@ -16,6 +16,7 @@ Currently, the supported Kubernetes kinds are:
|
||||
- Pod
|
||||
- Deployment
|
||||
- PersistentVolumeClaim
|
||||
- ConfigMap
|
||||
|
||||
`Kubernetes Pods or Deployments`
|
||||
|
||||
@ -68,6 +69,40 @@ like:
|
||||
The build will consider `foobar` to be the context directory for the build. If there is an image in local storage
|
||||
called `foobar`, the image will not be built unless the `--build` flag is used.
|
||||
|
||||
`Kubernetes ConfigMap`
|
||||
|
||||
Kubernetes ConfigMap can be referred as a source of environment variables in Pods or Deployments.
|
||||
|
||||
For example ConfigMap defined in following YAML:
|
||||
```
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: foo
|
||||
data:
|
||||
FOO: bar
|
||||
```
|
||||
|
||||
can be referred in a Pod in following way:
|
||||
```
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
...
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- top
|
||||
name: container-1
|
||||
image: foobar
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: foo
|
||||
optional: false
|
||||
```
|
||||
|
||||
and as a result environment variable `FOO` will be set to `bar` for container `container-1`.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
#### **--authfile**=*path*
|
||||
|
Reference in New Issue
Block a user