Documentation ¶
Overview ¶
Package deploylog provides a Registry interface for retrieving deployment logs
Index ¶
- Variables
- func DeploymentToPodLogOptions(opts *appsapi.DeploymentLogOptions) *corev1.PodLogOptions
- func GetFirstPod(client corev1client.PodsGetter, namespace string, selector string, ...) (*corev1.Pod, int, error)
- func WaitForRunningDeployerPod(podClient corev1client.PodsGetter, rc *corev1.ReplicationController, ...) error
- func WaitForRunningDeployment(rn corev1client.ReplicationControllersGetter, ...) (*corev1.ReplicationController, bool, error)
- type REST
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnknownDeploymentPhase is returned for WaitForRunningDeployment if an unknown phase is returned. ErrUnknownDeploymentPhase = errors.New("unknown deployment phase") ErrTooOldResourceVersion = errors.New("too old resource version") )
Functions ¶
func DeploymentToPodLogOptions ¶
func DeploymentToPodLogOptions(opts *appsapi.DeploymentLogOptions) *corev1.PodLogOptions
func GetFirstPod ¶
func GetFirstPod(client corev1client.PodsGetter, namespace string, selector string, timeout time.Duration, sortBy func([]*corev1.Pod) sort.Interface) (*corev1.Pod, int, error)
GetFirstPod returns a pod matching the namespace and label selector and the number of all pods that match the label selector.
func WaitForRunningDeployerPod ¶
func WaitForRunningDeployerPod(podClient corev1client.PodsGetter, rc *corev1.ReplicationController, timeout time.Duration) error
WaitForRunningDeployerPod waits a given period of time until the deployer pod for given replication controller is not running.
func WaitForRunningDeployment ¶
func WaitForRunningDeployment(rn corev1client.ReplicationControllersGetter, observed *corev1.ReplicationController, timeout time.Duration) (*corev1.ReplicationController, bool, error)
WaitForRunningDeployment waits until the specified deployment is no longer New or Pending. Returns true if the deployment became running, complete, or failed within timeout, false if it did not, and an error if any other error state occurred. The last observed deployment state is returned.
Types ¶
type REST ¶
type REST struct {
// contains filtered or unexported fields
}
REST is an implementation of RESTStorage for the api server.
func NewREST ¶
func NewREST(dcClient appsclient.DeploymentConfigsGetter, client kubernetes.Interface) *REST
NewREST creates a new REST for DeploymentLogs. It uses three clients: one for configs, one for deployments (replication controllers) and one for pods to get the necessary attributes to assemble the URL to which the request shall be redirected in order to get the deployment logs.