NewPodMutator
No overview available.
def NewPodMutator(
ctx: context.Context,
cfg: *webhookConfig.Config,
podNamespace: string,
scheme: *runtime.Scheme,
scope: promutils.Scope
) - > *PodMutator, error
Creates and initializes a new PodMutator instance. This function sets up the necessary components for mutating pods, including a secrets mutator.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| cfg | *webhookConfig.Config | The webhook configuration settings to be used by the PodMutator. |
| podNamespace | string | The namespace where the pods are located, used for configuring the secrets mutator. |
| scheme | *runtime.Scheme | The Kubernetes API scheme, used to create an admission decoder for handling admission requests. |
| scope | promutils.Scope | The Prometheus metrics scope for reporting metrics related to the mutator's operations. |
Returns
| Type | Description |
|---|---|
*PodMutator, error | A new PodMutator instance configured with a decoder, webhook configuration, and a secrets mutator, or an error if the secrets mutator creation fails. |