Documentation ¶
Overview ¶
Package providers implements generic certificate provider related functionality
Index ¶
- Variables
- func GetCertFromKubernetes(ns string, secretName string, kubeClient kubernetes.Interface) (*certificate.Certificate, error)
- func GetCertificateFromSecret(ns string, secretName string, cert *certificate.Certificate, ...) (*certificate.Certificate, error)
- func ValidateCertManagerOptions(options CertManagerOptions) error
- func ValidateTresorOptions(options TresorOptions) error
- func ValidateVaultOptions(options VaultOptions) error
- type CertManagerOptions
- type Config
- type Kind
- type TresorOptions
- type VaultOptions
Constants ¶
This section is empty.
Variables ¶
var ( // ValidCertificateProviders is the list of supported certificate providers ValidCertificateProviders = []Kind{TresorKind, VaultKind, CertManagerKind} )
Functions ¶
func GetCertFromKubernetes ¶
func GetCertFromKubernetes(ns string, secretName string, kubeClient kubernetes.Interface) (*certificate.Certificate, error)
GetCertFromKubernetes is a helper function that loads a certificate from a Kubernetes secret The function returns an error only if a secret is found with invalid data.
func GetCertificateFromSecret ¶
func GetCertificateFromSecret(ns string, secretName string, cert *certificate.Certificate, kubeClient kubernetes.Interface) (*certificate.Certificate, error)
GetCertificateFromSecret is a helper function that ensures creation and synchronization of a certificate using Kubernetes Secrets backend and API atomicity.
func ValidateCertManagerOptions ¶
func ValidateCertManagerOptions(options CertManagerOptions) error
ValidateCertManagerOptions validates the options for cert-manager.io certificate provider
func ValidateTresorOptions ¶
func ValidateTresorOptions(options TresorOptions) error
ValidateTresorOptions validates the options for Tresor certificate provider
func ValidateVaultOptions ¶
func ValidateVaultOptions(options VaultOptions) error
ValidateVaultOptions validates the options for Hashi Vault certificate provider
Types ¶
type CertManagerOptions ¶
CertManagerOptions is a type that specifies 'cert-manager.io' certificate provider options
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is a type that stores config related to certificate providers and implements generic utility functions
func NewCertificateProvider ¶
func NewCertificateProvider(kubeClient kubernetes.Interface, kubeConfig *rest.Config, cfg configurator.Configurator, providerKind Kind, providerNamespace string, caBundleSecretName string, tresorOptions TresorOptions, vaultOptions VaultOptions, certManagerOptions CertManagerOptions, msgBroker *messaging.Broker) (certificate.Manager, debugger.CertificateManagerDebugger, *Config, error)
NewCertificateProvider returns a new certificate provider and associated config
func NewCertificateProviderConfig ¶
func NewCertificateProviderConfig(kubeClient kubernetes.Interface, kubeConfig *rest.Config, cfg configurator.Configurator, providerKind Kind, providerNamespace string, caBundleSecretName string, tresorOptions TresorOptions, vaultOptions VaultOptions, certManagerOptions CertManagerOptions, msgBroker *messaging.Broker) *Config
NewCertificateProviderConfig returns a new certificate provider config
func (*Config) GetCertificateManager ¶
func (c *Config) GetCertificateManager() (certificate.Manager, debugger.CertificateManagerDebugger, error)
GetCertificateManager returns the certificate manager/provider instance
type Kind ¶
type Kind string
Kind specifies the certificate provider kind
const ( // TresorKind represents Tresor, an internal package which leverages Kubernetes secrets and signs certs on the OSM pod TresorKind Kind = "tresor" // VaultKind represents Hashi Vault; OSM is pointed to an external Vault; signing of certs happens on Vault VaultKind Kind = "vault" // CertManagerKind represents cert-manager.io; certificates are requested using cert-manager CertManagerKind Kind = "cert-manager" )
type TresorOptions ¶
type TresorOptions struct { }
TresorOptions is a type that specifies 'Tresor' certificate provider options
Directories ¶
Path | Synopsis |
---|---|
Package certmanager implements the certificate.Manager interface for cert-manager.io as the certificate provider.
|
Package certmanager implements the certificate.Manager interface for cert-manager.io as the certificate provider. |
Package tresor implements the certificate.Manager interface for Tresor, a custom certificate provider in OSM.
|
Package tresor implements the certificate.Manager interface for Tresor, a custom certificate provider in OSM. |
Package vault implements the certificate.Manager interface for Hashicorp Vault as the certificate provider.
|
Package vault implements the certificate.Manager interface for Hashicorp Vault as the certificate provider. |