package rest

import "k8s.io/kubernetes/pkg/registry/extensions/rest"

Index

Functions

func GetThirdPartyGroupName

func GetThirdPartyGroupName(path string) string

func MakeThirdPartyPath

func MakeThirdPartyPath(group string) string

Types

type RESTStorageProvider

type RESTStorageProvider struct {
	ResourceInterface ResourceInterface
}

func (RESTStorageProvider) GroupName

func (p RESTStorageProvider) GroupName() string

func (RESTStorageProvider) NewRESTStorage

func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool)

func (RESTStorageProvider) PostStartHook

type ResourceInterface

type ResourceInterface interface {
	// Remove a third party resource based on the RESTful path for that resource, the path is <api-group-path>/<resource-plural-name>
	RemoveThirdPartyResource(path string) error
	// Install a third party resource described by 'rsrc'
	InstallThirdPartyResource(rsrc *extensions.ThirdPartyResource) error
	// Is a particular third party resource currently installed?
	HasThirdPartyResource(rsrc *extensions.ThirdPartyResource) (bool, error)
	// List all currently installed third party resources, the returned
	// names are of the form <api-group-path>/<resource-plural-name>
	ListThirdPartyResources() []string
}

ResourceInterface is the interface for the parts of the master that know how to add/remove third party resources. Extracted into an interface for injection for testing.

type ThirdPartyController

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

ThirdPartyController is a control loop that knows how to synchronize ThirdPartyResource objects with RESTful resources which are present in the API server.

func (*ThirdPartyController) SyncOneResource

func (t *ThirdPartyController) SyncOneResource(rsrc *extensions.ThirdPartyResource) error

SyncOneResource synchronizes a single resource with RESTful resources on the master

func (*ThirdPartyController) SyncResources

func (t *ThirdPartyController) SyncResources() error

Synchronize all resources with RESTful resources on the master

Source Files

storage_extensions.go thirdparty_controller.go

Version
v1.7.8
Published
Oct 5, 2017
Platform
js/wasm
Imports
26 packages
Last checked
26 minutes ago

Tools for package owners.