# SecretEnvSourceV1 Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [SecretEnvSourceV1](/reference/api/csharp/aspire.hosting.kubernetes/secretenvsourcev1.md)
- Kind: `Properties`
- Members: `2`

SecretEnvSourceV1 represents a reference to a Secret used for populating environment variables in a container.

## Name

- Name: `Name`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/SecretEnvSourceV1.cs)

Gets or sets the name of the referent secret. The secret must exist in the same namespace as the pod.

```csharp
public string Name { get; set; }
```

## Optional

- Name: `Optional`
- Modifiers: `nullable` `get; set`
- Returns: `bool?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/SecretEnvSourceV1.cs)

Gets or sets a value indicating whether the specified Secret is optional. If set to true, the application will not fail if the Secret is missing. If set to false or not specified, the Secret must exist for the application to function properly.

```csharp
public bool? Optional { get; set; }
```
