Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

ConfigMap as container environment variables #1039

Open
boredland opened this issue May 9, 2020 · 1 comment
Open

ConfigMap as container environment variables #1039

boredland opened this issue May 9, 2020 · 1 comment

Comments

@boredland
Copy link

Is there a way to use configMaps to configure the environment variables in a container in this style?

https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables

Something like in the official docs is what I search:

pods/pod-configmap-envFrom.yaml 

apiVersion: v1
kind: Pod
metadata:
  name: dapi-test-pod
spec:
  containers:
    - name: test-container
      image: k8s.gcr.io/busybox
      command: [ "/bin/sh", "-c", "env" ]
      envFrom:
      - configMapRef:
          name: special-config
  restartPolicy: Never
@StrongMonkey
Copy link
Contributor

Check examples at here https://github.com/rancher/rio/blob/master/docs/workloads.md#examples. There are only CLI examples but syntax will be same for riofile.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants