Browse Source

add tls to created ingress

Alexander Belanger 5 years ago
parent
commit
f12cc44b0b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      internal/kubernetes/domain/domain.go

+ 6 - 0
internal/kubernetes/domain/domain.go

@@ -104,6 +104,12 @@ func (e *DNSRecord) createIngress(clientset kubernetes.Interface) error {
 				Namespace: "default",
 				Namespace: "default",
 			},
 			},
 			Spec: v1beta1.IngressSpec{
 			Spec: v1beta1.IngressSpec{
+				TLS: []v1beta1.IngressTLS{
+					{
+						Hosts:      []string{fmt.Sprintf("%s.%s", e.SubdomainPrefix, e.RootDomain)},
+						SecretName: "wildcard-cert-tls",
+					},
+				},
 				Rules: []v1beta1.IngressRule{
 				Rules: []v1beta1.IngressRule{
 					{
 					{
 						Host: fmt.Sprintf("%s.%s", e.SubdomainPrefix, e.RootDomain),
 						Host: fmt.Sprintf("%s.%s", e.SubdomainPrefix, e.RootDomain),