crt

package
v0.0.0-...-2907a6c Latest Latest
Warning

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

Go to latest
Published: May 16, 2017 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CertificateListAPIEndpoint  string = "/apis/giantswarm.io/v1/certificates"
	CertificateWatchAPIEndpoint string = "/apis/giantswarm.io/v1/watch/certificates"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Config

type Config struct {
	// Dependencies.
	CAService   *ca.Service
	Logger      micrologger.Logger
	K8sClient   kubernetes.Interface
	VaultClient *vaultapi.Client

	// Settings.
	Flag  *flag.Flag
	Viper *viper.Viper
}

Config represents the configuration used to create a Crt service.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig provides a default configuration to create a new create service by best effort.

type Service

type Service struct {
	Config
	// contains filtered or unexported fields
}

Service implements the Crt service interface.

func New

func New(config Config) (*Service, error)

New creates a new configured Crt service.

func (*Service) Boot

func (s *Service) Boot()

Boot starts the service and implements the watch for the certificate TPR.

func (*Service) CreateCertificate

func (s *Service) CreateCertificate(secret certificateSecret) error

CreateCertificate saves the certificate as a k8s secret.

func (*Service) DeleteCertificate

func (s *Service) DeleteCertificate(cert certificatetpr.Spec) error

DeleteCertificate deletes the k8s secret that stores the certificate.

func (*Service) Issue

func (s *Service) Issue(cert certificatetpr.Spec) error

Issue generates a certificate using the PKI backend signed by the certificate authority associated with the configured cluster ID. The certificate is saved as a set of k8s secrets.

Jump to

Keyboard shortcuts

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