corev1

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPodTerminated = errors.New("pod terminated")
	ErrPodRunning    = errors.New("pod running")
	ErrPodWaiting    = errors.New("pod waiting to start")

	ErrPodContainerTerminated = errors.New("container terminated")
	ErrPodContainerWaiting    = errors.New("container waiting to start")
)
View Source
var (
	ErrNotOpaqueSecret                = errors.New("secret is not an unstructured opaque secret")
	ErrNotImagePullSecret             = errors.New("secret is not usable for pulling container images")
	ErrNotServiceAccountTokenSecret   = errors.New("secret is not usable for service accounts")
	ErrServiceAccountTokenMissingData = errors.New("service account token secret has no token data")
	ErrNotTLSSecret                   = errors.New("secret is not usable for TLS")
)
View Source
var (
	ConfigMapKind = corev1.SchemeGroupVersion.WithKind("ConfigMap")
)
View Source
var (
	EndpointsKind = corev1.SchemeGroupVersion.WithKind("Endpoints")
)
View Source
var (
	ErrEndpointsNotBound = errors.New("endpoints not bound")
)
View Source
var (
	ErrServiceAccountMissingDefaultTokenSecret = errors.New("service account has no default token secret")
)
View Source
var (
	LimitRangeKind = corev1.SchemeGroupVersion.WithKind("LimitRange")
)
View Source
var (
	NamespaceKind = corev1.SchemeGroupVersion.WithKind("Namespace")
)
View Source
var (
	NodeKind = corev1.SchemeGroupVersion.WithKind("Node")
)
View Source
var (
	PersistentVolumeClaimKind = corev1.SchemeGroupVersion.WithKind("PersistentVolumeClaim")
)
View Source
var (
	PersistentVolumeKind = corev1.SchemeGroupVersion.WithKind("PersistentVolume")
)
View Source
var (
	PodKind = corev1.SchemeGroupVersion.WithKind("Pod")
)
View Source
var (
	SecretKind = corev1.SchemeGroupVersion.WithKind("Secret")
)
View Source
var (
	ServiceAccountKind = corev1.SchemeGroupVersion.WithKind("ServiceAccount")
)
View Source
var (
	ServiceKind = corev1.SchemeGroupVersion.WithKind("Service")
)

Functions

func NewConfigMapPatcher

func NewConfigMapPatcher(upd, orig *ConfigMap) lifecycle.Persister

func NewEndpointsBoundPoller

func NewEndpointsBoundPoller(eps *Endpoints) lifecycle.RetryLoader

func NewImagePullSecretPatcher

func NewImagePullSecretPatcher(upd, orig *ImagePullSecret) lifecycle.Persister

func NewLimitRangePatcher

func NewLimitRangePatcher(upd, orig *LimitRange) lifecycle.Persister

func NewNamespacePatcher

func NewNamespacePatcher(upd, orig *Namespace) lifecycle.Persister

func NewNodePatcher added in v0.6.0

func NewNodePatcher(upd, orig *Node) lifecycle.Persister

func NewOpaqueSecretPatcher

func NewOpaqueSecretPatcher(upd, orig *OpaqueSecret) lifecycle.Persister

func NewPersistentVolumeClaimPatcher

func NewPersistentVolumeClaimPatcher(upd, orig *PersistentVolumeClaim) lifecycle.Persister

func NewPersistentVolumePatcher

func NewPersistentVolumePatcher(upd, orig *PersistentVolume) lifecycle.Persister

func NewPodContainerRunningPoller added in v0.7.0

func NewPodContainerRunningPoller(pod *Pod, name string) lifecycle.RetryLoader

func NewPodPatcher

func NewPodPatcher(upd, orig *Pod) lifecycle.Persister

func NewPodRunningPoller

func NewPodRunningPoller(pod *Pod) lifecycle.RetryLoader

func NewPodTerminatedPoller added in v0.2.0

func NewPodTerminatedPoller(pod *Pod) lifecycle.RetryLoader

func NewSecretPatcher

func NewSecretPatcher(upd, orig *Secret) lifecycle.Persister

func NewServiceAccountPatcher

func NewServiceAccountPatcher(upd, orig *ServiceAccount) lifecycle.Persister

func NewServiceAccountTokenSecretPatcher

func NewServiceAccountTokenSecretPatcher(upd, orig *ServiceAccountTokenSecret) lifecycle.Persister

func NewServiceAccountTokenSecretsDefaultPresentPoller

