podcompletion

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2024, NVIDIA CORPORATION & AFFILIATES

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	WaitForPodCompletionStartAnnot string = "maintenance.nvidia.com/wait-pod-completion-start-time"
)

Variables

View Source
var ErrPodCompletionTimeout = errors.New("PodCompletionTimeoutError")

ErrPodCompletionTimeout is a custom Error to convey that Pod completion timeout has reached.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// HandlePodCompletion handles waiting for pods to complete, returns list of pods that need to be waited or error if occurred.
	// a special PodCompletionTimeoutError is returned if timeout exceeded.
	HandlePodCompletion(ctx context.Context, reqLog logr.Logger, nm *maintenancev1.NodeMaintenance) ([]string, error)
}

Handler is an interface to handle waiting for pod completion for NodeMaintenance

func NewPodCompletionHandler

func NewPodCompletionHandler(c client.Client) Handler

NewPodCompletionHandler creates a new WaitPodCompletion Handler

Jump to

Keyboard shortcuts

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