resources

package
v0.0.0-...-437b0eb Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2017 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindToResourceTemplate = map[string]interfaces.ResourceTemplate{}

KindToResourceTemplate is a map mapping kind strings to empty structs representing proper resources structs implement interfaces.ResourceTemplate

View Source
var Kinds = getKeys(KindToResourceTemplate)

Kinds is slice of keys from KindToResourceTemplate

Functions

func GetIntMeta

func GetIntMeta(r interfaces.BaseResource, paramName string, defaultValue int) int

GetIntMeta returns metadata value for parameter 'paramName', or 'defaultValue' if parameter is not set or is not an integer value

func GetStringMeta

func GetStringMeta(r interfaces.BaseResource, paramName string, defaultValue string) string

GetStringMeta returns metadata value for parameter 'paramName', or 'defaultValue' if parameter is not set or is not a string value

func NewExistingDaemonSet

func NewExistingDaemonSet(name string, client v1beta1.DaemonSetInterface) interfaces.Resource

NewExistingDaemonSet is a constructor

Types

type Base

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

Base is a base struct that contains data common for all resources

func (Base) Meta

func (b Base) Meta(paramName string) interface{}

Meta returns metadata parameter with given name, or empty string, if no metadata were provided or such parameter does not exist.

type DaemonSet

type DaemonSet struct {
	Base
	DaemonSet *extbeta1.DaemonSet
	Client    v1beta1.DaemonSetInterface
}

DaemonSet is wrapper for K8s DaemonSet object

func (DaemonSet) Create

func (d DaemonSet) Create() error

Create looks for DaemonSet in k8s and creates it if not present

func (DaemonSet) Delete

func (d DaemonSet) Delete() error

Delete deletes DaemonSet from the cluster

func (DaemonSet) Key

func (d DaemonSet) Key() string

Key return DaemonSet name

func (DaemonSet) Status

func (d DaemonSet) Status(meta map[string]string) (interfaces.ResourceStatus, error)

Status returns DaemonSet status. interfaces.ResourceReady means that its dependencies can be created

type Deployment

type Deployment struct {
	Base
	Deployment *extbeta1.Deployment
	Client     v1beta1.DeploymentInterface
}

Deployment is wrapper for K8s Deployment object

func (Deployment) Create

func (d Deployment) Create() error

Create looks for the Deployment in K8s and creates it if not present

func (Deployment) Delete

func (d Deployment) Delete() error

Delete deletes Deployment from the cluster

func (Deployment) Key

func (d Deployment) Key() string

Key return Deployment name

func (Deployment) Status

func (d Deployment) Status(meta map[string]string) (interfaces.ResourceStatus, error)

Status returns Deployment status. interfaces.ResourceReady means that its dependencies can be created

type ExistingDaemonSet

type ExistingDaemonSet struct {
	Base
	Name   string
	Client v1beta1.DaemonSetInterface
}

ExistingDaemonSet is a wrapper for K8s DaemonSet object which is deployed on a cluster before AppController

func (ExistingDaemonSet) Create

func (d ExistingDaemonSet) Create() error

Create looks for existing DaemonSet and returns error if there is no such DaemonSet

func (ExistingDaemonSet) Delete

func (d ExistingDaemonSet) Delete() error

Delete deletes DaemonSet from the cluster

func (ExistingDaemonSet) Key

func (d ExistingDaemonSet) Key() string

Key returns DaemonSet name

func (ExistingDaemonSet) Status

Status returns DaemonSet status. interfaces.ResourceReady means that its dependencies can be created

type ExistingDeployment

type ExistingDeployment struct {
	Base
	Name   string
	Client v1beta1.DeploymentInterface
}

ExistingDeployment is a wrapper for K8s Deployment object which is deployed on a cluster before AppController

func (ExistingDeployment) Create

func (d ExistingDeployment) Create() error

Create looks for existing Deployment and returns error if there is no such Deployment

func (ExistingDeployment) Delete

func (d ExistingDeployment) Delete() error

Delete deletes Deployment from the cluster

func (ExistingDeployment) Key

func (d ExistingDeployment) Key() string

Key returns Deployment name

func (ExistingDeployment) Status

Status returns Deployment status. interfaces.ResourceReady means that its dependencies can be created

func (ExistingDeployment) UpdateMeta

func (d ExistingDeployment) UpdateMeta(meta map[string]string) error

UpdateMeta does nothing at the moment

type ExistingPetSet

type ExistingPetSet struct {
	Base
	Name      string
	Client    v1alpha1.PetSetInterface
	APIClient client.Interface
}

ExistingPetSet is a wrapper for K8s PetSet object which is meant to already be in a cluster bofer AppController execution

func (ExistingPetSet) Create

func (p ExistingPetSet) Create() error

Create looks for existing PetSet and returns error if there is no such PetSet

func (ExistingPetSet) Delete

func (p ExistingPetSet) Delete() error

Delete deletes PetSet from the cluster

func (ExistingPetSet) Key

func (p ExistingPetSet) Key() string

Key returns PetSet name

func (ExistingPetSet) Status

Status returns PetSet status. interfaces.ResourceReady is regarded as sufficient for it's dependencies to be created.

type ExistingStatefulSet

type ExistingStatefulSet struct {
	Base
	Name      string
	Client    v1beta1.StatefulSetInterface
	APIClient client.Interface
}

ExistingStatefulSet is a wrapper for K8s StatefulSet object which is meant to already be in a cluster before AppController execution

func (ExistingStatefulSet) Create

func (p ExistingStatefulSet) Create() error

Create looks for existing StatefulSet and returns error if there is no such StatefulSet

func (ExistingStatefulSet) Delete

func (p ExistingStatefulSet) Delete() error

Delete deletes StatefulSet from the cluster

func (ExistingStatefulSet) Key

func (p ExistingStatefulSet) Key() string

Key returns StatefulSet name

func (ExistingStatefulSet) Status

Status returns StatefulSet status. interfaces.ResourceReady is regarded as sufficient for it's dependencies to be created.

type PetSet

type PetSet struct {
	Base
	PetSet    *appsalpha1.PetSet
	Client    v1alpha1.PetSetInterface
	APIClient client.Interface
}

PetSet is a wrapper for K8s PetSet object

func (PetSet) Create

func (p PetSet) Create() error

Create looks for the PetSet in Kubernetes cluster and creates it if it's not there

func (PetSet) Delete

func (p PetSet) Delete() error

Delete deletes PetSet from the cluster

func (PetSet) Key

func (p PetSet) Key() string

Key returns PetSet name

func (PetSet) Status

func (p PetSet) Status(meta map[string]string) (interfaces.ResourceStatus, error)

Status returns PetSet status. interfaces.ResourceReady is regarded as sufficient for it's dependencies to be created.

type StatefulSet

type StatefulSet struct {
	Base
	StatefulSet *appsbeta1.StatefulSet
	Client      v1beta1.StatefulSetInterface
	APIClient   client.Interface
}

StatefulSet is a wrapper for K8s StatefulSet object

func (StatefulSet) Create

func (p StatefulSet) Create() error

Create looks for the StatefulSet in Kubernetes cluster and creates it if it's not there

func (StatefulSet) Delete

func (p StatefulSet) Delete() error

Delete deletes StatefulSet from the cluster

func (StatefulSet) Key

func (p StatefulSet) Key() string

Key returns StatefulSet name

func (StatefulSet) Status

func (p StatefulSet) Status(meta map[string]string) (interfaces.ResourceStatus, error)

Status returns StatefulSet status. interfaces.ResourceReady is regarded as sufficient for it's dependencies to be created.

Jump to

Keyboard shortcuts

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