Skip to content

Commit

Permalink
make special secrets array a pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed Nov 28, 2024
1 parent 6bf247e commit 3d30f6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/k8s/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ func (lbc *LoadBalancerController) handleSpecialSecretUpdate(secret *api_v1.Secr
var specialTLSSecretsToUpdate []string
secretNsName := generateSecretNSName(secret)

if ok := lbc.specialSecretValidation(secretNsName, secret, specialTLSSecretsToUpdate); !ok {
if ok := lbc.specialSecretValidation(secretNsName, secret, &specialTLSSecretsToUpdate); !ok {
// if not ok bail early
return
}
Expand All @@ -1803,12 +1803,12 @@ func (lbc *LoadBalancerController) writeSpecialSecrets(secret *api_v1.Secret, sp
lbc.configurator.AddOrUpdateSpecialTLSSecrets(secret, specialTLSSecretsToUpdate)
}

func (lbc *LoadBalancerController) specialSecretValidation(secretNsName string, secret *api_v1.Secret, specialTLSSecretsToUpdate []string) bool {
func (lbc *LoadBalancerController) specialSecretValidation(secretNsName string, secret *api_v1.Secret, specialTLSSecretsToUpdate *[]string) bool {
if secretNsName == lbc.specialSecrets.defaultServerSecret {
lbc.validationTLSSpecialSecret(secret, configs.DefaultServerSecretFileName, &specialTLSSecretsToUpdate)
lbc.validationTLSSpecialSecret(secret, configs.DefaultServerSecretFileName, specialTLSSecretsToUpdate)
}
if secretNsName == lbc.specialSecrets.wildcardTLSSecret {
lbc.validationTLSSpecialSecret(secret, configs.WildcardSecretFileName, &specialTLSSecretsToUpdate)
lbc.validationTLSSpecialSecret(secret, configs.WildcardSecretFileName, specialTLSSecretsToUpdate)
}
return true
}
Expand Down

0 comments on commit 3d30f6a

Please sign in to comment.