Check the configmap is valid
This commit is contained in:
parent
75c3c47f81
commit
fe2ae8a1ec
1 changed files with 4 additions and 0 deletions
|
@ -891,6 +891,10 @@ func (s *k8sStore) setConfig(cmap *corev1.ConfigMap) {
|
||||||
s.backendConfigMu.Lock()
|
s.backendConfigMu.Lock()
|
||||||
defer s.backendConfigMu.Unlock()
|
defer s.backendConfigMu.Unlock()
|
||||||
|
|
||||||
|
if cmap == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
s.backendConfig = ngx_template.ReadConfig(cmap.Data)
|
s.backendConfig = ngx_template.ReadConfig(cmap.Data)
|
||||||
s.writeSSLSessionTicketKey(cmap, "/etc/nginx/tickets.key")
|
s.writeSSLSessionTicketKey(cmap, "/etc/nginx/tickets.key")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue