channels

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2016 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const AnnotationPrefix = "addons.k8s.io/"

Variables

This section is empty.

Functions

func Apply

func Apply(manifest string) error

Apply calls kubectl apply to apply the manifest. We will likely in future change this to create things directly (or more likely embed this logic into kubectl itself)

func FindAddons

func FindAddons(ns *v1.Namespace) map[string]*ChannelVersion

Types

type Addon

type Addon struct {
	Name            string
	ChannelName     string
	ChannelLocation url.URL
	Spec            *api.AddonSpec
}

func (*Addon) ChannelVersion

func (a *Addon) ChannelVersion() *ChannelVersion

func (*Addon) EnsureUpdated

func (a *Addon) EnsureUpdated(k8sClient *release_1_3.Clientset) (*AddonUpdate, error)

func (*Addon) GetRequiredUpdates

func (a *Addon) GetRequiredUpdates(k8sClient *release_1_3.Clientset) (*AddonUpdate, error)

type AddonUpdate

type AddonUpdate struct {
	Name            string
	ExistingVersion *ChannelVersion
	NewVersion      *ChannelVersion
}

type Addons

type Addons struct {
	ChannelName     string
	ChannelLocation url.URL
	APIObject       *api.Addons
}

func LoadAddons

func LoadAddons(name string, location *url.URL) (*Addons, error)

func ParseAddons

func ParseAddons(name string, location *url.URL, data []byte) (*Addons, error)

func (*Addons) All

func (a *Addons) All() ([]*Addon, error)

func (*Addons) GetCurrent

func (a *Addons) GetCurrent() ([]*Addon, error)

type Channel

type Channel struct {
	Namespace string
	Name      string
}

func (*Channel) AnnotationName

func (c *Channel) AnnotationName() string

func (*Channel) GetInstalledVersion

func (c *Channel) GetInstalledVersion(k8sClient *release_1_3.Clientset) (*ChannelVersion, error)

func (*Channel) SetInstalledVersion

func (c *Channel) SetInstalledVersion(k8sClient *release_1_3.Clientset, version *ChannelVersion) error

type ChannelVersion

type ChannelVersion struct {
	Version *string `json:"version,omitempty"`
	Channel *string `json:"channel,omitempty"`
}

func ParseChannelVersion

func ParseChannelVersion(s string) (*ChannelVersion, error)

func (*ChannelVersion) Encode

func (c *ChannelVersion) Encode() (string, error)

func (*ChannelVersion) Replaces

func (c *ChannelVersion) Replaces(existing *ChannelVersion) bool

Jump to

Keyboard shortcuts

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