kubernetes: k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint Index | Files | Directories

package checkpoint

import "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint"

Index

Package Files

configmap.go download.go

func EqualRemoteConfigSources Uses

func EqualRemoteConfigSources(a, b RemoteConfigSource) bool

EqualRemoteConfigSources is a helper for comparing remote config sources by comparing the underlying API objects for semantic equality.

type Payload Uses

type Payload interface {
    // UID returns a globally unique (space and time) identifier for the payload.
    // The return value is guaranteed non-empty.
    UID() string

    // ResourceVersion returns a resource version for the payload.
    // The return value is guaranteed non-empty.
    ResourceVersion() string

    // Files returns a map of filenames to file contents.
    Files() map[string]string
    // contains filtered or unexported methods
}

Payload represents a local copy of a config source (payload) object

func NewConfigMapPayload Uses

func NewConfigMapPayload(cm *apiv1.ConfigMap) (Payload, error)

NewConfigMapPayload constructs a Payload backed by a ConfigMap, which must have a non-empty UID

type RemoteConfigSource Uses

type RemoteConfigSource interface {
    // KubeletFilename returns the name of the Kubelet config file as it should appear in the keys of Payload.Files()
    KubeletFilename() string

    // APIPath returns the API path to the remote resource, e.g. its SelfLink
    APIPath() string

    // UID returns the globally unique identifier for the most recently downloaded payload targeted by the source.
    UID() string

    // ResourceVersion returns the resource version of the most recently downloaded payload targeted by the source.
    ResourceVersion() string

    // Download downloads the remote config source's target object and returns a Payload backed by the object,
    // or a sanitized failure reason and error if the download fails.
    // Download takes an optional store as an argument. If provided, Download will check this store for the
    // target object prior to contacting the API server.
    // Download updates the local UID and ResourceVersion tracked by this source, based on the downloaded payload.
    Download(client clientset.Interface, store cache.Store) (Payload, string, error)

    // Informer returns an informer that can be used to detect changes to the remote config source
    Informer(client clientset.Interface, handler cache.ResourceEventHandlerFuncs) cache.SharedInformer

    // Encode returns a []byte representation of the object behind the RemoteConfigSource
    Encode() ([]byte, error)

    // NodeConfigSource returns a copy of the underlying apiv1.NodeConfigSource object.
    // All RemoteConfigSources are expected to be backed by a NodeConfigSource,
    // though the convenience methods on the interface will target the source
    // type that was detected in a call to NewRemoteConfigSource.
    NodeConfigSource() *apiv1.NodeConfigSource
}

RemoteConfigSource represents a remote config source object that can be downloaded as a Checkpoint

func DecodeRemoteConfigSource Uses

func DecodeRemoteConfigSource(data []byte) (RemoteConfigSource, error)

DecodeRemoteConfigSource is a helper for using the apimachinery to decode serialized RemoteConfigSources; e.g. the metadata stored by checkpoint/store/fsstore.go

func NewRemoteConfigSource Uses

func NewRemoteConfigSource(source *apiv1.NodeConfigSource) (RemoteConfigSource, string, error)

NewRemoteConfigSource constructs a RemoteConfigSource from a v1/NodeConfigSource object You should only call this with a non-nil config source. Note that the API server validates Node.Spec.ConfigSource.

Directories

PathSynopsis
store

Package checkpoint imports 16 packages (graph) and is imported by 2 packages. Updated 2019-08-27. Refresh now. Tools for package owners.