etcd

package
v3.11.0-0.34.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewREST

func NewREST(
	optsGetter generic.RESTOptionsGetter,
	registryHostname registryhostname.RegistryHostnameRetriever,
	subjectAccessReviewRegistry authorizationclient.SubjectAccessReviewInterface,
	limitVerifier imageadmission.LimitVerifier,
	registryWhitelister whitelist.RegistryWhitelister,
	imageLayerIndex ImageLayerIndex,
) (*REST, *LayersREST, *StatusREST, *InternalREST, error)

NewREST returns a new REST.

Types

type ImageLayerIndex

type ImageLayerIndex interface {
	HasSynced() bool
	GetByKey(key string) (item interface{}, exists bool, err error)
	Run(stopCh <-chan struct{})
}

ImageLayerIndex is a cache of image digests to the layers they contain. Because a very large number of images can exist on a cluster, we only hold in memory a small subset of the full image object.

func NewEmptyLayerIndex

func NewEmptyLayerIndex() ImageLayerIndex

func NewImageLayerIndex

func NewImageLayerIndex(lw ImageListWatch) ImageLayerIndex

NewImageLayerIndex creates a new index over a store that must return images.

type ImageLayers

type ImageLayers struct {
	Name            string
	ResourceVersion string
	MediaType       string
	Config          *imagev1.ImageLayer
	Layers          []imagev1.ImageLayer
}

ImageLayers is the minimal set of data we need to retain to provide the cache. Unlike a more general informer cache, we do not retain the full object because of the potential size of the objects being stored. Even a small cluster may have 20k or more images in active use.

func (*ImageLayers) DeepCopyObject

func (l *ImageLayers) DeepCopyObject() runtime.Object

func (*ImageLayers) GetAnnotations

func (l *ImageLayers) GetAnnotations() map[string]string

func (*ImageLayers) GetClusterName

func (l *ImageLayers) GetClusterName() string

func (*ImageLayers) GetCreationTimestamp

func (l *ImageLayers) GetCreationTimestamp() metav1.Time

func (*ImageLayers) GetDeletionGracePeriodSeconds

func (l *ImageLayers) GetDeletionGracePeriodSeconds() *int64

func (*ImageLayers) GetDeletionTimestamp

func (l *ImageLayers) GetDeletionTimestamp() *metav1.Time

func (*ImageLayers) GetFinalizers

func (l *ImageLayers) GetFinalizers() []string

func (*ImageLayers) GetGenerateName

func (l *ImageLayers) GetGenerateName() string

func (*ImageLayers) GetGeneration

func (l *ImageLayers) GetGeneration() int64

func (*ImageLayers) GetInitializers

func (l *ImageLayers) GetInitializers() *metav1.Initializers

func (*ImageLayers) GetLabels

func (l *ImageLayers) GetLabels() map[string]string

func (*ImageLayers) GetName

func (l *ImageLayers) GetName() string

func (*ImageLayers) GetNamespace

func (l *ImageLayers) GetNamespace() string

func (*ImageLayers) GetObjectKind

func (l *ImageLayers) GetObjectKind() schema.ObjectKind

func (*ImageLayers) GetOwnerReferences

func (l *ImageLayers) GetOwnerReferences() []metav1.OwnerReference

func (*ImageLayers) GetResourceVersion

func (l *ImageLayers) GetResourceVersion() string
func (l *ImageLayers) GetSelfLink() string

func (*ImageLayers) GetUID

func (l *ImageLayers) GetUID() types.UID

func (*ImageLayers) SetAnnotations

func (l *ImageLayers) SetAnnotations(annotations map[string]string)

func (*ImageLayers) SetClusterName

func (l *ImageLayers) SetClusterName(clusterName string)

func (*ImageLayers) SetCreationTimestamp

func (l *ImageLayers) SetCreationTimestamp(timestamp metav1.Time)

func (*ImageLayers) SetDeletionGracePeriodSeconds

func (l *ImageLayers) SetDeletionGracePeriodSeconds(*int64)

func (*ImageLayers) SetDeletionTimestamp

func (l *ImageLayers) SetDeletionTimestamp(timestamp *metav1.Time)

func (*ImageLayers) SetFinalizers

func (l *ImageLayers) SetFinalizers(finalizers []string)

func (*ImageLayers) SetGenerateName

func (l *ImageLayers) SetGenerateName(name string)

func (*ImageLayers) SetGeneration

func (l *ImageLayers) SetGeneration(generation int64)

func (*ImageLayers) SetInitializers

func (l *ImageLayers) SetInitializers(initializers *metav1.Initializers)

func (*ImageLayers) SetLabels

func (l *ImageLayers) SetLabels(labels map[string]string)

func (*ImageLayers) SetName

func (l *ImageLayers) SetName(name string)

func (*ImageLayers) SetNamespace

func (l *ImageLayers) SetNamespace(namespace string)

func (*ImageLayers) SetOwnerReferences

func (l *ImageLayers) SetOwnerReferences([]metav1.OwnerReference)

func (*ImageLayers) SetResourceVersion

func (l *ImageLayers) SetResourceVersion(version string)
func (l *ImageLayers) SetSelfLink(selfLink string)

func (*ImageLayers) SetUID

func (l *ImageLayers) SetUID(uid types.UID)

type ImageListWatch

type ImageListWatch interface {
	List(metav1.ListOptions) (*imagev1.ImageList, error)
	Watch(metav1.ListOptions) (watch.Interface, error)
}

type InternalREST

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

InternalREST implements the REST endpoint for changing both the spec and status of an image stream.

func (*InternalREST) Create

func (r *InternalREST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, _ bool) (runtime.Object, error)

Create alters both the spec and status of the object.

func (*InternalREST) New

func (r *InternalREST) New() runtime.Object

func (*InternalREST) Update

func (r *InternalREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) (runtime.Object, bool, error)

Update alters both the spec and status of the object.

type LayersREST

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

LayersREST implements the REST endpoint for changing both the spec and status of an image stream.

func (*LayersREST) Get

func (r *LayersREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

Get returns the layers for an image stream.

func (*LayersREST) New

func (r *LayersREST) New() runtime.Object

type LegacyREST

type LegacyREST struct {
	*REST
}

LegacyREST allows us to wrap and alter some behavior

func (*LegacyREST) Categories

func (r *LegacyREST) Categories() []string

type REST

type REST struct {
	*registry.Store
}

REST implements a RESTStorage for image streams against etcd.

func (*REST) Categories

func (r *REST) Categories() []string

Categories implements the CategoriesProvider interface. Returns a list of categories a resource is part of.

func (*REST) ShortNames

func (r *REST) ShortNames() []string

ShortNames implements the ShortNamesProvider interface. Returns a list of short names for a resource.

type StatusREST

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

StatusREST implements the REST endpoint for changing the status of an image stream.

func (*StatusREST) Get

func (r *StatusREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

Get retrieves the object from the storage. It is required to support Patch.

func (*StatusREST) New

func (r *StatusREST) New() runtime.Object

func (*StatusREST) Update

func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) (runtime.Object, bool, error)

Update alters the status subset of an object.

Jump to

Keyboard shortcuts

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