mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Add ability to consume secrets in env vars
This commit is contained in:
@@ -560,8 +560,8 @@ type GitRepoVolumeSource struct {
|
||||
// as files using the keys in the Data field as the file names.
|
||||
// Secret volumes support ownership management and SELinux relabeling.
|
||||
type SecretVolumeSource struct {
|
||||
// Name of the secret in the pod's namespace to use
|
||||
SecretName string `json:"secretName"`
|
||||
// Name of the secret in the pod's namespace to use.
|
||||
SecretName string `json:"secretName,omitempty"`
|
||||
}
|
||||
|
||||
// Represents an NFS mount that lasts the lifetime of a pod.
|
||||
@@ -721,6 +721,8 @@ type EnvVarSource struct {
|
||||
FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty"`
|
||||
// Selects a key of a ConfigMap.
|
||||
ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
|
||||
// Selects a key of a secret in the pod's namespace.
|
||||
SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty"`
|
||||
}
|
||||
|
||||
// ObjectFieldSelector selects an APIVersioned field of an object.
|
||||
@@ -741,6 +743,14 @@ type ConfigMapKeySelector struct {
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
// SecretKeySelector selects a key of a Secret.
|
||||
type SecretKeySelector struct {
|
||||
// The name of the secret in the pod's namespace to select from.
|
||||
LocalObjectReference `json:",inline"`
|
||||
// The key of the secret to select from. Must be a valid secret key.
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
// HTTPGetAction describes an action based on HTTP Get requests.
|
||||
type HTTPGetAction struct {
|
||||
// Optional: Path to access on the HTTP server.
|
||||
|
||||
Reference in New Issue
Block a user