Documentation
¶
Index ¶
- func CreateNewCAIssuer(f *framework.Framework) (*cmmeta.ObjectReference, *CertBundle, IssuerCleanupFunc, error)
- func WaitForCertificateReady(f *framework.Framework, cert *cmapi.Certificate) error
- func WaitForPodReady(f *framework.Framework, pod *corev1.Pod) error
- type CertBundle
- type IssuerCleanupFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNewCAIssuer ¶
func CreateNewCAIssuer(f *framework.Framework) (*cmmeta.ObjectReference, *CertBundle, IssuerCleanupFunc, error)
CreateNewCAIssuer creates an issuer which can be used for an end-to-end test and cleaned up afterwards. Returns an issuerRef for the issuer, a bundle containing the issuer's data and a function to clean up all issuer resources. The cleanup function is always safe to call and should always be called after this function returns, regardless of whether it returned an error or not
func WaitForCertificateReady ¶
func WaitForCertificateReady(f *framework.Framework, cert *cmapi.Certificate) error
WaitForCertificateReady waits until the references Certificate resource is marked as ready
Types ¶
type CertBundle ¶
CertBundle holds PEM data read from a csi-driver-spiffe mounted volume
func ReadCertFromMountPath ¶
func ReadCertFromMountPath(f *framework.Framework, mountPath string, podName string, containerName string) (*CertBundle, error)
ReadCertFromMountPath uses kubectl exec to retrieve tls.crt, tls.key and ca.crt from a running pod
func ReadCertFromSecret ¶
func ReadCertFromSecret(f *framework.Framework, secretName string, secretNamespace string) (*CertBundle, error)
ReadCertFromSecret loads a certificate bundle from a Secret resource
func (*CertBundle) CheckNotEmpty ¶
func (cb *CertBundle) CheckNotEmpty() error
CheckNotEmpty returns an error if any of the PEM entries in the CertBundle are empty
type IssuerCleanupFunc ¶
type IssuerCleanupFunc func() error
IssuerCleanupFunc is called to clean up issuer related resources after a test. Any returned cleanup function should always be safe to call and should always be called at some point after the returning function regardless of whether that function returned an error or not
func CreateSelfSignedIssuer ¶
func CreateSelfSignedIssuer(f *framework.Framework) (*cmmeta.ObjectReference, IssuerCleanupFunc, error)
CreateSelfSignedIssuer creates a SelfSigned ClusterIssuer which can be used to in-turn create CA issuers for tests. Returns an issuerRef for the issuer and a cleanup function to remove the issuer after the test completes. The cleanup function is always safe to call and should always be called after this function returns, regardless of whether it returned an error or not