InitCerts
Generates a self-signed TLS certificate for the webhook and stores it in a k8s Secret.
def InitCerts(
ctx: context.Context,
kubeClient: kubernetes.Interface,
cfg: *webhookConfig.Config
) - > error
Generates a self-signed TLS certificate for the webhook and stores it in a Kubernetes Secret.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| kubeClient | kubernetes.Interface | The Kubernetes client interface used to interact with the Kubernetes API, specifically for creating secrets. |
| cfg | *webhookConfig.Config | The webhook configuration, containing details like the service name and the name of the secret to create. |
Returns
| Type | Description |
|---|---|
error | An error if certificate generation or secret creation fails. |