Skip to content
Docs Try Aspire

SecretVolumeSourceV1 Properties

Class Properties 4 members
Represents a volume source based on a Kubernetes Secret.
DefaultMode Section titled DefaultMode nullable int?
Gets or sets the default file mode for files created in the volume.
public int? DefaultMode { get; set; }
The DefaultMode controls the permissions for files written into the volume when specific file modes are not explicitly defined for individual keys. The value is typically represented as an integer, expressing file permissions in bitmask notation (e.g., 0644).
Gets a list of key-to-path mappings that specify how individual keys within the secret should be projected into files within the volume.
public List<KeyToPathV1> Items { get; }
Each entry in the list corresponds to a specific key in the referenced secret and maps it to a file within the volume. This property allows fine-grained control over which keys are included in the volume and their corresponding file paths.
Optional Section titled Optional nullable bool?
Specifies whether the Secret or its keys must be defined.
public bool? Optional { get; set; }
If set to true, the Secret and its associated data are optional and may not exist. If set to false or not specified, the Secret is required, and its absence will result in an error or failure.
SecretName Section titled SecretName string
Gets or sets the name of the Secret to be referenced as a volume.
public string SecretName { get; set; }
The SecretName property specifies the name of a Kubernetes Secret resource to mount as a volume. This allows pods to access Secret data, such as sensitive information, in a filesystem-based layout. When a Secret is mounted as a volume, the key-value pairs within the Secret are projected as files. The property should contain the name of an existing Secret in the same namespace as the Pod. If the referenced Secret does not exist, the Pod will fail to instantiate unless the Optional property is set to true.