Skip to content

Commit

Permalink
fix: ssl need to be update when secret has been changed (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
gxthrj committed Apr 10, 2021
1 parent 9deb22f commit 94a7b7c
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 90 deletions.
3 changes: 3 additions & 0 deletions pkg/ingress/controller/secret.go
Expand Up @@ -148,6 +148,9 @@ func (c *secretController) sync(ctx context.Context, ev *types.Event) error {
sslMap := ssls.(*sync.Map)
sslMap.Range(func(_, v interface{}) bool {
ssl := v.(*apisixv1.Ssl)
// sync ssl
ssl.Cert = string(sec.Data["cert"])
ssl.Key = string(sec.Data["key"])
ssl.FullName = ssl.ID
return state.SyncSsl(ssl, ev.Type.String()) == nil
})
Expand Down

0 comments on commit 94a7b7c

Please sign in to comment.