Browse Source

Don't warn about containers without labels

master
Chris Smith 5 years ago
parent
commit
941fdf6315
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      dotege.go

+ 7
- 1
dotege.go View File

@@ -225,7 +225,13 @@ func addAlternatives(hostname *model.Hostname, alternatives []string) {
225 225
 }
226 226
 
227 227
 func deployCertForContainer(container *model.Container) {
228
-	err, cert := certificateManager.GetCertificate(getHostnamesForContainer(container))
228
+	hostnames := getHostnamesForContainer(container)
229
+	if len(hostnames) == 0 {
230
+		logger.Debugf("No labels found for container %s", container.Name)
231
+		return
232
+	}
233
+
234
+	err, cert := certificateManager.GetCertificate(hostnames)
229 235
 	if err != nil {
230 236
 		logger.Warnf("Unable to generate certificate for %s: %s", container.Name, err.Error())
231 237
 	} else {

Loading…
Cancel
Save