Skip to content

Commit

Permalink
cert-manager: rename EnsureWebhook -> EnsureCertManager
Browse files Browse the repository at this point in the history
  • Loading branch information
munnerz committed Jul 9, 2020
1 parent e67670b commit 4336293
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ type fakeCertManagerClient struct {

var _ cluster.CertManagerClient = &fakeCertManagerClient{}

func (p *fakeCertManagerClient) EnsureWebhook() error {
func (p *fakeCertManagerClient) EnsureCertManager() error {
return nil
}

Expand Down
9 changes: 5 additions & 4 deletions cmd/clusterctl/client/cluster/cert_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/pkg/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3"
"sigs.k8s.io/cluster-api/cmd/clusterctl/client/config"
manifests "sigs.k8s.io/cluster-api/cmd/clusterctl/config"
Expand All @@ -44,9 +45,9 @@ const (

// CertManagerClient has methods to work with cert-manager components in the cluster.
type CertManagerClient interface {
// EnsureWebhook makes sure the cert-manager Webhook is Available in a cluster:
// EnsureCertManager makes sure the cert-manager Webhook is Available in a cluster:
// this is a requirement to install a new provider
EnsureWebhook() error
EnsureCertManager() error

// Images return the list of images required for installing the cert-manager.
Images() ([]string, error)
Expand Down Expand Up @@ -86,11 +87,11 @@ func (cm *certManagerClient) Images() ([]string, error) {
return images, nil
}

// EnsureWebhook makes sure the cert-manager Web-hook is Available in a cluster:
// EnsureCertManager makes sure the cert-manager Web-hook is Available in a cluster:
// this is a requirement to install a new provider
// Nb. In order to provide a simpler out-of-the box experience, the cert-manager manifest
// is embedded in the clusterctl binary.
func (cm *certManagerClient) EnsureWebhook() error {
func (cm *certManagerClient) EnsureCertManager() error {
log := logf.Log

// Otherwise install cert-manager
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (c *clusterctlClient) Init(options InitOptions) ([]Components, error) {
}

// Before installing the providers, ensure the cert-manager Webhook is in place.
if err := cluster.CertManager().EnsureWebhook(); err != nil {
if err := cluster.CertManager().EnsureCertManager(); err != nil {
return nil, err
}

Expand Down

0 comments on commit 4336293

Please sign in to comment.