diff options
author | Charlie Doern <cdoern@redhat.com> | 2022-08-02 11:31:59 -0400 |
---|---|---|
committer | Charlie Doern <cdoern@redhat.com> | 2022-08-03 16:42:28 -0400 |
commit | 7df8d80508bbc07f8aca79b5aa37e58dfeaa5895 (patch) | |
tree | bc34ac6b9a890aff272e51c3f5e3af07dce4bbac /pkg/k8s.io | |
parent | 549974d97e9c5f1adb1158d1a523777ea722bf65 (diff) | |
download | podman-7df8d80508bbc07f8aca79b5aa37e58dfeaa5895.tar.gz podman-7df8d80508bbc07f8aca79b5aa37e58dfeaa5895.tar.bz2 podman-7df8d80508bbc07f8aca79b5aa37e58dfeaa5895.zip |
add omitempty to Secret in k8s VolumeSource
Secret was populating a generated kube as `null`. Add omitempty
so that when the volume source is not a secret, we do not print unnecessary info
resolves #15156
Signed-off-by: Charlie Doern <cdoern@redhat.com>
Diffstat (limited to 'pkg/k8s.io')
-rw-r--r-- | pkg/k8s.io/api/core/v1/types.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/k8s.io/api/core/v1/types.go b/pkg/k8s.io/api/core/v1/types.go index 39a675dae..384965769 100644 --- a/pkg/k8s.io/api/core/v1/types.go +++ b/pkg/k8s.io/api/core/v1/types.go @@ -56,7 +56,8 @@ type VolumeSource struct { // ConfigMap represents a configMap that should populate this volume // +optional ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"` - Secret *SecretVolumeSource + // Secret represents a secret that should be mounted as a volume + Secret *SecretVolumeSource `json:"secret,omitempty"` } // PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. |