Skip to content

Commit

Permalink
update: should enable/disable only the webhook
Browse files Browse the repository at this point in the history
Signed-off-by: krishna sindhur <[email protected]>
  • Loading branch information
krishna sindhur committed Dec 2, 2024
1 parent 5877362 commit 8216cf8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Here is an overview of all new **experimental** features:
- **AWS Secret Manager**: Pod identity overrides are honored ([#6195](https://github.com/kedacore/keda/issues/6195))
- **Azure Event Hub Scaler**: Checkpointer errors are correctly handled ([#6084](https://github.com/kedacore/keda/issues/6084))
- **Metrics API Scaler**: Prometheus metrics can have multiple labels ([#6077](https://github.com/kedacore/keda/issues/6077))
- **Operator Webhook Flag**: Enable patching of webhook resources. ([#6184](https://github.com/kedacore/keda/issues/6184))

### Deprecations

Expand Down
17 changes: 9 additions & 8 deletions pkg/certificates/certificate_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,20 @@ type CertManager struct {

// AddCertificateRotation registers all needed services to generate the certificates and patches needed resources with the caBundle
func (cm CertManager) AddCertificateRotation(ctx context.Context, mgr manager.Manager) error {
var rotatorHooks []rotator.WebhookInfo
rotatorHooks := []rotator.WebhookInfo{
{
Name: cm.APIServiceName,
Type: rotator.APIService,
},
}

if cm.EnableWebhookPatching {
rotatorHooks = []rotator.WebhookInfo{
{
rotatorHooks = append(rotatorHooks,
rotator.WebhookInfo{
Name: cm.ValidatingWebhookName,
Type: rotator.Validating,
},
{
Name: cm.APIServiceName,
Type: rotator.APIService,
},
}
)
} else {
cm.Logger.V(1).Info("Webhook patching is disabled, skipping webhook certificates")
}
Expand Down

0 comments on commit 8216cf8

Please sign in to comment.