k8s

package
v0.0.2-0...-dd1b7fa Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLatestDeploymentReplicaSetRevision

func GetLatestDeploymentReplicaSetRevision(kubeClient *kubeclient.Clientset, namespace, name string) (int64, error)

GetLatestDeploymentReplicaSetRevision gets the latest revision of replica sets of a deployment

func NewClientConfig

func NewClientConfig(config *ClientConfig) (*rest.Config, error)

NewClientConfig returns a configuration object that can be used to configure a client in order to contact an API server with.

Types

type ClientConfig

type ClientConfig struct {
	CertificateAuthority string
	ClientCertificate    string
	ClientKey            string
	Cluster              string
	Context              string
	Insecure             bool
	Kubeconfig           string
	Password             string
	Server               string
	Token                string
	User                 string
	Username             string
}

ClientConfig holds configuration options for API server clients.

type EventSource

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

EventSource produces Kubernetes events.

func NewEventSource

func NewEventSource(client *kubeclient.Clientset, namespace string) *EventSource

NewEventSource listens to kubernetes events in namespace. Call GetNewEvents periodically to retrieve batches of events.

func (*EventSource) GetNewEvents

func (source *EventSource) GetNewEvents() []*apiv1.Event

GetNewEvents returns the Kubernetes events that have been fired since the previous invocation of the function.

func (*EventSource) Start

func (source *EventSource) Start(cancel <-chan interface{})

Start starts watching for Kubernetes event. The cancel channel can be used to terminate the operation.

Jump to

Keyboard shortcuts

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