Skip to content

Commit

Permalink
Merge pull request #1052 from munnerz/webhook-panic
Browse files Browse the repository at this point in the history
Re-enable webhook during e2e tests and fix panic on start
  • Loading branch information
jetstack-bot committed Nov 7, 2018
2 parents 814a1d7 + 17c5a2e commit 25c1c12
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion cmd/webhook/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)
Expand Down
4 changes: 0 additions & 4 deletions cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,13 @@ 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{}
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{})

Expand Down
4 changes: 4 additions & 0 deletions test/e2e/framework/helper/pod_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down
8 changes: 4 additions & 4 deletions test/fixtures/cert-manager-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 25c1c12

Please sign in to comment.