Skip to content

Commit

Permalink
Prints requestheader-client-ca-file instead of ca.crt (knative#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrss authored and knative-prow-robot committed Oct 11, 2018
1 parent bb9898e commit 2b0d4fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ func getAPIServerExtensionCACert(cl kubernetes.Interface) ([]byte, error) {
if err != nil {
return nil, err
}
pem, ok := c.Data["requestheader-client-ca-file"]
const caFileName = "requestheader-client-ca-file"
pem, ok := c.Data[caFileName]
if !ok {
return nil, fmt.Errorf("cannot find ca.crt in %v: ConfigMap.Data is %#v", name, c.Data)
return nil, fmt.Errorf("cannot find %s in ConfigMap %s: ConfigMap.Data is %#v", caFileName, name, c.Data)
}
return []byte(pem), nil
}
Expand Down

0 comments on commit 2b0d4fc

Please sign in to comment.