func NewServiceAccountTokenSecretsDefaultPresentPoller(sats *ServiceAccountTokenSecrets) lifecycle.RetryLoader

func NewServicePatcher

func NewServicePatcher(upd, orig *Service) lifecycle.Persister

Types

type ConfigMap

type ConfigMap struct {
	*helper.NamespaceScopedAPIObject

	Key    client.ObjectKey
	Object *corev1.ConfigMap
}

func NewConfigMap

func NewConfigMap(key client.ObjectKey) *ConfigMap

func NewConfigMapFromObject

func NewConfigMapFromObject(obj *corev1.ConfigMap) *ConfigMap

func (*ConfigMap) Copy

func (cm *ConfigMap) Copy() *ConfigMap

type Endpoints

type Endpoints struct {
	Service *Service
	Object  *corev1.Endpoints
}

func NewEndpoints

func NewEndpoints(svc *Service) *Endpoints

func (*Endpoints) Bound

func (e *Endpoints) Bound() bool

func (*Endpoints) Load

func (e *Endpoints) Load(ctx context.Context, cl client.Client) (bool, error)

type ImagePullSecret

type ImagePullSecret struct {
	*Secret
}

func NewImagePullSecret

func NewImagePullSecret(key client.ObjectKey) *ImagePullSecret

func (*ImagePullSecret) Copy

func (ips *ImagePullSecret) Copy() *ImagePullSecret

func (*ImagePullSecret) CopyFrom

func (ips *ImagePullSecret) CopyFrom(src *ImagePullSecret)

func (*ImagePullSecret) Load

func (ips *ImagePullSecret) Load(ctx context.Context, cl client.Client) (bool, error)

type LimitRange

type LimitRange struct {
	*helper.NamespaceScopedAPIObject

	Key    client.ObjectKey
	Object *corev1.LimitRange
}

func NewLimitRange

func NewLimitRange(key client.ObjectKey) *LimitRange

func NewLimitRangeFromObject

func NewLimitRangeFromObject(obj *corev1.LimitRange) *LimitRange

func (*LimitRange) Copy

func (lr *LimitRange) Copy() *LimitRange

func (*LimitRange) MergeItem

func (lr *LimitRange) MergeItem(item corev1.LimitRangeItem)

func (*LimitRange) SetContainerDefault

func (lr *LimitRange) SetContainerDefault(lim corev1.ResourceList)

func (*LimitRange) SetContainerDefaultRequest

func (lr *LimitRange) SetContainerDefaultRequest(lim corev1.ResourceList)

func (*LimitRange) SetContainerMax

func (lr *LimitRange) SetContainerMax(lim corev1.ResourceList)

type Namespace

type Namespace struct {
	*helper.ClusterScopedAPIObject

	Name   string
	Object *corev1.Namespace
}

func NewNamespace

func NewNamespace(name string) *Namespace

func NewNamespaceFromObject

func NewNamespaceFromObject(obj *corev1.Namespace) *Namespace

func (*Namespace) Copy

func (n *Namespace) Copy() *Namespace

type Node added in v0.6.0

type Node struct {
	*helper.ClusterScopedAPIObject

	Name   string
	Object *corev1.Node
}

func NewNode added in v0.6.0

func NewNode(name string) *Node

func NewNodeFromObject added in v0.6.0

func NewNodeFromObject(obj *corev1.Node) *Node

func (*Node) Copy added in v0.6.0

func (n *Node) Copy() *Node

type OpaqueSecret

type OpaqueSecret struct {
	*Secret
}

func NewOpaqueSecret

func NewOpaqueSecret(key client.ObjectKey) *OpaqueSecret

func (*OpaqueSecret) Copy

func (os *OpaqueSecret) Copy() *OpaqueSecret

func (*OpaqueSecret) Data

func (os *OpaqueSecret) Data(key string) (string, bool)

func (*OpaqueSecret) Load

func (os *OpaqueSecret) Load(ctx context.Context, cl client.Client) (bool, error)

type PersistentVolume

type PersistentVolume struct {
	*helper.ClusterScopedAPIObject

	Name   string
	Object *corev1.PersistentVolume
}

func NewPersistentVolume

func NewPersistentVolume(name string) *PersistentVolume

func NewPersistentVolumeFromObject

func NewPersistentVolumeFromObject(obj *corev1.PersistentVolume) *PersistentVolume

func (*PersistentVolume) Copy

