Add webhook svc name to DNSNames of cert (#140)

This commit is contained in:
Zrss 2018-10-30 02:16:33 +08:00 committed by Knative Prow Robot
parent 594df37bfd
commit d83605ef7b
2 changed files with 7 additions and 1 deletions

View File

@ -47,7 +47,12 @@ func createCertTemplate(name, namespace string) (*x509.Certificate, error) {
}
serviceName := name + "." + namespace
serviceNames := []string{serviceName, serviceName + ".svc", serviceName + ".svc.cluster.local"}
serviceNames := []string{
name,
serviceName,
serviceName + ".svc",
serviceName + ".svc.cluster.local",
}
tmpl := x509.Certificate{
SerialNumber: serialNumber,

View File

@ -60,6 +60,7 @@ func TestCreateCerts(t *testing.T) {
// Verify domain names
expectedDNSNames := []string{
"got-the-hook",
"got-the-hook.knative-webhook",
"got-the-hook.knative-webhook.svc",
"got-the-hook.knative-webhook.svc.cluster.local",