const ( ChaosdPkiName = "chaosd" // CertificateBlockType is a possible value for pem.Block.Type. CertificateBlockType = "CERTIFICATE" // CertificateValidity defines the validity for all the signed certificates generated by kubeadm CertificateValidity = time.Hour * 24 * 1825 )
func CreatePhysicalMachine(ctx context.Context, c client.Client, namespace, name, address string, labels map[string]string) error
func EncodeCertPEM(cert *x509.Certificate) []byte
EncodeCertPEM returns PEM-endcoded certificate data
func GetChaosdCAFileFromCluster(ctx context.Context, namespace string, c client.Client) (caCert *x509.Certificate, caKey crypto.Signer, err error)
func GetChaosdCAFileFromFile(caCertFile, caKeyFile string) (*x509.Certificate, crypto.Signer, error)
func NewCertAndKey(caCert *x509.Certificate, caKey crypto.Signer) (*x509.Certificate, crypto.Signer, error)
NewCertAndKey creates new certificate and key by passing the certificate authority certificate and key
func NewPhysicalMachineCreateCmd() (*cobra.Command, error)
func NewPhysicalMachineGenerateCmd() (*cobra.Command, error)
func NewPhysicalMachineInitCmd() (*cobra.Command, error)
func NewPrivateKey(keyType x509.PublicKeyAlgorithm) (crypto.Signer, error)
func NewSignedCert(key crypto.Signer, caCert *x509.Certificate, caKey crypto.Signer, isCA bool) (*x509.Certificate, error)
NewSignedCert creates a signed certificate using the given CA certificate and key
func ParseCert(data []byte) (*x509.Certificate, error)
func ParseCertAndKey(certData, keyData []byte) (*x509.Certificate, crypto.Signer, error)
func ParsePrivateKey(data []byte) (crypto.Signer, error)
func WriteCert(pkiPath, name string, cert *x509.Certificate) error
WriteCert stores the given certificate at the given location
func WriteCertAndKey(pkiPath string, name string, cert *x509.Certificate, key crypto.Signer) error
WriteCertAndKey stores certificate and key at the specified location
func WriteKey(pkiPath, name string, key crypto.Signer) error
WriteKey stores the given key at the given location
type PhysicalMachineCreateOptions struct {
// contains filtered or unexported fields
}
func (o *PhysicalMachineCreateOptions) Run(args []string) error
func (o *PhysicalMachineCreateOptions) Validate() error
type PhysicalMachineGenerateOptions struct {
// contains filtered or unexported fields
}
func (o *PhysicalMachineGenerateOptions) Run() error
func (o *PhysicalMachineGenerateOptions) Validate() error
type PhysicalMachineInitOptions struct {
// contains filtered or unexported fields
}
func (o *PhysicalMachineInitOptions) Run(args []string) error
func (o *PhysicalMachineInitOptions) Validate() error
type SshTunnel struct {
// contains filtered or unexported fields
}
func NewSshTunnel(ip, port string, user, privateKeyFile string) (*SshTunnel, error)
func (s *SshTunnel) Close() error
func (s *SshTunnel) Open() error
func (s *SshTunnel) SFTP(filename string, data []byte) error