etcd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPKIDir = "/etc/kubernetes/pki/"

	DefaultEtcdCACertPath = defautEtcdPKIDir + "/" + defaultEtcdCACertName
)

Variables

This section is empty.

Functions

func CreateAsCA

func CreateAsCA(cfg *certutil.Config) (*x509.Certificate, crypto.Signer, error)

CreateAsCA creates a certificate authority, returning the created CA so it can be used to sign child certs.

func CreateFromCA

func CreateFromCA(cfg *certutil.Config, caCrt *x509.Certificate, caKey crypto.Signer) (encodedKey, encodedCrt []byte, err error)

func FetchEtcdCertAndKey

func FetchEtcdCertAndKey(etcdNode *pb.Node, baseName string) (*x509.Certificate, crypto.Signer, error)

func GetAPIServerClientCrtConfig

func GetAPIServerClientCrtConfig() *certutil.Config

func GetCaCrtConfig

func GetCaCrtConfig() *certutil.Config

func GetPeerCrtConfig

func GetPeerCrtConfig(hostName, IP string) (*certutil.Config, error)

func GetServerCrtConfig

func GetServerCrtConfig(hostName, IP string) (*certutil.Config, error)

func NewDeployEtcdOperation

func NewDeployEtcdOperation(config *DeployEtcdOperationConfig) (*deployEtcdOperation, error)

func ToByte

func ToByte(crt *x509.Certificate, key crypto.Signer) (encodedKey, encodedCrt []byte, err error)

Types

type DeployEtcdOperationConfig

type DeployEtcdOperationConfig struct {
	Logger       *logrus.Entry
	CACrt        *x509.Certificate
	CAKey        crypto.Signer
	Node         *pb.Node
	ClusterNodes []*pb.Node
}

Jump to

Keyboard shortcuts

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