Documentation ¶
Index ¶
- Constants
- func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
- func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodReadyConditionTrue(status corev1.PodStatus) bool
- type Helper
- func (h *Helper) Kubectl(ns string) *Kubectl
- func (h *Helper) ValidateIssuedCertificate(certificate *v1alpha1.Certificate, rootCAPEM []byte) (*x509.Certificate, error)
- func (h *Helper) WaitCertificateIssuedValid(ns, name string, timeout time.Duration) error
- func (h *Helper) WaitCertificateIssuedValidTLS(ns, name string, timeout time.Duration, rootCAPEM []byte) error
- func (h *Helper) WaitForAllPodsRunningInNamespace(ns string) error
- func (h *Helper) WaitForAllPodsRunningInNamespaceTimeout(ns string, timeout time.Duration) error
- func (h *Helper) WaitForCertificateNotReady(ns, name string, timeout time.Duration) (*v1alpha1.Certificate, error)
- func (h *Helper) WaitForCertificateReady(ns, name string, timeout time.Duration) (*v1alpha1.Certificate, error)
- type Kubectl
Constants ¶
const ( // Poll is how often the API is polled in Wait operations by default Poll = time.Second * 2 // PodStartTimeout is the default amount of time to wait in pod start operations PodStartTimeout = time.Minute * 2 )
Variables ¶
This section is empty.
Functions ¶
func GetPodCondition ¶
func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func GetPodReadyCondition ¶
func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.
func IsPodReady ¶
IsPodReady returns true if a pod is ready; false otherwise.
func IsPodReadyConditionTrue ¶
IsPodReadyConditionTrue returns true if a pod is ready; false otherwise.
Types ¶
type Helper ¶
type Helper struct { KubeClient kubernetes.Interface CMClient cmclient.Interface // contains filtered or unexported fields }
Helper provides methods for common operations needed during tests.
func (*Helper) ValidateIssuedCertificate ¶ added in v0.7.0
func (h *Helper) ValidateIssuedCertificate(certificate *v1alpha1.Certificate, rootCAPEM []byte) (*x509.Certificate, error)
ValidateIssuedCertificate will ensure that the given Certificate has a certificate issued for it, and that the details on the x509 certificate are correct as defined by the Certificate's spec.
func (*Helper) WaitCertificateIssuedValid ¶ added in v0.7.0
func (*Helper) WaitCertificateIssuedValidTLS ¶ added in v0.7.0
func (*Helper) WaitForAllPodsRunningInNamespace ¶
WaitForAllPodsRunningInNamespace waits default amount of time (PodStartTimeout) for all pods in the specified namespace to become running.
func (*Helper) WaitForAllPodsRunningInNamespaceTimeout ¶
func (*Helper) WaitForCertificateNotReady ¶ added in v0.7.0
func (h *Helper) WaitForCertificateNotReady(ns, name string, timeout time.Duration) (*v1alpha1.Certificate, error)
WaitForCertificateNotReady waits for the certificate resource to enter a non-Ready state.
func (*Helper) WaitForCertificateReady ¶ added in v0.7.0
func (h *Helper) WaitForCertificateReady(ns, name string, timeout time.Duration) (*v1alpha1.Certificate, error)
WaitForCertificateReady waits for the certificate resource to enter a Ready state.
type Kubectl ¶ added in v0.7.0
type Kubectl struct {
// contains filtered or unexported fields
}