Skip to content

Commit

Permalink
Minor renamings
Browse files Browse the repository at this point in the history
  • Loading branch information
skhalash committed Sep 26, 2024
1 parent 249024c commit 2ea47b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const (
webhookServicePort int32 = 443
)

// ensureLogPipelineWebhookConfigs creates or updates the ValidatingWebhookConfiguration for the LogPipeline resources.
// additionally it patches the conversion webhook configuration with the CA bundle.
func ensureLogPipelineWebhookConfigs(ctx context.Context, c client.Client, caBundle []byte, config Config) error {
// applyWebhookConfigResources creates or updates a ValidatingWebhookConfiguration for the LogPipeline/LogParser resources.
// additionally it patches a LogPipeline conversion webhook configuration.
func applyWebhookConfigResources(ctx context.Context, c client.Client, caBundle []byte, config Config) error {
validatingWebhookConfig := makeValidatingWebhookConfig(caBundle, config)
if err := k8sutils.CreateOrUpdateValidatingWebhookConfiguration(ctx, c, &validatingWebhookConfig); err != nil {
return fmt.Errorf("failed to create or update validating webhook configuration: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion internal/webhookcert/webhook_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func EnsureCertificate(ctx context.Context, client client.Client, config Config)
return fmt.Errorf("failed to provide server cert/key: %w", err)
}

return ensureLogPipelineWebhookConfigs(ctx, client, caCertPEM, config)
return applyWebhookConfigResources(ctx, client, caCertPEM, config)
}

func dnsNames(webhookService types.NamespacedName) (host string, alternativeDNSNames []string) {
Expand Down

0 comments on commit 2ea47b2

Please sign in to comment.