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

Remove the Webhook setting of cert-manager #1413

Merged
merged 3 commits into from
Apr 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
meyskens marked this conversation as resolved.
Show resolved Hide resolved
weight: 10
---

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

```tf
component "cert-manager" {
meyskens marked this conversation as resolved.
Show resolved Hide resolved
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