Skip to content

@kubricate/core / types / EnvInjectionStrategy

Interface: EnvInjectionStrategy<Key> ​

Individual environment variable injection strategy. Injects secrets as environment variables into container(s).

Example ​

typescript
const strategy: EnvInjectionStrategy = {
  kind: 'env',
  containerIndex: 0,
  key: 'username'
};

Extends ​

Type Parameters ​

Key ​

Key extends string = string

The type of keys available for this secret (e.g., 'username' | 'password')

Properties ​

containerIndex? ​

ts
optional containerIndex: number;

Zero-based index of the container to inject into (default: 0)


key? ​

ts
optional key: Key;

Specific key from the secret to inject (e.g., 'username', 'password'). Required by some providers like BasicAuthSecretProvider


kind ​

ts
kind: "env";

Injection strategy type: individual environment variable injection


targetPath? ​

ts
optional targetPath: string;

Override the default target path for the secret injection.

Moreover, each provider has a default target path for the secret injection. By using BaseProvider.getTargetPath()

Inherited from ​

BaseSecretInjectionStrategy.targetPath