mirror of https://github.com/knative/pkg.git
Add webhook svc name to DNSNames of cert (#140)
This commit is contained in:
parent
594df37bfd
commit
d83605ef7b
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue