Skip to content

Commit

Permalink
fix: allow both default & wildcard secrets to be used at the same time (
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 authored Nov 21, 2024
1 parent 67af19e commit 3830101
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/k8s/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1778,15 +1778,14 @@ func (lbc *LoadBalancerController) validationTLSSpecialSecret(secret *api_v1.Sec
func (lbc *LoadBalancerController) handleSpecialSecretUpdate(secret *api_v1.Secret) {
var specialTLSSecretsToUpdate []string
secretNsName := secret.Namespace + "/" + secret.Name
switch secretNsName {
case lbc.specialSecrets.defaultServerSecret:

if secretNsName == lbc.specialSecrets.defaultServerSecret {
lbc.validationTLSSpecialSecret(secret, configs.DefaultServerSecretFileName, &specialTLSSecretsToUpdate)
case lbc.specialSecrets.wildcardTLSSecret:
}
if secretNsName == lbc.specialSecrets.wildcardTLSSecret {
lbc.validationTLSSpecialSecret(secret, configs.WildcardSecretFileName, &specialTLSSecretsToUpdate)
default:
nl.Warnf(lbc.Logger, "special secret not found")
return
}

err := lbc.configurator.AddOrUpdateSpecialTLSSecrets(secret, specialTLSSecretsToUpdate)
if err != nil {
nl.Errorf(lbc.Logger, "Error when updating the special Secret %v: %v", secretNsName, err)
Expand Down

0 comments on commit 3830101

Please sign in to comment.