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 48
48
defaultServerSecret = flag .String ("default-server-tls-secret" , "" ,
49
49
`Specifies a secret with a TLS certificate and key for SSL termination of
50
50
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.` )
52
52
)
53
53
54
54
func main () {
@@ -107,6 +107,11 @@ func main() {
107
107
108
108
bytes := nginx .GenerateCertAndKeyFileContent (secret )
109
109
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
+ }
110
115
}
111
116
112
117
nginxDone := make (chan error , 1 )
You can’t perform that action at this time.
0 commit comments