channels

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 18 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
}

Addon is a wrapper around a single version of an addon

func (*Addon) ChannelVersion

func (a *Addon) ChannelVersion() *ChannelVersion

func (*Addon) EnsureUpdated

func (a *Addon) EnsureUpdated(k8sClient kubernetes.Interface) (*AddonUpdate, error)

func (*Addon) GetRequiredUpdates

func (a *Addon) GetRequiredUpdates(k8sClient kubernetes.Interface) (*AddonUpdate, error)

type AddonMenu added in v1.10.0

type AddonMenu struct {
	Addons map[string]*Addon
}

AddonMenu is a collection of addons, with helpers for computing the latest versions

func NewAddonMenu added in v1.10.0

func NewAddonMenu() *AddonMenu

func (*AddonMenu) MergeAddons added in v1.10.0

func (m *AddonMenu) MergeAddons(o *AddonMenu)

type AddonUpdate

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

AddonUpdate holds data about a proposed update to an addon

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) GetCurrent

func (a *Addons) GetCurrent(kubernetesVersion semver.Version) (*AddonMenu, 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 kubernetes.Interface) (*ChannelVersion, error)

func (*Channel) SetInstalledVersion

func (c *Channel) SetInstalledVersion(k8sClient kubernetes.Interface, version *ChannelVersion) error

type ChannelVersion

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

func ParseChannelVersion

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

func (*ChannelVersion) Encode

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

func (*ChannelVersion) String added in v1.10.0

func (c *ChannelVersion) String() string

Jump to

Keyboard shortcuts

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