File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -536,15 +536,17 @@ func buildAuthEmailAndOAuthEnvVars(instance *paperclipv1alpha1.Instance) []corev
536536func allowedHostnames (instance * paperclipv1alpha1.Instance ) []string {
537537 svc := ServiceName (instance )
538538 ns := instance .Namespace
539- hosts := []string {
539+ extra := instance .Spec .Deployment .AllowedHostnames
540+ hosts := make ([]string , 0 , 6 + len (extra ))
541+ hosts = append (hosts ,
540542 "localhost" ,
541543 "127.0.0.1" ,
542544 svc ,
543- svc + "." + ns ,
544- svc + "." + ns + ".svc" ,
545- svc + "." + ns + ".svc.cluster.local" ,
546- }
547- hosts = append (hosts , instance . Spec . Deployment . AllowedHostnames ... )
545+ svc + "." + ns ,
546+ svc + "." + ns + ".svc" ,
547+ svc + "." + ns + ".svc.cluster.local" ,
548+ )
549+ hosts = append (hosts , extra ... )
548550
549551 seen := make (map [string ]bool , len (hosts ))
550552 out := make ([]string , 0 , len (hosts ))
You can’t perform that action at this time.
0 commit comments