# io.k8s.api.core.v1.EnvVarSource

From **Kubernetes**.

EnvVarSource represents a source for the value of an EnvVar.

- Type: `object`

## Properties

### `configMapKeyRef`

- Required: false
Selects a key of a ConfigMap.

### `fieldRef`

- Required: false
Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.

### `fileKeyRef`

- Required: false
FileKeyRef selects a key of the env file. Requires the EnvFiles feature gate to be enabled.

### `resourceFieldRef`

- Required: false
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.

### `secretKeyRef`

- Required: false
Selects a key of a secret in the pod's namespace

## JSON Schema

```json
{"description":"EnvVarSource represents a source for the value of an EnvVar.","properties":{"configMapKeyRef":{"allOf":[{"$ref":"#/components/schemas/io.k8s.api.core.v1.ConfigMapKeySelector"}],"description":"Selects a key of a ConfigMap."},"fieldRef":{"allOf":[{"$ref":"#/components/schemas/io.k8s.api.core.v1.ObjectFieldSelector"}],"description":"Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['\u003cKEY\u003e']`, `metadata.annotations['\u003cKEY\u003e']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs."},"fileKeyRef":{"allOf":[{"$ref":"#/components/schemas/io.k8s.api.core.v1.FileKeySelector"}],"description":"FileKeyRef selects a key of the env file. Requires the EnvFiles feature gate to be enabled."},"resourceFieldRef":{"allOf":[{"$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceFieldSelector"}],"description":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported."},"secretKeyRef":{"allOf":[{"$ref":"#/components/schemas/io.k8s.api.core.v1.SecretKeySelector"}],"description":"Selects a key of a secret in the pod's namespace"}},"type":"object"}
```
