v1

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1 defines all of the versioned (v1) definitions of the Orchestration layer model. +groupName=orchestration.voyager.atl-paas.net

Index

Constants

View Source
const (
	StateResourceSingular = "state"
	StateResourcePlural   = "states"
	StateResourceVersion  = "v1"
	StateResourceKind     = "State"

	StateResourceAPIVersion = orchestration.GroupName + "/" + StateResourceVersion

	StateResourceName = StateResourcePlural + "." + orchestration.GroupName
)

Variables

View Source
var (
	// SchemeBuilder needs to be exported as `SchemeBuilder` so
	// the code-generation can find it.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is exposed for API installation
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: orchestration.GroupName, Version: StateResourceVersion}

SchemeGroupVersion is group version used to register these objects.

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind.

Types

type ResourceStatus

type ResourceStatus struct {
	Name               voyager.ResourceName `json:"name,omitempty"`
	ResourceStatusData `json:",inline"`
}

+k8s:deepcopy-gen=true

func (*ResourceStatus) DeepCopy

func (in *ResourceStatus) DeepCopy() *ResourceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.

func (*ResourceStatus) DeepCopyInto

func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)

DeepCopyInto handle the interface{} deepcopy (which k8s can't autogen, since it doesn't know it's JSON).

type ResourceStatusData

type ResourceStatusData struct {
	Conditions []cond_v1.Condition    `json:"conditions,omitempty"`
	Data       map[string]interface{} `json:"data,omitempty"`
}

+k8s:deepcopy-gen=true

func (*ResourceStatusData) DeepCopy

func (in *ResourceStatusData) DeepCopy() *ResourceStatusData

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatusData.

func (*ResourceStatusData) DeepCopyInto

func (in *ResourceStatusData) DeepCopyInto(out *ResourceStatusData)

DeepCopyInto handle the interface{} deepcopy (which k8s can't autogen, since it doesn't know it's JSON).

type State

type State struct {
	meta_v1.TypeMeta   `json:",inline"`
	meta_v1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of the State.
	Spec StateSpec `json:"spec,omitempty"`

	// Most recently observed status of the State.
	Status StateStatus `json:"status,omitempty"`
}

State is handled by State controller. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*State) DeepCopy

func (in *State) DeepCopy() *State

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new State.

func (*State) DeepCopyInto

func (in *State) DeepCopyInto(out *State)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*State) DeepCopyObject

func (in *State) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*State) GetCondition

func (s *State) GetCondition(conditionType cond_v1.ConditionType) (int, *cond_v1.Condition)

type StateDependency

type StateDependency struct {
	Name       voyager.ResourceName   `json:"name"`
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

+k8s:deepcopy-gen=true

func (*StateDependency) DeepCopy

func (in *StateDependency) DeepCopy() *StateDependency

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StateDependency.

func (*StateDependency) DeepCopyInto

func (sd *StateDependency) DeepCopyInto(out *StateDependency)

DeepCopyInto handle the interface{} deepcopy (which k8s can't autogen, since it doesn't know it's JSON).

func (*StateDependency) UnmarshalJSON

func (sd *StateDependency) UnmarshalJSON(data []byte) error

UnmarshalJSON for StateDependency handles them being either a single resource name, or an object containing name and attributes.

type StateList

type StateList struct {
	meta_v1.TypeMeta `json:",inline"`
	meta_v1.ListMeta `json:"metadata,omitempty"`

	Items []State `json:"items"`
}

StateList is a list of States. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*StateList) DeepCopy

func (in *StateList) DeepCopy() *StateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StateList.

func (*StateList) DeepCopyInto

func (in *StateList) DeepCopyInto(out *StateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StateList) DeepCopyObject

func (in *StateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type StateResource

type StateResource struct {
	Name voyager.ResourceName `json:"name"`
	Type voyager.ResourceType `json:"type"`
	// Explicit dependencies.
	DependsOn []StateDependency     `json:"dependsOn,omitempty"`
	Defaults  *runtime.RawExtension `json:"defaults,omitempty"`
	// Specification of the desired behavior of the Resource.
	Spec *runtime.RawExtension `json:"spec,omitempty"`
}

+k8s:deepcopy-gen=true

func (*StateResource) DeepCopy

func (in *StateResource) DeepCopy() *StateResource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StateResource.

func (*StateResource) DeepCopyInto

func (in *StateResource) DeepCopyInto(out *StateResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StateResource) SpecIntoTyped

func (sr *StateResource) SpecIntoTyped(obj interface{}) error

SpecIntoTyped converts Raw representation of the object into a typed representation.

type StateSpec

type StateSpec struct {
	// ConfigMapName is the name of the config map to read in the State's
	// namespace that will hold the state configuration, e.g. tags,
	// businessUnit, notificationEmail
	ConfigMapName string `json:"configMapName"`

	// Resources is a list of resources that will be autowired.
	Resources []StateResource `json:"resources,omitempty"`
}

+k8s:deepcopy-gen=true

func (*StateSpec) DeepCopy

func (in *StateSpec) DeepCopy() *StateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StateSpec.

func (*StateSpec) DeepCopyInto

func (in *StateSpec) DeepCopyInto(out *StateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StateStatus

type StateStatus struct {
	// Represents the latest available observations of a State's current state.
	Conditions       []cond_v1.Condition `json:"conditions,omitempty"`
	ResourceStatuses []ResourceStatus    `json:"resourceStatuses,omitempty"`
}

+k8s:deepcopy-gen=true

func (*StateStatus) DeepCopy

func (in *StateStatus) DeepCopy() *StateStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StateStatus.

func (*StateStatus) DeepCopyInto

func (in *StateStatus) DeepCopyInto(out *StateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StateStatus) String

func (ss *StateStatus) String() string

Jump to

Keyboard shortcuts

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