Documentation
¶
Index ¶
- Constants
- func CheckForNodeWithE2ELabel(ctx context.Context, k8s kubernetes.Interface, nodeName string) (*corev1.Node, error)
- func CordonNode(ctx context.Context, k8s kubernetes.Interface, node *corev1.Node, ...) error
- func CreateNginxPodInNode(ctx context.Context, k8s kubernetes.Interface, ...) error
- func CreatePod(ctx context.Context, k8s kubernetes.Interface, pod *corev1.Pod, ...) error
- func DeleteNode(ctx context.Context, k8s kubernetes.Interface, name string) error
- func DeletePod(ctx context.Context, k8s kubernetes.Interface, name, namespace string) error
- func DrainNode(ctx context.Context, k8s kubernetes.Interface, node *corev1.Node) error
- func EnsureNodeWithE2ELabelIsDeleted(ctx context.Context, k8s kubernetes.Interface, nodeName string) error
- func ExecPodWithRetries(ctx context.Context, config *restclient.Config, k8s kubernetes.Interface, ...) (stdout, stderr string, err error)
- func GetDaemonSet(ctx context.Context, logger logr.Logger, k8s kubernetes.Interface, ...) (*appsv1.DaemonSet, error)
- func GetNginxPodName(name string) string
- func GetNodeInternalIP(node *corev1.Node) string
- func GetPodLogsWithRetries(ctx context.Context, k8s kubernetes.Interface, name, namespace string) (logs string, err error)
- func IsPreviousVersionSupported(kubernetesVersion string) (bool, error)
- func NetworkUnavailableCondition(node *corev1.Node) *corev1.NodeCondition
- func NewServiceAccount(ctx context.Context, logger logr.Logger, k8s kubernetes.Interface, ...) error
- func NodeNetworkAvailable(node *corev1.Node) bool
- func PreviousVersion(kubernetesVersion string) (string, error)
- func RetryGet[O runtime.Object](ctx context.Context, getter Getter[O], name string) (O, error)
- func RetryList[O runtime.Object](ctx context.Context, lister Lister[O]) (O, error)
- func UncordonNode(ctx context.Context, k8s kubernetes.Interface, node *corev1.Node) error
- func WaitForDaemonSetPodToBeRunning(ctx context.Context, k8s kubernetes.Interface, ...) error
- func WaitForHybridNodeToBeNotReady(ctx context.Context, k8s kubernetes.Interface, nodeName string, ...) error
- func WaitForHybridNodeToBeReady(ctx context.Context, k8s kubernetes.Interface, nodeName string, ...) (*corev1.Node, error)
- func WaitForNamespaceToBeDeleted(ctx context.Context, k8s kubernetes.Interface, name string) error
- func WaitForNode(ctx context.Context, k8s kubernetes.Interface, nodeName string, ...) (*corev1.Node, error)
- func WaitForNodeToHaveVersion(ctx context.Context, k8s kubernetes.Interface, nodeName, targetVersion string, ...) (*corev1.Node, error)
- type ConformanceOption
- type ConformanceTest
- type Getter
- type Lister
- type VerifyNode
Constants ¶
const (
MinimumVersion = "1.26"
)
Variables ¶
This section is empty.
Functions ¶
func CheckForNodeWithE2ELabel ¶ added in v1.0.4
func CordonNode ¶
func CreateNginxPodInNode ¶
func DeleteNode ¶
func EnsureNodeWithE2ELabelIsDeleted ¶ added in v1.0.4
func ExecPodWithRetries ¶ added in v1.0.2
func ExecPodWithRetries(ctx context.Context, config *restclient.Config, k8s kubernetes.Interface, name, namespace string, cmd ...string) (stdout, stderr string, err error)
Retries up to 5 times to avoid connection errors
func GetDaemonSet ¶ added in v1.0.2
func GetNginxPodName ¶
func GetNodeInternalIP ¶ added in v1.0.4
func GetPodLogsWithRetries ¶ added in v1.0.2
func GetPodLogsWithRetries(ctx context.Context, k8s kubernetes.Interface, name, namespace string) (logs string, err error)
Retries up to 5 times to avoid connection errors
func NetworkUnavailableCondition ¶ added in v1.0.5
func NetworkUnavailableCondition(node *corev1.Node) *corev1.NodeCondition
func NewServiceAccount ¶ added in v1.0.3
func NodeNetworkAvailable ¶ added in v1.0.5
NodeNetworkAvailable returns true if the node has a network available condition with status false. If the condition is not present, although technically this mean it might have the a network available, it returns false. Most CNI will set this condition to true whenever they finish their setup. In particular, Cilium and Calico do it.
func PreviousVersion ¶
func RetryGet ¶ added in v1.0.5
RetryGet retries the get request until it succeeds or the retry limit is reached.
func RetryList ¶ added in v1.0.5
RetryList retries the list request until it succeeds or the retry limit is reached.
func UncordonNode ¶
func WaitForDaemonSetPodToBeRunning ¶ added in v1.0.4
func WaitForHybridNodeToBeReady ¶
func WaitForHybridNodeToBeReady(ctx context.Context, k8s kubernetes.Interface, nodeName string, logger logr.Logger) (*corev1.Node, error)
WaitForHybridNodeToBeReady will continue to poll until the node is: - marked ready - cilium-agent taint is removed (agent is ready on this node) - nodeNetworkAvailable is true - internal IP address is set
func WaitForNamespaceToBeDeleted ¶ added in v1.0.5
Types ¶
type ConformanceOption ¶ added in v1.0.5
type ConformanceOption func(*types.Configuration)
func WithOutputDir ¶ added in v1.0.5
func WithOutputDir(outputDir string) ConformanceOption
type ConformanceTest ¶ added in v1.0.5
type ConformanceTest struct {
Namespace string
// contains filtered or unexported fields
}
func NewConformanceTest ¶ added in v1.0.5
func NewConformanceTest(clientConfig *rest.Config, k8s *kubernetes.Clientset, logger logr.Logger, opts ...ConformanceOption) ConformanceTest
func (ConformanceTest) Cleanup ¶ added in v1.0.5
func (c ConformanceTest) Cleanup(ctx context.Context) error
func (ConformanceTest) CollectLogs ¶ added in v1.0.5
func (c ConformanceTest) CollectLogs(ctx context.Context) error
func (ConformanceTest) FetchExitCode ¶ added in v1.0.5
func (c ConformanceTest) FetchExitCode(ctx context.Context) (int, error)
type Getter ¶ added in v1.0.5
type Getter[O runtime.Object] interface { Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (O, error) }
Getter retrieves an object of type O from the Kubernetes API. It matches the Get signature of client-go clients.
type Lister ¶ added in v1.0.5
List retrieves a list of objects from the Kubernetes API. It matches the List signature of client-go clients.
type VerifyNode ¶
type VerifyNode struct {
ClientConfig *rest.Config
K8s clientgo.Interface
Logger logr.Logger
Region string
NodeName string
NodeIP string
}
VerifyNode checks that a node is healthy, can run pods, extract logs and run commands on them.