Skip to content

Commit 887d515

Browse files
authored
Merge pull request #83 from xrstf/extend-fp-cert-names
extend front-proxy server cert DNSNames with namespaced and cluster-global DNS names
2 parents 25bf91e + 1f8f9f4 commit 887d515

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/resources/frontproxy/certificates.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package frontproxy
1818

1919
import (
20+
"fmt"
21+
2022
certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1"
2123
certmanagermetav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1"
2224

@@ -31,10 +33,13 @@ func ServerCertificateReconciler(frontProxy *operatorv1alpha1.FrontProxy, rootSh
3133

3234
name := resources.GetFrontProxyCertificateName(rootShard, frontProxy, certKind)
3335
template := frontProxy.Spec.CertificateTemplates.CertificateTemplate(certKind)
36+
fpService := resources.GetFrontProxyServiceName(frontProxy)
3437

3538
dnsNames := []string{
3639
rootShard.Spec.External.Hostname,
37-
resources.GetFrontProxyServiceName(frontProxy),
40+
fpService,
41+
fmt.Sprintf("%s.%s", fpService, frontProxy.Namespace),
42+
fmt.Sprintf("%s.%s.svc.cluster.local", fpService, frontProxy.Namespace),
3843
}
3944

4045
if frontProxy.Spec.ExternalHostname != "" {

0 commit comments

Comments
 (0)