registry

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPasswordLength = 20

Variables

This section is empty.

Functions

This section is empty.

Types

type CertParams

type CertParams struct {
	CommonName       string   `yaml:"common_name"`
	Organization     string   `yaml:"organization"`
	Organizations    []string `yaml:"organizations"`
	AlternativeNames []string `yaml:"alternative_names"`
	IsCA             bool     `yaml:"is_ca"`
	CAName           string   `yaml:"ca"`
	ExtKeyUsage      []string `yaml:"extended_key_usage"`
}

type CertResponse

type CertResponse struct {
	Certificate string `json:"certificate" yaml:"certificate"`
	PrivateKey  string `json:"private_key" yaml:"private_key"`
	CA          string `json:"ca"          yaml:"ca"`
}

type CertificateGenerator

type CertificateGenerator struct {
	// contains filtered or unexported fields
}

func NewCertificateGenerator

func NewCertificateGenerator(loader CertsLoader) CertificateGenerator

func (CertificateGenerator) Generate

func (cfg CertificateGenerator) Generate(cParams CertParams) (CertResponse, error)

type CertsLoader

type CertsLoader interface {
	LoadCerts(string) (*x509.Certificate, *rsa.PrivateKey, error)
}

type InMemoryCertificateStore

type InMemoryCertificateStore struct {
	// contains filtered or unexported fields
}

func NewInMemoryCertificateStore

func NewInMemoryCertificateStore() *InMemoryCertificateStore

func (*InMemoryCertificateStore) LoadCerts

func (*InMemoryCertificateStore) StoreCert

func (s *InMemoryCertificateStore) StoreCert(name string, resp CertResponse)

type Info

type Info struct {
	Address  string
	Username string
	Password string
	CA       string
}

type KnativeServing

type KnativeServing struct {
	// contains filtered or unexported fields
}

func (KnativeServing) IsInstalled

func (r KnativeServing) IsInstalled() (bool, error)

func (KnativeServing) UpdateControllerToUseHostCAs

func (r KnativeServing) UpdateControllerToUseHostCAs() error

UpdateControllerToUseHostCAs updates Knative Serving controller to pick up host CA certificates (which includes registry CA certificate) so that controller can resolve image digests by communicating with the registry. Eventually this would not be necessary as Knative Build will provide image digests as part of build result.

type Logger

type Logger interface {
	Error(tag, msg string, args ...interface{})
	Info(tag, msg string, args ...interface{})
	Debug(tag, msg string, args ...interface{})
}

type PasswordGenerator

type PasswordGenerator struct{}

func NewPasswordGenerator

func NewPasswordGenerator() PasswordGenerator

func (PasswordGenerator) Generate

func (PasswordGenerator) Generate(params PasswordParams) (string, error)

type PasswordParams

type PasswordParams struct {
	Length int `yaml:"length"`
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(coreClient kubernetes.Interface, namespace string, logger Logger) Registry

func (Registry) Info

func (r Registry) Info() (Info, error)

func (Registry) Install

func (r Registry) Install() error

func (Registry) Uninstall

func (r Registry) Uninstall() error

type SSLDirConfig

type SSLDirConfig struct {
	// contains filtered or unexported fields
}

func NewSSLDirConfig

func NewSSLDirConfig() SSLDirConfig

func (SSLDirConfig) ContainsEnvVar

func (c SSLDirConfig) ContainsEnvVar(envs []corev1.EnvVar) bool

func (SSLDirConfig) DockerVolume added in v0.0.6

func (c SSLDirConfig) DockerVolume() corev1.Volume

func (SSLDirConfig) DockerVolumeMount added in v0.0.6

func (c SSLDirConfig) DockerVolumeMount(readOnly bool) corev1.VolumeMount

func (SSLDirConfig) EnvVar

func (c SSLDirConfig) EnvVar() corev1.EnvVar

func (SSLDirConfig) Volume

func (c SSLDirConfig) Volume() corev1.Volume

func (SSLDirConfig) VolumeMount

func (c SSLDirConfig) VolumeMount(readOnly bool) corev1.VolumeMount

Jump to

Keyboard shortcuts

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