forked from LaconicNetwork/kompose
When using env_file with Docker Compose, a ConfigMap will be generated
For example:
```sh
▶ ./kompose convert -f
script/test/fixtures/configmaps/docker-compose.yml
INFO Kubernetes file "redis-service.yaml" created
INFO Kubernetes file "redis-deployment.yaml" created
INFO Kubernetes file "foo-env-configmap.yaml" created
INFO Kubernetes file "bar-env-configmap.yaml" created
```
File:
```yaml
version: '3'
services:
redis:
image: 'bitnami/redis:latest'
environment:
- ALLOW_EMPTY_PASSWORD=no
# Env file will override environment / warn!
env_file:
- "foo.env"
- bar.env
labels:
kompose.service.type: nodeport
ports:
- '6379:6379'
```
To:
```yaml
apiVersion: v1
data:
ALLOW_EMPTY_PASSWORD: "yes"
kind: ConfigMap
metadata:
creationTimestamp: null
name: foo-env
```
```yaml
...
- env:
- name: ALLOW_EMPTY_PASSWORD
valueFrom:
configMapKeyRef:
key: ALLOW_EMPTY_PASSWORD
name: foo-env
```
|
||
|---|---|---|
| .. | ||
| buildargs | ||
| buildconfig | ||
| bundles | ||
| change-in-volume | ||
| configmap | ||
| controller | ||
| dockerfilepath | ||
| entrypoint-command | ||
| envvars-separators | ||
| etherpad | ||
| examples | ||
| expose-service | ||
| gitlab | ||
| group-add | ||
| healthcheck | ||
| keyonly-envs | ||
| label-port | ||
| mem-limit | ||
| multiple-compose-files | ||
| nginx-node-redis | ||
| placement | ||
| ports-with-ip | ||
| ports-with-proto | ||
| redis-example | ||
| restart-options | ||
| service-name-change | ||
| stdin-true | ||
| tty-true | ||
| v3 | ||
| volume-mounts | ||
| yaml-and-yml | ||