v1

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1 defines all of the versioned (v1) definitions of the Smith model. +groupName=smith.atlassian.com

Index

Constants

View Source
const (
	BundleReasonTerminalError  = "TerminalError"
	BundleReasonRetriableError = "RetriableError"
)
View Source
const (
	BundleResourceSingular = "bundle"
	BundleResourcePlural   = "bundles"
	BundleResourceVersion  = "v1"
	BundleResourceKind     = "Bundle"

	BundleResourceGroupVersion = GroupName + "/" + BundleResourceVersion

	BundleResourceName = BundleResourcePlural + "." + GroupName
)
View Source
const GroupName = smith.Domain

GroupName is the group name use in this package.

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: GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects.

Functions

func GetGeneratedDeepCopyFuncs deprecated added in v0.2.0

func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc

GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.

Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.

func Kind

func Kind(kind string) schema.GroupKind

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

Types

type Bundle

type Bundle struct {
	meta_v1.TypeMeta `json:",inline"`

	// Standard object metadata
	meta_v1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the specification of the desired behavior of the Bundle.
	Spec BundleSpec `json:"spec,omitempty"`

	// Status is most recently observed status of the Bundle.
	Status BundleStatus `json:"status,omitempty"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object Bundle describes a resources bundle.

func (*Bundle) DeepCopy added in v0.2.0

func (in *Bundle) DeepCopy() *Bundle

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

func (*Bundle) DeepCopyInto added in v0.2.0

func (in *Bundle) DeepCopyInto(out *Bundle)

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

func (*Bundle) DeepCopyObject added in v0.2.0

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

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

func (*Bundle) GetCondition

func (b *Bundle) GetCondition(conditionType BundleConditionType) (int, *BundleCondition)

func (*Bundle) UpdateCondition

func (b *Bundle) UpdateCondition(condition *BundleCondition) bool

Updates existing Bundle condition or creates a new one. Sets LastTransitionTime to now if the status has changed. Returns true if Bundle condition has changed or has been added.

type BundleCondition

type BundleCondition struct {
	// Type of Bundle condition.
	Type BundleConditionType `json:"type"`
	// Status of the condition.
	Status ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime meta_v1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime meta_v1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

+k8s:deepcopy-gen=true BundleCondition describes the state of a bundle at a certain point.

func (*BundleCondition) DeepCopy added in v0.2.0

func (in *BundleCondition) DeepCopy() *BundleCondition

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

func (*BundleCondition) DeepCopyInto added in v0.2.0

func (in *BundleCondition) DeepCopyInto(out *BundleCondition)

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

type BundleConditionType

type BundleConditionType string
const (
	BundleInProgress BundleConditionType = "InProgress"
	BundleReady      BundleConditionType = "Ready"
	BundleError      BundleConditionType = "Error"
)

These are valid conditions of a Bundle.

type BundleList

type BundleList struct {
	meta_v1.TypeMeta `json:",inline"`
	// Standard list metadata.
	meta_v1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of bundles.
	Items []Bundle `json:"items"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*BundleList) DeepCopy added in v0.2.0

func (in *BundleList) DeepCopy() *BundleList

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

func (*BundleList) DeepCopyInto added in v0.2.0

func (in *BundleList) DeepCopyInto(out *BundleList)

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

func (*BundleList) DeepCopyObject added in v0.2.0

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

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

type BundleSpec

type BundleSpec struct {
	Resources []Resource `json:"resources"`
}

+k8s:deepcopy-gen=true

func (*BundleSpec) DeepCopy added in v0.2.0

func (in *BundleSpec) DeepCopy() *BundleSpec

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

func (*BundleSpec) DeepCopyInto added in v0.2.0

func (in *BundleSpec) DeepCopyInto(out *BundleSpec)

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

type BundleStatus

type BundleStatus struct {
	// Represents the latest available observations of a Bundle's current state.
	Conditions []BundleCondition `json:"conditions,omitempty"`
}

+k8s:deepcopy-gen=true

func (*BundleStatus) DeepCopy added in v0.2.0

func (in *BundleStatus) DeepCopy() *BundleStatus

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

func (*BundleStatus) DeepCopyInto added in v0.2.0

func (in *BundleStatus) DeepCopyInto(out *BundleStatus)

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

func (*BundleStatus) ShortString

func (bs *BundleStatus) ShortString() string

type ConditionStatus

type ConditionStatus string
const (
	ConditionTrue    ConditionStatus = "True"
	ConditionFalse   ConditionStatus = "False"
	ConditionUnknown ConditionStatus = "Unknown"
)

These are valid condition statuses. "ConditionTrue" means a resource is in the condition. "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes can't decide if a resource is in the condition or not. In the future, we could add other intermediate conditions, e.g. ConditionDegraded.

type Resource

type Resource struct {
	// Name of the resource for references.
	Name ResourceName `json:"name"`

	// Explicit dependencies.
	DependsOn []ResourceName `json:"dependsOn,omitempty"`

	Spec runtime.Object `json:"spec"`
}

+k8s:deepcopy-gen=true

func (*Resource) DeepCopy added in v0.2.0

func (in *Resource) DeepCopy() *Resource

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

func (*Resource) DeepCopyInto added in v0.2.0

func (in *Resource) DeepCopyInto(out *Resource)

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

func (*Resource) IntoTyped

func (r *Resource) IntoTyped(obj runtime.Object) error

IntoTyped tries to convert resource spec into a typed object passed as obj. It supports objects of the same type and Unstructured. Note that it does not perform a deep copy in case of typed API object. Note that this method may fail if references are used where a non-string value is expected.

func (*Resource) ToUnstructured

func (r *Resource) ToUnstructured() (*unstructured.Unstructured, error)

ToUnstructured returns Spec field as an Unstructured object. It makes a copy if it is an Unstructured already.

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(data []byte) error

type ResourceName

type ResourceName string

ResourceName is a reference to another Resource in the same bundle.

Jump to

Keyboard shortcuts

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