Merge pull request #1052 from munnerz/webhook-panic

Re-enable webhook during e2e tests and fix panic on start
This commit is contained in:
jetstack-bot 2018-11-07 17:11:46 +00:00 committed by GitHub
commit 25c1c126c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 9 deletions

View File

@ -14,7 +14,6 @@ go_library(
visibility = ["//visibility:private"],
deps = [
"//pkg/apis/certmanager/validation/webhooks:go_default_library",
"//pkg/logs:go_default_library",
"//vendor/github.com/openshift/generic-admission-server/pkg/cmd:go_default_library",
],
)

View File

@ -22,7 +22,6 @@ import (
"github.com/openshift/generic-admission-server/pkg/cmd"
"github.com/jetstack/cert-manager/pkg/apis/certmanager/validation/webhooks"
"github.com/jetstack/cert-manager/pkg/logs"
)
var certHook cmd.ValidatingAdmissionHook = &webhooks.CertificateAdmissionHook{}
@ -30,9 +29,6 @@ var issuerHook cmd.ValidatingAdmissionHook = &webhooks.IssuerAdmissionHook{}
var clusterIssuerHook cmd.ValidatingAdmissionHook = &webhooks.ClusterIssuerAdmissionHook{}
func main() {
logs.InitLogs()
defer logs.FlushLogs()
// Avoid "logging before flag.Parse" errors from glog
flag.CommandLine.Parse([]string{})

View File

@ -63,6 +63,10 @@ func (h *Helper) WaitForAllPodsRunningInNamespaceTimeout(ns string, timeout time
errs = append(errs, fmt.Sprintf("Pod %q not ready (no Ready condition)", p.Name))
continue
}
if c.Reason == "PodCompleted" {
Logf("Pod %q has Completed, assuming it is ready/expected", p.Name)
continue
}
// This pod does not have the ready condition set to True
if c.Status != corev1.ConditionTrue {
errs = append(errs, fmt.Sprintf("Pod %q not ready: %s", p.Name, c.String()))

View File

@ -19,10 +19,10 @@ extraArgs:
- --leader-election-retry-period=2s
webhook:
# enabled: true
# image:
# tag: build
# pullPolicy: Never
enabled: true
image:
tag: build
pullPolicy: Never
resources:
requests:
cpu: 10m