kube

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = filepath.Join(homedir.HomeDir(), ".kube", "config")

Functions

func EqualIgnoreHash

func EqualIgnoreHash(template1, template2 *v1.PodTemplateSpec) bool

EqualIgnoreHash returns true if two given podTemplateSpec are equal, ignoring the diff in value of Labels[pod-template-hash] We ignore pod-template-hash because:

  1. The hash result would be different upon podTemplateSpec API changes (e.g. the addition of a new field will cause the hash code to change)
  2. The deployment template won't have hash labels

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(out io.Writer) (*Client, error)

func (*Client) WaitForResources

func (c *Client) WaitForResources(timeout time.Duration, resources []*manifest.MappingResult) error

WaitForResources polls to get the current status of all deployments and stateful sets until they are ready or a timeout is reached

type ReplicaSetsByCreationTimestamp

type ReplicaSetsByCreationTimestamp []*appsv1.ReplicaSet

ReplicaSetsByCreationTimestamp sorts a list of ReplicaSet by creation timestamp, using their names as a tie breaker.

func (ReplicaSetsByCreationTimestamp) Len

func (ReplicaSetsByCreationTimestamp) Less

func (ReplicaSetsByCreationTimestamp) Swap

func (o ReplicaSetsByCreationTimestamp) Swap(i, j int)

type RsListFunc

type RsListFunc func(string, metav1.ListOptions) ([]*appsv1.ReplicaSet, error)

RsListFunc returns the ReplicaSet from the ReplicaSet namespace and the List metav1.ListOptions.

Jump to

Keyboard shortcuts

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