func (pv *PersistentVolume) Copy() *PersistentVolume

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	*helper.NamespaceScopedAPIObject

	Key    client.ObjectKey
	Object *corev1.PersistentVolumeClaim
}

func NewPersistentVolumeClaim

func NewPersistentVolumeClaim(key client.ObjectKey) *PersistentVolumeClaim

func NewPersistentVolumeClaimFromObject

func NewPersistentVolumeClaimFromObject(obj *corev1.PersistentVolumeClaim) *PersistentVolumeClaim

func (*PersistentVolumeClaim) Copy

type Pod

type Pod struct {
	*helper.NamespaceScopedAPIObject

	Key    client.ObjectKey
	Object *corev1.Pod
}

func NewPod

func NewPod(key client.ObjectKey) *Pod

func NewPodFromObject

func NewPodFromObject(obj *corev1.Pod) *Pod

func (*Pod) ContainerRunning added in v0.7.0

func (p *Pod) ContainerRunning(name string) bool

func (*Pod) ContainerStatus added in v0.7.0

func (p *Pod) ContainerStatus(name string) (corev1.ContainerStatus, bool)

func (*Pod) ContainerTerminated added in v0.7.0

func (p *Pod) ContainerTerminated(name string) bool

func (*Pod) Copy

func (p *Pod) Copy() *Pod

func (*Pod) Phase

func (p *Pod) Phase() corev1.PodPhase

func (*Pod) Running

func (p *Pod) Running() bool

func (*Pod) Terminated

func (p *Pod) Terminated() bool

type Secret

type Secret struct {
	*helper.NamespaceScopedAPIObject

	Key    client.ObjectKey
	Object *corev1.Secret
}

func NewSecret

func NewSecret(key client.ObjectKey) *Secret

func NewSecretFromObject

func NewSecretFromObject(obj *corev1.Secret) *Secret

func (*Secret) Copy

func (s *Secret) Copy() *Secret

type Service

type Service struct {
	*helper.NamespaceScopedAPIObject

	Key    client.ObjectKey
	Object *corev1.Service
}

func NewService

func NewService(key client.ObjectKey) *Service

func NewServiceFromObject

func NewServiceFromObject(obj *corev1.Service) *Service

func (*Service) Copy

func (s *Service) Copy() *Service

func (*Service) DNSName

func (s *Service) DNSName() string

type ServiceAccount

type ServiceAccount struct {
	*helper.NamespaceScopedAPIObject

	Key    client.ObjectKey
	Object *corev1.ServiceAccount
}

func NewServiceAccount

func NewServiceAccount(key client.ObjectKey) *ServiceAccount

func NewServiceAccountFromObject

func NewServiceAccountFromObject(obj *corev1.ServiceAccount) *ServiceAccount

func (*ServiceAccount) Copy

func (sa *ServiceAccount) Copy() *ServiceAccount

type ServiceAccountTokenSecret

type ServiceAccountTokenSecret struct {
	*Secret
}

func NewServiceAccountTokenSecret

func NewServiceAccountTokenSecret(key client.ObjectKey) *ServiceAccountTokenSecret

func (*ServiceAccountTokenSecret) Copy

func (*ServiceAccountTokenSecret) Load

func (*ServiceAccountTokenSecret) Token

func (sats *ServiceAccountTokenSecret) Token() (string, error)

type ServiceAccountTokenSecrets

type ServiceAccountTokenSecrets struct {
	ServiceAccount *ServiceAccount

	DefaultTokenSecret     *ServiceAccountTokenSecret
	AdditionalTokenSecrets []*ServiceAccountTokenSecret
}

func NewServiceAccountTokenSecrets

func NewServiceAccountTokenSecrets(sa *ServiceAccount) *ServiceAccountTokenSecrets

func (*ServiceAccountTokenSecrets) Load

type TLSSecret

type TLSSecret struct {
	*Secret
}

func NewTLSSecret

func NewTLSSecret(key client.ObjectKey) *TLSSecret

func (*TLSSecret) Certificate

func (ts *TLSSecret) Certificate() (tls.Certificate, error)

Certificate returns the TLS certificate encoded in this secret. If the secret contains a ca.crt key that does not also exist in the tls.crt, it will be appended to the certificate bundle.

func (*TLSSecret) Copy

func (ts *TLSSecret) Copy() *TLSSecret

func (*TLSSecret) Load

func (ts *TLSSecret) Load(ctx context.Context, cl client.Client) (bool, error)

Jump to

Keyboard shortcuts

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