Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1413 from kinvolk/meyskens/rm-cm-no-webhook
Browse files Browse the repository at this point in the history
Remove the Webhook setting of cert-manager
  • Loading branch information
surajssd authored Apr 5, 2021
2 parents 6db76b4 + 71c668b commit cf47e49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 2 additions & 4 deletions docs/configuration-reference/components/cert-manager.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Cert-Manager configuration reference for Lokomotive
title: cert-manager configuration reference for Lokomotive
weight: 10
---

Expand All @@ -21,9 +21,8 @@ cert-manager component configuration example:

```tf
component "cert-manager" {
email = "example@example.com"
email = "example@example.com"
namespace = "cert-manager"
webhooks = false
}
```

Expand All @@ -35,7 +34,6 @@ Table of all the arguments accepted by the component.
|-------------------|----------------------------------------------------------------|:------------:|:------:|:--------:|
| `email` | Email used for certificates to receive expiry notifications. | - | string | true |
| `namespace` | Namespace to deploy the cert-manager into. | cert-manager | string | false |
| `webhooks` | Controls if webhooks should be deployed. | true | bool | false |
| `service_monitor` | Specifies how metrics can be retrieved from a set of services. | false | bool | false |


Expand Down
6 changes: 1 addition & 5 deletions pkg/components/cert-manager/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const (
type component struct {
Email string `hcl:"email,attr"`
Namespace string `hcl:"namespace,optional"`
Webhooks bool `hcl:"webhooks,optional"`
ServiceMonitor bool `hcl:"service_monitor,optional"`
}

Expand All @@ -45,15 +44,12 @@ type component struct {
func NewConfig() *component {
return &component{
Namespace: "cert-manager",
Webhooks: true,
ServiceMonitor: false,
}
}

const chartValuesTmpl = `
email: {{.Email}}
webhook:
enabled: {{.Webhooks}}
{{ if .ServiceMonitor }}
prometheus:
servicemonitor:
Expand Down Expand Up @@ -103,7 +99,7 @@ func (c *component) Metadata() components.Metadata {
Name: c.Namespace,
},
Helm: components.HelmMetadata{
// Cert-manager registers admission webhooks, so we should wait for the webhook to
// cert-manager registers admission webhooks, so we should wait for the webhook to
// become ready before proceeding with installing other components, as it may fail.
// If webhooks are registered with 'failurePolicy: Fail', then kube-apiserver will reject
// creating objects requiring the webhook until the webhook itself becomes ready. So if the
Expand Down

0 comments on commit cf47e49

Please sign in to comment.