certgen

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package certgen contains the code that handles the `certgen` subcommand for the main `contour` binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCA

func NewCA(cn string, expiry time.Time) ([]byte, []byte, error)

NewCA generates a new CA, given the CA's CN and an expiry time. The return order is cacert, cakey, error.

func NewCert

func NewCert(caCertPEM, caKeyPEM []byte, expiry time.Time, service, namespace string) ([]byte, []byte, error)

NewCert generates a new keypair given the CA keypair, the expiry time, the service name ("contour" or "envoy"), and the Kubernetes namespace the service will run in (because of the Kubernetes DNS schema.) The return values are cert, key, err.

func WriteCertsPEM

func WriteCertsPEM(outputDir string, certdata map[string][]byte) error

WriteCertsPEM writes out all the certs in certdata to individual PEM files in outputDir

func WriteSecretsKube

func WriteSecretsKube(client *kubernetes.Clientset, namespace string, certdata map[string][]byte) error

WriteSecretsKube writes all the keypairs out to Kube Secrets in the passed Kube context.

func WriteSecretsYAML

func WriteSecretsYAML(outputDir, namespace string, certdata map[string][]byte) error

WriteSecretsYAML writes all the keypairs out to Kube Secrets in YAML form in outputDir. The CA Secret only contains the cert.

Types

This section is empty.

Jump to

Keyboard shortcuts

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