File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 4848 defaultServerSecret = flag .String ("default-server-tls-secret" , "" ,
4949 `Specifies a secret with a TLS certificate and key for SSL termination of
5050 the default server. The value must follow the following format: <namespace>/<name>.
51- If not specified, the key and the cert from /etc/nginx/default is used.` )
51+ If not specified, the key and the cert from /etc/nginx/secrets/ default is used.` )
5252)
5353
5454func main () {
@@ -107,6 +107,11 @@ func main() {
107107
108108 bytes := nginx .GenerateCertAndKeyFileContent (secret )
109109 ngxc .AddOrUpdateSecretFile (nginx .DefaultServerSecretName , bytes , nginx .TLSSecretFileMode )
110+ } else {
111+ _ , err = os .Stat ("/etc/nginx/secrets/default" )
112+ if os .IsNotExist (err ) {
113+ glog .Fatalf ("A TLS cert and key for the default server is not found" )
114+ }
110115 }
111116
112117 nginxDone := make (chan error , 1 )
You can’t perform that action at this time.
0 commit comments