config

package
v0.14.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const STATE_DELETED = "~DELETED~"

Variables

This section is empty.

Functions

func PrintConfigEnv

func PrintConfigEnv()

Types

type CheckFunc

type CheckFunc func() (bool, error)

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"`
	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
}

func CreateDefaultTestUtils

func CreateDefaultTestUtils() *TestUtils

func (*TestUtils) Await

func (u *TestUtils) Await(msg string, check CheckFunc) error

func (*TestUtils) AwaitCertDeleted

func (u *TestUtils) AwaitCertDeleted(names ...string) error

func (*TestUtils) AwaitCertError

func (u *TestUtils) AwaitCertError(names ...string) error

func (*TestUtils) AwaitCertReady

func (u *TestUtils) AwaitCertReady(names ...string) error

func (*TestUtils) AwaitCertRevocationApplied added in v0.12.0

func (u *TestUtils) AwaitCertRevocationApplied(name string) error

func (*TestUtils) AwaitCertRevoked added in v0.12.0

func (u *TestUtils) AwaitCertRevoked(names ...string) error

func (*TestUtils) AwaitIssuerDeleted

func (u *TestUtils) AwaitIssuerDeleted(names ...string) error

func (*TestUtils) AwaitIssuerReady

func (u *TestUtils) AwaitIssuerReady(names ...string) error

func (*TestUtils) AwaitKubectlGetCRDs

func (u *TestUtils) AwaitKubectlGetCRDs(crds ...string) error

func (*TestUtils) AwaitState

func (u *TestUtils) AwaitState(resourceName, expectedState string, names ...string) error

func (*TestUtils) AwaitWithTimeout

func (u *TestUtils) AwaitWithTimeout(msg string, check CheckFunc, timeout time.Duration) error

func (*TestUtils) CheckCertificatePrivateKey added in v0.13.0

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

func (*TestUtils) KubectlApply

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

func (*TestUtils) KubectlDelete

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

func (*TestUtils) KubectlGetAllCertificates

func (u *TestUtils) KubectlGetAllCertificates() (map[string]interface{}, error)

func (*TestUtils) KubectlGetSecret added in v0.12.0

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

func (*TestUtils) LogVerbose

func (u *TestUtils) LogVerbose(output string)

Jump to

Keyboard shortcuts

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