cmapichecker

package
v0.0.0-...-5756e46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCertManagerCRDsNotFound   = fmt.Errorf("the cert-manager CRDs are not yet installed on the Kubernetes API server")
	ErrWebhookServiceFailure     = fmt.Errorf("the cert-manager webhook service is not created yet")
	ErrWebhookDeploymentFailure  = fmt.Errorf("the cert-manager webhook deployment is not ready yet")
	ErrWebhookCertificateFailure = fmt.Errorf("the cert-manager webhook CA bundle is not injected yet")
	ErrMutationWebhookMissing    = fmt.Errorf("the cert-manager mutation webhook did not mutate the dry-run CertificateRequest object")
	ErrValidatingWebhookMissing  = fmt.Errorf("the cert-manager validating webhook did not validate the dry-run CertificateRequest object")
	ErrMutationWebhookIncorrect  = fmt.Errorf("the cert-manager validating webhook failed because the dry-run CertificateRequest object was mutated incorrectly")

	ErrFailedToCheckAPI = fmt.Errorf("failed to check the cert-manager API")
)

Functions

func TranslateToSimpleError

func TranslateToSimpleError(err error) error

TranslateToSimpleError detects errors based on the error message. It tries to map these error messages to a better understandable error message that explains what is wrong. If it cannot create a simple error, it will return nil. ErrCertManagerCRDsNotFound: - error finding the scope of the object: failed to get restmapping: no matches for kind "Certificate" in group "cert-manager.io" ErrWebhookServiceFailure: - Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": service "cert-manager-webhook" not found ErrWebhookDeploymentFailure: - Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": dial tcp 10.96.38.90:443: connect: connection refused ErrWebhookCertificateFailure: - Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "cert-manager-webhook-ca") ErrMutationWebhookIncorrect: - admission webhook "webhook.cert-manager.io" denied the request: [spec.username: Forbidden: username identity must be that of the requester, spec.groups: Forbidden: groups identity must be that of the requester] ErrFailedToCheckAPI: - certificaterequests.cert-manager.io is forbidden: User "test" cannot create resource "certificaterequests" in API group "cert-manager.io" in the namespace "default" - admission webhook "validate.kyverno.svc-fail" denied the request: ...

Types

type Interface

type Interface interface {
	Check(context.Context) error
}

Interface is used to check that the cert-manager CRDs have been installed and are usable.

func New

func New(restcfg *rest.Config, namespace string) (Interface, error)

New returns a cert-manager API checker

func NewForConfigAndClient

func NewForConfigAndClient(restcfg *rest.Config, httpClient *http.Client, namespace string) (Interface, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL