config

package
v0.17.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const STATE_DELETED = "~DELETED~"

Variables

This section is empty.

Functions

func PrintConfigEnv

func PrintConfigEnv()

Types

type Config

type Config struct {
	Issuers []*IssuerConfig `json:"issuers"`

	KubeConfig    string
	Namespace     string
	DNSKubeConfig string
	DNSDomain     string
	Utils         *TestUtils
}

func InitConfig

func InitConfig() *Config

func LoadConfig

func LoadConfig(filename string) (*Config, error)

type ExternalAccountBinding added in v0.12.0

type ExternalAccountBinding struct {
	KeyID   string `json:"keyID"`
	HmacKey string `json:"hmacKey"`
}

type IssuerConfig

type IssuerConfig struct {
	Name                       string                  `json:"name"`
	Type                       string                  `json:"type"`
	AutoRegistration           bool                    `json:"autoRegistration"`
	Server                     string                  `json:"server,omitempty"`
	PrecheckNameservers        []string                `json:"precheckNameservers,omitempty"`
	Email                      string                  `json:"email,omitempty"`
	ExternalAccountBinding     *ExternalAccountBinding `json:"externalAccountBinding,omitempty"`
	SkipDNSChallengeValidation bool                    `json:"skipDNSChallengeValidation,omitempty"`
	PrivateKey                 string                  `json:"privateKey,omitempty"`
	SkipRevokeWithRenewal      bool                    `json:"skipRevokeWithRenewal,omitempty"`

	Namespace string
	Domain    string
}

func (*IssuerConfig) CreateTempManifest

func (p *IssuerConfig) CreateTempManifest(name, templateContent string) (string, error)

func (*IssuerConfig) DeleteTempManifest

func (p *IssuerConfig) DeleteTempManifest(filename string)

type TestUtils

type TestUtils struct {
	AwaitTimeout  time.Duration
	PollingPeriod time.Duration
	Namespace     string
	Verbose       bool
	Client        client.Client
}

func CreateDefaultTestUtils

func CreateDefaultTestUtils() (*TestUtils, error)

func (*TestUtils) CheckCertificatePrivateKey added in v0.13.0

func (u *TestUtils) CheckCertificatePrivateKey(secretName string, algorithm x509.PublicKeyAlgorithm, keySize int) error

func (*TestUtils) GetAllCertificates added in v0.17.0

func (u *TestUtils) GetAllCertificates(ctx context.Context) (map[string]v1alpha1.Certificate, error)

func (*TestUtils) GetSecret added in v0.17.0

func (u *TestUtils) GetSecret(name string) (*corev1.Secret, error)

func (*TestUtils) KubectlApply

func (u *TestUtils) KubectlApply(filename string) error

func (*TestUtils) KubectlDelete

func (u *TestUtils) KubectlDelete(filename string) error

func (*TestUtils) KubectlGetAllCertificatesPlain added in v0.16.0

func (u *TestUtils) KubectlGetAllCertificatesPlain() (string, error)

func (*TestUtils) KubectlGetAllIssuers added in v0.16.0

func (u *TestUtils) KubectlGetAllIssuers() (string, error)

func (*TestUtils) KubectlPlain added in v0.16.0

func (u *TestUtils) KubectlPlain(cmdline string) (string, error)

func (*TestUtils) LogVerbose

func (u *TestUtils) LogVerbose(output string)

func (*TestUtils) WaitUntilCRDsReady added in v0.17.0

func (u *TestUtils) WaitUntilCRDsReady(ctx context.Context, crds ...string) error

func (*TestUtils) WaitUntilCertDeleted added in v0.17.0

func (u *TestUtils) WaitUntilCertDeleted(ctx context.Context, names ...string) error

func (*TestUtils) WaitUntilCertError added in v0.17.0

func (u *TestUtils) WaitUntilCertError(ctx context.Context, names ...string) error

func (*TestUtils) WaitUntilCertReady added in v0.17.0

func (u *TestUtils) WaitUntilCertReady(ctx context.Context, names ...string) error

func (*TestUtils) WaitUntilCertRevocationApplied added in v0.17.0

func (u *TestUtils) WaitUntilCertRevocationApplied(ctx context.Context, name string) error

func (*TestUtils) WaitUntilCertRevoked added in v0.17.0

func (u *TestUtils) WaitUntilCertRevoked(ctx context.Context, names ...string) error

func (*TestUtils) WaitUntilCertState added in v0.17.0

func (u *TestUtils) WaitUntilCertState(ctx context.Context, expectedState string, names ...string) error

WaitUntilCertState takes names of Certificates and waits for them to get ready with a timeout of 15 seconds.

func (*TestUtils) WaitUntilCertificateRevocationState added in v0.17.0

func (u *TestUtils) WaitUntilCertificateRevocationState(ctx context.Context, expectedState string, names ...string) error

WaitUntilCertificateRevocationState takes names of CertificateRevocations and waits for them to get ready with a timeout of 15 seconds.

func (*TestUtils) WaitUntilIssuerDeleted added in v0.17.0

func (u *TestUtils) WaitUntilIssuerDeleted(ctx context.Context, names ...string) error

func (*TestUtils) WaitUntilIssuerReady added in v0.17.0

func (u *TestUtils) WaitUntilIssuerReady(ctx context.Context, names ...string) error

func (*TestUtils) WaitUntilIssuerState added in v0.17.0

func (u *TestUtils) WaitUntilIssuerState(ctx context.Context, expectedState string, names ...string) error

WaitUntilIssuerState takes names of Issuer and waits for them to get ready with a timeout of 15 seconds.

Jump to

Keyboard shortcuts

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