Skip to content

Commit

Permalink
fix(webhook install): correctly delete validating / mutating configs.
Browse files Browse the repository at this point in the history
  • Loading branch information
buehler committed Aug 26, 2021
1 parent 4d0708d commit 4ef5d2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/KubeOps/Operator/Commands/Management/Webhooks/Install.cs
Expand Up @@ -135,7 +135,7 @@ public async Task<int> OnExecuteAsync(CommandLineApplication app)
await app.Out.WriteLineAsync("Create validator definition.");
var validatorConfig = _validatingWebhookConfigurationBuilder.BuildWebhookConfiguration(webhookConfig);

await _client.Delete<V1ValidatingWebhookConfiguration>(validatorConfig.Name(), @namespace);
await _client.Delete<V1ValidatingWebhookConfiguration>(validatorConfig.Name());

if (deployment != null)
{
Expand All @@ -150,7 +150,7 @@ public async Task<int> OnExecuteAsync(CommandLineApplication app)
await app.Out.WriteLineAsync("Create mutator definition.");
var mutatorConfig = _mutatingWebhookConfigurationBuilder.BuildWebhookConfiguration(webhookConfig);

await _client.Delete<V1MutatingWebhookConfiguration>(mutatorConfig.Name(), @namespace);
await _client.Delete<V1MutatingWebhookConfiguration>(mutatorConfig.Name());

if (deployment != null)
{
Expand Down

0 comments on commit 4ef5d2c

Please sign in to comment.